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

Side by Side Diff: src/frames.cc

Issue 6532091: Merge bleeding_edge revision (5922, 5934] to isolates branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/flag-definitions.h ('k') | src/hydrogen.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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 656
657 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) { 657 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) {
658 ASSERT(functions->length() == 0); 658 ASSERT(functions->length() == 0);
659 functions->Add(JSFunction::cast(function())); 659 functions->Add(JSFunction::cast(function()));
660 } 660 }
661 661
662 662
663 void JavaScriptFrame::Summarize(List<FrameSummary>* functions) { 663 void JavaScriptFrame::Summarize(List<FrameSummary>* functions) {
664 ASSERT(functions->length() == 0); 664 ASSERT(functions->length() == 0);
665 Code* code_pointer = LookupCode(Isolate::Current()); 665 Code* code_pointer = LookupCode(Isolate::Current());
666 int offset = pc() - code_pointer->address(); 666 int offset = static_cast<int>(pc() - code_pointer->address());
667 FrameSummary summary(receiver(), 667 FrameSummary summary(receiver(),
668 JSFunction::cast(function()), 668 JSFunction::cast(function()),
669 code_pointer, 669 code_pointer,
670 offset, 670 offset,
671 IsConstructor()); 671 IsConstructor());
672 functions->Add(summary); 672 functions->Add(summary);
673 } 673 }
674 674
675 675
676 void FrameSummary::Print() { 676 void FrameSummary::Print() {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // The code object may have been replaced by lazy deoptimization. Fall 780 // The code object may have been replaced by lazy deoptimization. Fall
781 // back to a slow search in this case to find the original optimized 781 // back to a slow search in this case to find the original optimized
782 // code object. 782 // code object.
783 if (!code->contains(pc())) { 783 if (!code->contains(pc())) {
784 code = Isolate::Current()->pc_to_code_cache()->GcSafeFindCodeForPc(pc()); 784 code = Isolate::Current()->pc_to_code_cache()->GcSafeFindCodeForPc(pc());
785 } 785 }
786 ASSERT(code != NULL); 786 ASSERT(code != NULL);
787 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION); 787 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION);
788 788
789 SafepointTable table(code); 789 SafepointTable table(code);
790 unsigned pc_offset = pc() - code->instruction_start(); 790 unsigned pc_offset = static_cast<unsigned>(pc() - code->instruction_start());
791 for (unsigned i = 0; i < table.length(); i++) { 791 for (unsigned i = 0; i < table.length(); i++) {
792 if (table.GetPcOffset(i) == pc_offset) { 792 if (table.GetPcOffset(i) == pc_offset) {
793 *deopt_index = table.GetDeoptimizationIndex(i); 793 *deopt_index = table.GetDeoptimizationIndex(i);
794 break; 794 break;
795 } 795 }
796 } 796 }
797 ASSERT(*deopt_index != AstNode::kNoNumber); 797 ASSERT(*deopt_index != AstNode::kNoNumber);
798 798
799 return DeoptimizationInputData::cast(code->deoptimization_data()); 799 return DeoptimizationInputData::cast(code->deoptimization_data());
800 } 800 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 ZoneList<StackFrame*> list(10); 1231 ZoneList<StackFrame*> list(10);
1232 for (StackFrameIterator it; !it.done(); it.Advance()) { 1232 for (StackFrameIterator it; !it.done(); it.Advance()) {
1233 StackFrame* frame = AllocateFrameCopy(it.frame()); 1233 StackFrame* frame = AllocateFrameCopy(it.frame());
1234 list.Add(frame); 1234 list.Add(frame);
1235 } 1235 }
1236 return list.ToVector(); 1236 return list.ToVector();
1237 } 1237 }
1238 1238
1239 1239
1240 } } // namespace v8::internal 1240 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698