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

Side by Side Diff: src/frames.cc

Issue 2490663002: [wasm] Move all heap-allocated WASM structures into wasm-objects.h. (Closed)
Patch Set: [wasm] Move all heap-allocated WASM structures into wasm-objects.h. Created 4 years, 1 month 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
« no previous file with comments | « src/debug/debug.cc ('k') | src/runtime/runtime-debug.cc » ('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 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 <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
11 #include "src/deoptimizer.h" 11 #include "src/deoptimizer.h"
12 #include "src/frames-inl.h" 12 #include "src/frames-inl.h"
13 #include "src/full-codegen/full-codegen.h" 13 #include "src/full-codegen/full-codegen.h"
14 #include "src/register-configuration.h" 14 #include "src/register-configuration.h"
15 #include "src/safepoint-table.h" 15 #include "src/safepoint-table.h"
16 #include "src/string-stream.h" 16 #include "src/string-stream.h"
17 #include "src/vm-state-inl.h" 17 #include "src/vm-state-inl.h"
18 #include "src/wasm/wasm-debug.h"
19 #include "src/wasm/wasm-module.h" 18 #include "src/wasm/wasm-module.h"
19 #include "src/wasm/wasm-objects.h"
20 20
21 namespace v8 { 21 namespace v8 {
22 namespace internal { 22 namespace internal {
23 23
24 ReturnAddressLocationResolver 24 ReturnAddressLocationResolver
25 StackFrame::return_address_location_resolver_ = NULL; 25 StackFrame::return_address_location_resolver_ = NULL;
26 26
27 27
28 // Iterator that supports traversing the stack handlers of a 28 // Iterator that supports traversing the stack handlers of a
29 // particular frame. Needs to know the top of the handler chain. 29 // particular frame. Needs to know the top of the handler chain.
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 FixedArray* deopt_data = LookupCode()->deoptimization_data(); 1513 FixedArray* deopt_data = LookupCode()->deoptimization_data();
1514 DCHECK(deopt_data->length() == 2); 1514 DCHECK(deopt_data->length() == 2);
1515 return Smi::cast(deopt_data->get(1))->value(); 1515 return Smi::cast(deopt_data->get(1))->value();
1516 } 1516 }
1517 1517
1518 Script* WasmFrame::script() const { 1518 Script* WasmFrame::script() const {
1519 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); 1519 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate());
1520 if (wasm::WasmIsAsmJs(*instance, isolate())) { 1520 if (wasm::WasmIsAsmJs(*instance, isolate())) {
1521 return *wasm::GetAsmWasmScript(instance); 1521 return *wasm::GetAsmWasmScript(instance);
1522 } 1522 }
1523 Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(instance); 1523 Handle<WasmDebugInfo> debug_info = wasm::GetDebugInfo(instance);
1524 return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index()); 1524 return WasmDebugInfo::GetFunctionScript(debug_info, function_index());
1525 } 1525 }
1526 1526
1527 int WasmFrame::position() const { 1527 int WasmFrame::position() const {
1528 int position = StandardFrame::position(); 1528 int position = StandardFrame::position();
1529 if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) { 1529 if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) {
1530 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); 1530 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate());
1531 position = 1531 position =
1532 wasm::GetAsmWasmSourcePosition(instance, function_index(), position); 1532 wasm::GetAsmWasmSourcePosition(instance, function_index(), position);
1533 } 1533 }
1534 return position; 1534 return position;
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1974 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1975 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1975 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1976 list.Add(frame, zone); 1976 list.Add(frame, zone);
1977 } 1977 }
1978 return list.ToVector(); 1978 return list.ToVector();
1979 } 1979 }
1980 1980
1981 1981
1982 } // namespace internal 1982 } // namespace internal
1983 } // namespace v8 1983 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698