Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index bded80b48f0e1a43f1293ba1996423a33541ad15..407d0893d291969c42b8c7e8cbd975bb6dc79e3f 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -1871,7 +1871,7 @@ bool Heap::CreateInitialMaps() { |
| AllocateMap(FIXED_ARRAY_TYPE, kVariableSizeSentinel); |
| if (!maybe_obj->ToObject(&obj)) return false; |
| } |
| - set_serialized_scope_info_map(Map::cast(obj)); |
| + set_scope_info_map(Map::cast(obj)); |
| { MaybeObject* maybe_obj = AllocateMap(HEAP_NUMBER_TYPE, HeapNumber::kSize); |
| if (!maybe_obj->ToObject(&obj)) return false; |
| @@ -2646,7 +2646,7 @@ MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) { |
| share->set_name(name); |
| Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal); |
| share->set_code(illegal); |
| - share->set_scope_info(SerializedScopeInfo::Empty()); |
| + share->set_scope_info(ScopeInfo::Empty()); |
| Code* construct_stub = |
| isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); |
| share->set_construct_stub(construct_stub); |
| @@ -4394,7 +4394,7 @@ MaybeObject* Heap::AllocateWithContext(JSFunction* function, |
| MaybeObject* Heap::AllocateBlockContext(JSFunction* function, |
| Context* previous, |
| - SerializedScopeInfo* scope_info) { |
| + ScopeInfo* scope_info) { |
| Object* result; |
| { MaybeObject* maybe_result = |
| AllocateFixedArrayWithHoles(scope_info->NumberOfContextSlots()); |
| @@ -4410,14 +4410,16 @@ MaybeObject* Heap::AllocateBlockContext(JSFunction* function, |
| } |
| -MaybeObject* Heap::AllocateSerializedScopeInfo(int length) { |
| +MaybeObject* Heap::AllocateScopeInfo(int length) { |
| Object* result; |
| { MaybeObject* maybe_result = AllocateFixedArray(length, TENURED); |
| - if (!maybe_result->ToObject(&result)) return maybe_result; |
| + if (!maybe_result->ToObject(&result)) { |
| + maybe_result->ToObject(&result); |
|
Kevin Millikin (Chromium)
2011/11/02 16:31:19
No need to call ToObject twice, is there?
This ca
Steven
2011/11/02 18:52:59
Removed the second ToObject call. However I kept t
Kevin Millikin (Chromium)
2011/11/03 09:18:37
I see what you mean, that's less useful in raw all
Steven
2011/11/03 10:32:34
Ok I'm convinced. Done.
On 2011/11/03 09:18:37, Ke
|
| + return maybe_result; |
| + } |
| } |
| - SerializedScopeInfo* scope_info = |
| - reinterpret_cast<SerializedScopeInfo*>(result); |
| - scope_info->set_map(serialized_scope_info_map()); |
| + ScopeInfo* scope_info = reinterpret_cast<ScopeInfo*>(result); |
| + scope_info->set_map(scope_info_map()); |
| return scope_info; |
| } |