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

Side by Side Diff: src/frames.cc

Issue 2814050: Version 2.2.23... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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/heap.cc » ('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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 if (function->IsJSFunction()) { 535 if (function->IsJSFunction()) {
536 Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared()); 536 Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared());
537 Object* script_obj = shared->script(); 537 Object* script_obj = shared->script();
538 if (script_obj->IsScript()) { 538 if (script_obj->IsScript()) {
539 Handle<Script> script(Script::cast(script_obj)); 539 Handle<Script> script(Script::cast(script_obj));
540 accumulator->Add(" ["); 540 accumulator->Add(" [");
541 accumulator->PrintName(script->name()); 541 accumulator->PrintName(script->name());
542 542
543 Address pc = this->pc(); 543 Address pc = this->pc();
544 if (code != NULL && code->kind() == Code::FUNCTION && 544 if (code != NULL && code->kind() == Code::FUNCTION &&
545 pc >= code->instruction_start() && pc < code->relocation_start()) { 545 pc >= code->instruction_start() && pc < code->instruction_end()) {
546 int source_pos = code->SourcePosition(pc); 546 int source_pos = code->SourcePosition(pc);
547 int line = GetScriptLineNumberSafe(script, source_pos) + 1; 547 int line = GetScriptLineNumberSafe(script, source_pos) + 1;
548 accumulator->Add(":%d", line); 548 accumulator->Add(":%d", line);
549 } else { 549 } else {
550 int function_start_pos = shared->start_position(); 550 int function_start_pos = shared->start_position();
551 int line = GetScriptLineNumberSafe(script, function_start_pos) + 1; 551 int line = GetScriptLineNumberSafe(script, function_start_pos) + 1;
552 accumulator->Add(":~%d", line); 552 accumulator->Add(":~%d", line);
553 } 553 }
554 554
555 accumulator->Add("] "); 555 accumulator->Add("] ");
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 ZoneList<StackFrame*> list(10); 814 ZoneList<StackFrame*> list(10);
815 for (StackFrameIterator it; !it.done(); it.Advance()) { 815 for (StackFrameIterator it; !it.done(); it.Advance()) {
816 StackFrame* frame = AllocateFrameCopy(it.frame()); 816 StackFrame* frame = AllocateFrameCopy(it.frame());
817 list.Add(frame); 817 list.Add(frame);
818 } 818 }
819 return list.ToVector(); 819 return list.ToVector();
820 } 820 }
821 821
822 822
823 } } // namespace v8::internal 823 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698