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

Unified Diff: src/frames.cc

Issue 2918001: Move serialized scope info from Code object to SharedFunctionInfo. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 5 months 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/factory.cc ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
===================================================================
--- src/frames.cc (revision 5039)
+++ src/frames.cc (working copy)
@@ -532,8 +532,11 @@
if (IsConstructor()) accumulator->Add("new ");
accumulator->PrintFunction(function, receiver, &code);
+ Handle<Object> scope_info(ScopeInfo<>::EmptyHeapObject());
+
if (function->IsJSFunction()) {
Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared());
+ scope_info = Handle<Object>(shared->scope_info());
Object* script_obj = shared->script();
if (script_obj->IsScript()) {
Handle<Script> script(Script::cast(script_obj));
@@ -561,7 +564,7 @@
// Get scope information for nicer output, if possible. If code is
// NULL, or doesn't contain scope info, info will return 0 for the
// number of parameters, stack slots, or context slots.
- ScopeInfo<PreallocatedStorage> info(code);
+ ScopeInfo<PreallocatedStorage> info(*scope_info);
// Print the parameters.
int parameters_count = ComputeParametersCount();
« no previous file with comments | « src/factory.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698