OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/frames.h" | 5 #include "src/frames.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 879 |
880 // Delegate to JS frame in absence of turbofan deoptimization. | 880 // Delegate to JS frame in absence of turbofan deoptimization. |
881 // TODO(turbofan): Revisit once we support deoptimization across the board. | 881 // TODO(turbofan): Revisit once we support deoptimization across the board. |
882 if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() && | 882 if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() && |
883 !FLAG_turbo_asm_deoptimization) { | 883 !FLAG_turbo_asm_deoptimization) { |
884 return JavaScriptFrame::Summarize(frames); | 884 return JavaScriptFrame::Summarize(frames); |
885 } | 885 } |
886 | 886 |
887 // We create the summary in reverse order because the frames | 887 // We create the summary in reverse order because the frames |
888 // in the deoptimization translation are ordered bottom-to-top. | 888 // in the deoptimization translation are ordered bottom-to-top. |
| 889 DisallowHeapAllocation no_gc; |
889 TranslatedState state(this); | 890 TranslatedState state(this); |
890 bool is_constructor = IsConstructor(); | 891 bool is_constructor = IsConstructor(); |
891 for (TranslatedFrame const& frame : state) { | 892 for (TranslatedFrame const& frame : state) { |
892 switch (frame.kind()) { | 893 switch (frame.kind()) { |
893 case TranslatedFrame::kFunction: { | 894 case TranslatedFrame::kFunction: { |
894 BailoutId const ast_id = frame.node_id(); | 895 BailoutId const ast_id = frame.node_id(); |
895 JSFunction* const function = frame.raw_function(); | 896 JSFunction* const function = frame.raw_function(); |
896 | 897 |
897 // Get the correct receiver in the optimized frame. | 898 // Get the correct receiver in the optimized frame. |
898 Object* receiver = frame.front().GetRawValue(); | 899 Object* receiver = frame.front().GetRawValue(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 DCHECK(functions->length() == 0); | 981 DCHECK(functions->length() == 0); |
981 DCHECK(is_optimized()); | 982 DCHECK(is_optimized()); |
982 | 983 |
983 // Delegate to JS frame in absence of turbofan deoptimization. | 984 // Delegate to JS frame in absence of turbofan deoptimization. |
984 // TODO(turbofan): Revisit once we support deoptimization across the board. | 985 // TODO(turbofan): Revisit once we support deoptimization across the board. |
985 if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() && | 986 if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() && |
986 !FLAG_turbo_asm_deoptimization) { | 987 !FLAG_turbo_asm_deoptimization) { |
987 return JavaScriptFrame::GetFunctions(functions); | 988 return JavaScriptFrame::GetFunctions(functions); |
988 } | 989 } |
989 | 990 |
| 991 DisallowHeapAllocation no_gc; |
990 TranslatedState state(this); | 992 TranslatedState state(this); |
991 for (TranslatedFrame const& frame : state) { | 993 for (TranslatedFrame const& frame : state) { |
992 if (frame.kind() == TranslatedFrame::kFunction) { | 994 if (frame.kind() == TranslatedFrame::kFunction) { |
993 functions->Add(frame.raw_function()); | 995 functions->Add(frame.raw_function()); |
994 } | 996 } |
995 } | 997 } |
996 } | 998 } |
997 | 999 |
998 | 1000 |
999 int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const { | 1001 int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const { |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1440 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1439 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1441 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1440 list.Add(frame, zone); | 1442 list.Add(frame, zone); |
1441 } | 1443 } |
1442 return list.ToVector(); | 1444 return list.ToVector(); |
1443 } | 1445 } |
1444 | 1446 |
1445 | 1447 |
1446 } // namespace internal | 1448 } // namespace internal |
1447 } // namespace v8 | 1449 } // namespace v8 |
OLD | NEW |