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

Side by Side Diff: src/frames.cc

Issue 2908009: Create a separate class to encapsulate ScopeInfo serialization.... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/factory.cc ('k') | src/globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 HandleScope scope; 525 HandleScope scope;
526 Object* receiver = this->receiver(); 526 Object* receiver = this->receiver();
527 Object* function = this->function(); 527 Object* function = this->function();
528 528
529 accumulator->PrintSecurityTokenIfChanged(function); 529 accumulator->PrintSecurityTokenIfChanged(function);
530 PrintIndex(accumulator, mode, index); 530 PrintIndex(accumulator, mode, index);
531 Code* code = NULL; 531 Code* code = NULL;
532 if (IsConstructor()) accumulator->Add("new "); 532 if (IsConstructor()) accumulator->Add("new ");
533 accumulator->PrintFunction(function, receiver, &code); 533 accumulator->PrintFunction(function, receiver, &code);
534 534
535 Handle<Object> scope_info(ScopeInfo<>::EmptyHeapObject()); 535 Handle<SerializedScopeInfo> scope_info(SerializedScopeInfo::Empty());
536 536
537 if (function->IsJSFunction()) { 537 if (function->IsJSFunction()) {
538 Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared()); 538 Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared());
539 scope_info = Handle<Object>(shared->scope_info()); 539 scope_info = Handle<SerializedScopeInfo>(shared->scope_info());
540 Object* script_obj = shared->script(); 540 Object* script_obj = shared->script();
541 if (script_obj->IsScript()) { 541 if (script_obj->IsScript()) {
542 Handle<Script> script(Script::cast(script_obj)); 542 Handle<Script> script(Script::cast(script_obj));
543 accumulator->Add(" ["); 543 accumulator->Add(" [");
544 accumulator->PrintName(script->name()); 544 accumulator->PrintName(script->name());
545 545
546 Address pc = this->pc(); 546 Address pc = this->pc();
547 if (code != NULL && code->kind() == Code::FUNCTION && 547 if (code != NULL && code->kind() == Code::FUNCTION &&
548 pc >= code->instruction_start() && pc < code->instruction_end()) { 548 pc >= code->instruction_start() && pc < code->instruction_end()) {
549 int source_pos = code->SourcePosition(pc); 549 int source_pos = code->SourcePosition(pc);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 ZoneList<StackFrame*> list(10); 817 ZoneList<StackFrame*> list(10);
818 for (StackFrameIterator it; !it.done(); it.Advance()) { 818 for (StackFrameIterator it; !it.done(); it.Advance()) {
819 StackFrame* frame = AllocateFrameCopy(it.frame()); 819 StackFrame* frame = AllocateFrameCopy(it.frame());
820 list.Add(frame); 820 list.Add(frame);
821 } 821 }
822 return list.ToVector(); 822 return list.ToVector();
823 } 823 }
824 824
825 825
826 } } // namespace v8::internal 826 } } // namespace v8::internal
OLDNEW
« 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