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 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 Object* WasmFrame::wasm_obj() { | 1341 Object* WasmFrame::wasm_obj() { |
1342 FixedArray* deopt_data = LookupCode()->deoptimization_data(); | 1342 FixedArray* deopt_data = LookupCode()->deoptimization_data(); |
1343 DCHECK(deopt_data->length() == 2); | 1343 DCHECK(deopt_data->length() == 2); |
1344 return deopt_data->get(0); | 1344 return deopt_data->get(0); |
1345 } | 1345 } |
1346 | 1346 |
1347 uint32_t WasmFrame::function_index() { | 1347 uint32_t WasmFrame::function_index() { |
1348 FixedArray* deopt_data = LookupCode()->deoptimization_data(); | 1348 FixedArray* deopt_data = LookupCode()->deoptimization_data(); |
1349 DCHECK(deopt_data->length() == 2); | 1349 DCHECK(deopt_data->length() == 2); |
1350 Object* func_index_obj = deopt_data->get(1); | 1350 Object* func_index_obj = deopt_data->get(1); |
1351 if (func_index_obj->IsUndefined()) return static_cast<uint32_t>(-1); | 1351 if (func_index_obj->IsUndefined(isolate())) return static_cast<uint32_t>(-1); |
1352 if (func_index_obj->IsSmi()) return Smi::cast(func_index_obj)->value(); | 1352 if (func_index_obj->IsSmi()) return Smi::cast(func_index_obj)->value(); |
1353 DCHECK(func_index_obj->IsHeapNumber()); | 1353 DCHECK(func_index_obj->IsHeapNumber()); |
1354 uint32_t val = static_cast<uint32_t>(-1); | 1354 uint32_t val = static_cast<uint32_t>(-1); |
1355 func_index_obj->ToUint32(&val); | 1355 func_index_obj->ToUint32(&val); |
1356 DCHECK(val != static_cast<uint32_t>(-1)); | 1356 DCHECK(val != static_cast<uint32_t>(-1)); |
1357 return val; | 1357 return val; |
1358 } | 1358 } |
1359 | 1359 |
1360 namespace { | 1360 namespace { |
1361 | 1361 |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1787 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1788 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1788 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1789 list.Add(frame, zone); | 1789 list.Add(frame, zone); |
1790 } | 1790 } |
1791 return list.ToVector(); | 1791 return list.ToVector(); |
1792 } | 1792 } |
1793 | 1793 |
1794 | 1794 |
1795 } // namespace internal | 1795 } // namespace internal |
1796 } // namespace v8 | 1796 } // namespace v8 |
OLD | NEW |