| 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 // TODO(turbofan): Revisit once we support deoptimization across the board. | 1157 // TODO(turbofan): Revisit once we support deoptimization across the board. |
| 1158 Code* code = LookupCode(); | 1158 Code* code = LookupCode(); |
| 1159 if (code->kind() == Code::BUILTIN || | 1159 if (code->kind() == Code::BUILTIN || |
| 1160 CannotDeoptFromAsmCode(code, function())) { | 1160 CannotDeoptFromAsmCode(code, function())) { |
| 1161 return JavaScriptFrame::GetFunctions(functions); | 1161 return JavaScriptFrame::GetFunctions(functions); |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 DisallowHeapAllocation no_gc; | 1164 DisallowHeapAllocation no_gc; |
| 1165 int deopt_index = Safepoint::kNoDeoptimizationIndex; | 1165 int deopt_index = Safepoint::kNoDeoptimizationIndex; |
| 1166 DeoptimizationInputData* const data = GetDeoptimizationData(&deopt_index); | 1166 DeoptimizationInputData* const data = GetDeoptimizationData(&deopt_index); |
| 1167 DCHECK(data != nullptr && deopt_index != Safepoint::kNoDeoptimizationIndex); | 1167 DCHECK_NOT_NULL(data); |
| 1168 DCHECK_NE(Safepoint::kNoDeoptimizationIndex, deopt_index); |
| 1168 FixedArray* const literal_array = data->LiteralArray(); | 1169 FixedArray* const literal_array = data->LiteralArray(); |
| 1169 | 1170 |
| 1170 TranslationIterator it(data->TranslationByteArray(), | 1171 TranslationIterator it(data->TranslationByteArray(), |
| 1171 data->TranslationIndex(deopt_index)->value()); | 1172 data->TranslationIndex(deopt_index)->value()); |
| 1172 Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next()); | 1173 Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next()); |
| 1173 DCHECK_EQ(Translation::BEGIN, opcode); | 1174 DCHECK_EQ(Translation::BEGIN, opcode); |
| 1174 it.Next(); // Skip frame count. | 1175 it.Next(); // Skip frame count. |
| 1175 int jsframe_count = it.Next(); | 1176 int jsframe_count = it.Next(); |
| 1176 | 1177 |
| 1177 // We insert the frames in reverse order because the frames | 1178 // We insert the frames in reverse order because the frames |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1792 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1792 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1793 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1793 list.Add(frame, zone); | 1794 list.Add(frame, zone); |
| 1794 } | 1795 } |
| 1795 return list.ToVector(); | 1796 return list.ToVector(); |
| 1796 } | 1797 } |
| 1797 | 1798 |
| 1798 | 1799 |
| 1799 } // namespace internal | 1800 } // namespace internal |
| 1800 } // namespace v8 | 1801 } // namespace v8 |
| OLD | NEW |