summaryrefslogtreecommitdiffstats
path: root/src/runtime.cc
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-01-27 17:25:45 +0000
committerLeon Clarke <leonclarke@google.com>2010-01-27 17:31:21 +0000
commitd91b9f7d46489a9ee00f9cb415630299c76a502b (patch)
tree741552f95883bb7461cf7c1d36335cef68804a5b /src/runtime.cc
parenteab96aab0834f21954b5d6aa6366bcfb348ed811 (diff)
downloadandroid_external_v8-d91b9f7d46489a9ee00f9cb415630299c76a502b.tar.gz
android_external_v8-d91b9f7d46489a9ee00f9cb415630299c76a502b.tar.bz2
android_external_v8-d91b9f7d46489a9ee00f9cb415630299c76a502b.zip
Merge from v8 at revision 3723
Diffstat (limited to 'src/runtime.cc')
-rw-r--r--src/runtime.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/runtime.cc b/src/runtime.cc
index b6da528e..51c1ba23 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4782,7 +4782,7 @@ static Code* ComputeConstructStub(Handle<SharedFunctionInfo> shared) {
return Code::cast(code);
}
- return Builtins::builtin(Builtins::JSConstructStubGeneric);
+ return shared->construct_stub();
}
@@ -4830,6 +4830,7 @@ static Object* Runtime_NewObject(Arguments args) {
CompileLazyShared(Handle<SharedFunctionInfo>(function->shared()),
CLEAR_EXCEPTION,
0);
+ LOG(FunctionCreateEvent(*function));
}
bool first_allocation = !function->has_initial_map();
@@ -7211,9 +7212,8 @@ Object* Runtime::FindSharedFunctionInfoInScript(Handle<Script> script,
Handle<SharedFunctionInfo> last;
while (!done) {
HeapIterator iterator;
- while (iterator.has_next()) {
- HeapObject* obj = iterator.next();
- ASSERT(obj != NULL);
+ for (HeapObject* obj = iterator.next();
+ obj != NULL; obj = iterator.next()) {
if (obj->IsSharedFunctionInfo()) {
Handle<SharedFunctionInfo> shared(SharedFunctionInfo::cast(obj));
if (shared->script() == *script) {
@@ -7669,10 +7669,10 @@ static int DebugReferencedBy(JSObject* target,
int count = 0;
JSObject* last = NULL;
HeapIterator iterator;
- while (iterator.has_next() &&
+ HeapObject* heap_obj = NULL;
+ while (((heap_obj = iterator.next()) != NULL) &&
(max_references == 0 || count < max_references)) {
// Only look at all JSObjects.
- HeapObject* heap_obj = iterator.next();
if (heap_obj->IsJSObject()) {
// Skip context extension objects and argument arrays as these are
// checked in the context of functions using them.
@@ -7782,10 +7782,10 @@ static int DebugConstructedBy(JSFunction* constructor, int max_references,
// Iterate the heap.
int count = 0;
HeapIterator iterator;
- while (iterator.has_next() &&
+ HeapObject* heap_obj = NULL;
+ while (((heap_obj = iterator.next()) != NULL) &&
(max_references == 0 || count < max_references)) {
// Only look at all JSObjects.
- HeapObject* heap_obj = iterator.next();
if (heap_obj->IsJSObject()) {
JSObject* obj = JSObject::cast(heap_obj);
if (obj->map()->constructor() == constructor) {
@@ -7933,8 +7933,8 @@ static Handle<Object> Runtime_GetScriptFromScriptName(
// script data.
Handle<Script> script;
HeapIterator iterator;
- while (script.is_null() && iterator.has_next()) {
- HeapObject* obj = iterator.next();
+ HeapObject* obj = NULL;
+ while (script.is_null() && ((obj = iterator.next()) != NULL)) {
// If a script is found check if it has the script data requested.
if (obj->IsScript()) {
if (Script::cast(obj)->name()->IsString()) {