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

Side by Side Diff: src/frames.cc

Issue 6332019: Change an invalid assert (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 | « no previous file | test/cctest/cctest.status » ('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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 if (code_->kind() == Code::FUNCTION) PrintF(" NON-OPT"); 688 if (code_->kind() == Code::FUNCTION) PrintF(" NON-OPT");
689 if (code_->kind() == Code::OPTIMIZED_FUNCTION) PrintF(" OPT"); 689 if (code_->kind() == Code::OPTIMIZED_FUNCTION) PrintF(" OPT");
690 PrintF("\npc: %d\n", offset_); 690 PrintF("\npc: %d\n", offset_);
691 } 691 }
692 692
693 693
694 void OptimizedFrame::Summarize(List<FrameSummary>* frames) { 694 void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
695 ASSERT(frames->length() == 0); 695 ASSERT(frames->length() == 0);
696 ASSERT(is_optimized()); 696 ASSERT(is_optimized());
697 697
698 int deopt_index = AstNode::kNoNumber; 698 int deopt_index = Safepoint::kNoDeoptimizationIndex;
699 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index); 699 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index);
700 700
701 // BUG(3243555): Since we don't have a lazy-deopt registered at 701 // BUG(3243555): Since we don't have a lazy-deopt registered at
702 // throw-statements, we can't use the translation at the call-site of 702 // throw-statements, we can't use the translation at the call-site of
703 // throw. An entry with no deoptimization index indicates a call-site 703 // throw. An entry with no deoptimization index indicates a call-site
704 // without a lazy-deopt. As a consequence we are not allowed to inline 704 // without a lazy-deopt. As a consequence we are not allowed to inline
705 // functions containing throw. 705 // functions containing throw.
706 if (deopt_index == Safepoint::kNoDeoptimizationIndex) { 706 if (deopt_index == Safepoint::kNoDeoptimizationIndex) {
707 JavaScriptFrame::Summarize(frames); 707 JavaScriptFrame::Summarize(frames);
708 return; 708 return;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 // back to a slow search in this case to find the original optimized 786 // back to a slow search in this case to find the original optimized
787 // code object. 787 // code object.
788 if (!code->contains(pc())) { 788 if (!code->contains(pc())) {
789 code = PcToCodeCache::GcSafeFindCodeForPc(pc()); 789 code = PcToCodeCache::GcSafeFindCodeForPc(pc());
790 } 790 }
791 ASSERT(code != NULL); 791 ASSERT(code != NULL);
792 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION); 792 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION);
793 793
794 SafepointEntry safepoint_entry = code->GetSafepointEntry(pc()); 794 SafepointEntry safepoint_entry = code->GetSafepointEntry(pc());
795 *deopt_index = safepoint_entry.deoptimization_index(); 795 *deopt_index = safepoint_entry.deoptimization_index();
796 ASSERT(*deopt_index != AstNode::kNoNumber); 796 ASSERT(*deopt_index != Safepoint::kNoDeoptimizationIndex);
797 797
798 return DeoptimizationInputData::cast(code->deoptimization_data()); 798 return DeoptimizationInputData::cast(code->deoptimization_data());
799 } 799 }
800 800
801 801
802 void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) { 802 void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
803 ASSERT(functions->length() == 0); 803 ASSERT(functions->length() == 0);
804 ASSERT(is_optimized()); 804 ASSERT(is_optimized());
805 805
806 int deopt_index = AstNode::kNoNumber; 806 int deopt_index = Safepoint::kNoDeoptimizationIndex;
807 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index); 807 DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index);
808 808
809 TranslationIterator it(data->TranslationByteArray(), 809 TranslationIterator it(data->TranslationByteArray(),
810 data->TranslationIndex(deopt_index)->value()); 810 data->TranslationIndex(deopt_index)->value());
811 Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next()); 811 Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next());
812 ASSERT(opcode == Translation::BEGIN); 812 ASSERT(opcode == Translation::BEGIN);
813 int frame_count = it.Next(); 813 int frame_count = it.Next();
814 814
815 // We insert the frames in reverse order because the frames 815 // We insert the frames in reverse order because the frames
816 // in the deoptimization translation are ordered bottom-to-top. 816 // in the deoptimization translation are ordered bottom-to-top.
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 ZoneList<StackFrame*> list(10); 1223 ZoneList<StackFrame*> list(10);
1224 for (StackFrameIterator it; !it.done(); it.Advance()) { 1224 for (StackFrameIterator it; !it.done(); it.Advance()) {
1225 StackFrame* frame = AllocateFrameCopy(it.frame()); 1225 StackFrame* frame = AllocateFrameCopy(it.frame());
1226 list.Add(frame); 1226 list.Add(frame);
1227 } 1227 }
1228 return list.ToVector(); 1228 return list.ToVector();
1229 } 1229 }
1230 1230
1231 1231
1232 } } // namespace v8::internal 1232 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698