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/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 return DeoptimizationInputData::cast(code->deoptimization_data()); | 1139 return DeoptimizationInputData::cast(code->deoptimization_data()); |
1140 } | 1140 } |
1141 | 1141 |
1142 | 1142 |
1143 void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const { | 1143 void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const { |
1144 DCHECK(functions->length() == 0); | 1144 DCHECK(functions->length() == 0); |
1145 DCHECK(is_optimized()); | 1145 DCHECK(is_optimized()); |
1146 | 1146 |
1147 // Delegate to JS frame in absence of turbofan deoptimization. | 1147 // Delegate to JS frame in absence of turbofan deoptimization. |
1148 // TODO(turbofan): Revisit once we support deoptimization across the board. | 1148 // TODO(turbofan): Revisit once we support deoptimization across the board. |
1149 if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() && | 1149 Code* code = LookupCode(); |
1150 !FLAG_turbo_asm_deoptimization) { | 1150 if (code->kind() == Code::BUILTIN || |
| 1151 CannotDeoptFromAsmCode(code, function())) { |
1151 return JavaScriptFrame::GetFunctions(functions); | 1152 return JavaScriptFrame::GetFunctions(functions); |
1152 } | 1153 } |
1153 | 1154 |
1154 DisallowHeapAllocation no_gc; | 1155 DisallowHeapAllocation no_gc; |
1155 int deopt_index = Safepoint::kNoDeoptimizationIndex; | 1156 int deopt_index = Safepoint::kNoDeoptimizationIndex; |
1156 DeoptimizationInputData* const data = GetDeoptimizationData(&deopt_index); | 1157 DeoptimizationInputData* const data = GetDeoptimizationData(&deopt_index); |
1157 FixedArray* const literal_array = data->LiteralArray(); | 1158 FixedArray* const literal_array = data->LiteralArray(); |
1158 | 1159 |
1159 TranslationIterator it(data->TranslationByteArray(), | 1160 TranslationIterator it(data->TranslationByteArray(), |
1160 data->TranslationIndex(deopt_index)->value()); | 1161 data->TranslationIndex(deopt_index)->value()); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1738 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1738 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1739 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1739 list.Add(frame, zone); | 1740 list.Add(frame, zone); |
1740 } | 1741 } |
1741 return list.ToVector(); | 1742 return list.ToVector(); |
1742 } | 1743 } |
1743 | 1744 |
1744 | 1745 |
1745 } // namespace internal | 1746 } // namespace internal |
1746 } // namespace v8 | 1747 } // namespace v8 |
OLD | NEW |