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

Side by Side Diff: src/frames.cc

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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
« src/ast.cc ('K') | « src/factory.cc ('k') | src/gdb-jit.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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 if (code_->kind() == Code::FUNCTION) PrintF(" NON-OPT"); 696 if (code_->kind() == Code::FUNCTION) PrintF(" NON-OPT");
697 if (code_->kind() == Code::OPTIMIZED_FUNCTION) PrintF(" OPT"); 697 if (code_->kind() == Code::OPTIMIZED_FUNCTION) PrintF(" OPT");
698 PrintF("\npc: %d\n", offset_); 698 PrintF("\npc: %d\n", offset_);
699 } 699 }
700 700
701 701
702 void OptimizedFrame::Summarize(List<FrameSummary>* frames) { 702 void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
703 ASSERT(frames->length() == 0); 703 ASSERT(frames->length() == 0);
704 ASSERT(is_optimized()); 704 ASSERT(is_optimized());
705 705
706 int deopt_index = AstNode::kNoNumber; 706 int deopt_index = Safepoint::kNoDeoptimizationIndex;
707 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index); 707 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index);
708 708
709 // BUG(3243555): Since we don't have a lazy-deopt registered at 709 // BUG(3243555): Since we don't have a lazy-deopt registered at
710 // throw-statements, we can't use the translation at the call-site of 710 // throw-statements, we can't use the translation at the call-site of
711 // throw. An entry with no deoptimization index indicates a call-site 711 // throw. An entry with no deoptimization index indicates a call-site
712 // without a lazy-deopt. As a consequence we are not allowed to inline 712 // without a lazy-deopt. As a consequence we are not allowed to inline
713 // functions containing throw. 713 // functions containing throw.
714 if (deopt_index == Safepoint::kNoDeoptimizationIndex) { 714 if (deopt_index == Safepoint::kNoDeoptimizationIndex) {
715 JavaScriptFrame::Summarize(frames); 715 JavaScriptFrame::Summarize(frames);
716 return; 716 return;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 // back to a slow search in this case to find the original optimized 794 // back to a slow search in this case to find the original optimized
795 // code object. 795 // code object.
796 if (!code->contains(pc())) { 796 if (!code->contains(pc())) {
797 code = Isolate::Current()->pc_to_code_cache()->GcSafeFindCodeForPc(pc()); 797 code = Isolate::Current()->pc_to_code_cache()->GcSafeFindCodeForPc(pc());
798 } 798 }
799 ASSERT(code != NULL); 799 ASSERT(code != NULL);
800 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION); 800 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION);
801 801
802 SafepointEntry safepoint_entry = code->GetSafepointEntry(pc()); 802 SafepointEntry safepoint_entry = code->GetSafepointEntry(pc());
803 *deopt_index = safepoint_entry.deoptimization_index(); 803 *deopt_index = safepoint_entry.deoptimization_index();
804 ASSERT(*deopt_index != AstNode::kNoNumber); 804 ASSERT(*deopt_index != Safepoint::kNoDeoptimizationIndex);
805 805
806 return DeoptimizationInputData::cast(code->deoptimization_data()); 806 return DeoptimizationInputData::cast(code->deoptimization_data());
807 } 807 }
808 808
809 809
810 void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) { 810 void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
811 ASSERT(functions->length() == 0); 811 ASSERT(functions->length() == 0);
812 ASSERT(is_optimized()); 812 ASSERT(is_optimized());
813 813
814 int deopt_index = AstNode::kNoNumber; 814 int deopt_index = Safepoint::kNoDeoptimizationIndex;
815 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index); 815 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index);
816 816
817 TranslationIterator it(data->TranslationByteArray(), 817 TranslationIterator it(data->TranslationByteArray(),
818 data->TranslationIndex(deopt_index)->value()); 818 data->TranslationIndex(deopt_index)->value());
819 Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next()); 819 Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next());
820 ASSERT(opcode == Translation::BEGIN); 820 ASSERT(opcode == Translation::BEGIN);
821 int frame_count = it.Next(); 821 int frame_count = it.Next();
822 822
823 // We insert the frames in reverse order because the frames 823 // We insert the frames in reverse order because the frames
824 // in the deoptimization translation are ordered bottom-to-top. 824 // in the deoptimization translation are ordered bottom-to-top.
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 ZoneList<StackFrame*> list(10); 1238 ZoneList<StackFrame*> list(10);
1239 for (StackFrameIterator it; !it.done(); it.Advance()) { 1239 for (StackFrameIterator it; !it.done(); it.Advance()) {
1240 StackFrame* frame = AllocateFrameCopy(it.frame()); 1240 StackFrame* frame = AllocateFrameCopy(it.frame());
1241 list.Add(frame); 1241 list.Add(frame);
1242 } 1242 }
1243 return list.ToVector(); 1243 return list.ToVector();
1244 } 1244 }
1245 1245
1246 1246
1247 } } // namespace v8::internal 1247 } } // namespace v8::internal
OLDNEW
« src/ast.cc ('K') | « src/factory.cc ('k') | src/gdb-jit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698