Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Unified Diff: src/heap.cc

Issue 8352039: Cleanup ScopeInfo and SerializedScopeInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased to include removal of stack height tracking and strict mode flag changes. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/hydrogen.cc » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/heap.h ('k') | src/hydrogen.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698