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

Side by Side Diff: src/frames.cc

Issue 2383613002: Revert of [WASM] Implements catch for the wasm low level exception mechanism. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 2 months 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/frames.h ('k') | src/isolate.h » ('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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 DCHECK(deopt_data->length() == 2); 1470 DCHECK(deopt_data->length() == 2);
1471 return Smi::cast(deopt_data->get(1))->value(); 1471 return Smi::cast(deopt_data->get(1))->value();
1472 } 1472 }
1473 1473
1474 Script* WasmFrame::script() const { 1474 Script* WasmFrame::script() const {
1475 Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate()); 1475 Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate());
1476 Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(wasm); 1476 Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(wasm);
1477 return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index()); 1477 return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index());
1478 } 1478 }
1479 1479
1480 int WasmFrame::LookupExceptionHandlerInTable(int* stack_slots) {
1481 DCHECK_NOT_NULL(stack_slots);
1482 Code* code = LookupCode();
1483 HandlerTable* table = HandlerTable::cast(code->handler_table());
1484 int pc_offset = static_cast<int>(pc() - code->entry());
1485 *stack_slots = code->stack_slots();
1486 return table->LookupReturn(pc_offset);
1487 }
1488
1489 namespace { 1480 namespace {
1490 1481
1491 1482
1492 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared, 1483 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared,
1493 Code* code) { 1484 Code* code) {
1494 if (FLAG_max_stack_trace_source_length != 0 && code != NULL) { 1485 if (FLAG_max_stack_trace_source_length != 0 && code != NULL) {
1495 std::ostringstream os; 1486 std::ostringstream os;
1496 os << "--------- s o u r c e c o d e ---------\n" 1487 os << "--------- s o u r c e c o d e ---------\n"
1497 << SourceCodeOf(shared, FLAG_max_stack_trace_source_length) 1488 << SourceCodeOf(shared, FLAG_max_stack_trace_source_length)
1498 << "\n-----------------------------------------\n"; 1489 << "\n-----------------------------------------\n";
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1908 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1918 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1909 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1919 list.Add(frame, zone); 1910 list.Add(frame, zone);
1920 } 1911 }
1921 return list.ToVector(); 1912 return list.ToVector();
1922 } 1913 }
1923 1914
1924 1915
1925 } // namespace internal 1916 } // namespace internal
1926 } // namespace v8 1917 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698