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

Side by Side Diff: src/runtime/runtime-wasm.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/runtime/runtime.h ('k') | src/wasm/ast-decoder.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/compiler/wasm-compiler.h" 9 #include "src/compiler/wasm-compiler.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 HandleScope scope(isolate); 122 HandleScope scope(isolate);
123 DCHECK_EQ(2, args.length()); 123 DCHECK_EQ(2, args.length());
124 CONVERT_SMI_ARG_CHECKED(lower, 0); 124 CONVERT_SMI_ARG_CHECKED(lower, 0);
125 CONVERT_SMI_ARG_CHECKED(upper, 1); 125 CONVERT_SMI_ARG_CHECKED(upper, 1);
126 126
127 const int32_t thrown_value = (upper << 16) | lower; 127 const int32_t thrown_value = (upper << 16) | lower;
128 128
129 return isolate->Throw(*isolate->factory()->NewNumberFromInt(thrown_value)); 129 return isolate->Throw(*isolate->factory()->NewNumberFromInt(thrown_value));
130 } 130 }
131 131
132 RUNTIME_FUNCTION(Runtime_WasmGetCaughtExceptionValue) {
133 HandleScope scope(isolate);
134 DCHECK_EQ(1, args.length());
135 Object* exception = args[0];
136 // The unwinder will only deliver exceptions to wasm if the exception is a
137 // Number or a Smi (which we have just converted to a Number.) This logic
138 // lives in Isolate::is_catchable_by_wasm(Object*).
139 CHECK(exception->IsNumber());
140 return exception;
141 }
142
143 } // namespace internal 132 } // namespace internal
144 } // namespace v8 133 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/wasm/ast-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698