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

Side by Side Diff: src/frames.cc

Issue 2522953002: [wasm] Move asm.js offset table to compiled module (Closed)
Patch Set: rebase Created 4 years 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 | « no previous file | src/messages.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"
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 } 1525 }
1526 1526
1527 Script* WasmFrame::script() const { 1527 Script* WasmFrame::script() const {
1528 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); 1528 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate());
1529 return *wasm::GetScript(instance); 1529 return *wasm::GetScript(instance);
1530 } 1530 }
1531 1531
1532 int WasmFrame::position() const { 1532 int WasmFrame::position() const {
1533 int position = StandardFrame::position(); 1533 int position = StandardFrame::position();
1534 if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) { 1534 if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) {
1535 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); 1535 Handle<WasmCompiledModule> compiled_module(
1536 position = 1536 WasmInstanceObject::cast(wasm_instance())->get_compiled_module(),
1537 wasm::GetAsmWasmSourcePosition(instance, function_index(), position); 1537 isolate());
1538 DCHECK_LE(0, position);
1539 position = WasmCompiledModule::GetAsmJsSourcePosition(
1540 compiled_module, function_index(), static_cast<uint32_t>(position));
1538 } 1541 }
1539 return position; 1542 return position;
1540 } 1543 }
1541 1544
1542 int WasmFrame::LookupExceptionHandlerInTable(int* stack_slots) { 1545 int WasmFrame::LookupExceptionHandlerInTable(int* stack_slots) {
1543 DCHECK_NOT_NULL(stack_slots); 1546 DCHECK_NOT_NULL(stack_slots);
1544 Code* code = LookupCode(); 1547 Code* code = LookupCode();
1545 HandlerTable* table = HandlerTable::cast(code->handler_table()); 1548 HandlerTable* table = HandlerTable::cast(code->handler_table());
1546 int pc_offset = static_cast<int>(pc() - code->entry()); 1549 int pc_offset = static_cast<int>(pc() - code->entry());
1547 *stack_slots = code->stack_slots(); 1550 *stack_slots = code->stack_slots();
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1982 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1980 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1983 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1981 list.Add(frame, zone); 1984 list.Add(frame, zone);
1982 } 1985 }
1983 return list.ToVector(); 1986 return list.ToVector();
1984 } 1987 }
1985 1988
1986 1989
1987 } // namespace internal 1990 } // namespace internal
1988 } // namespace v8 1991 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698