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

Side by Side Diff: src/runtime/runtime-wasm.cc

Issue 2148743004: WIP: wasm oob trap handling experiments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undoing spurious changes Created 3 years, 11 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-internal.cc ('k') | src/wasm/wasm-js.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"
11 #include "src/debug/debug.h" 11 #include "src/debug/debug.h"
12 #include "src/factory.h" 12 #include "src/factory.h"
13 #include "src/frames-inl.h" 13 #include "src/frames-inl.h"
14 #include "src/objects-inl.h" 14 #include "src/objects-inl.h"
15 #include "src/v8memory.h" 15 #include "src/v8memory.h"
16 #include "src/wasm/wasm-module.h" 16 #include "src/wasm/wasm-module.h"
17 17
18 namespace v8 { 18 namespace v8 {
19 namespace internal { 19 namespace internal {
20 20
21 namespace { 21 namespace {
22 const int kWasmMemArrayBuffer = 2; 22 const int kWasmMemArrayBuffer = 2;
23 } 23 }
24 24
25 namespace wasm {
26 wasm::TrapHandlerData* gTrapHandlers = nullptr;
27 }
28
25 RUNTIME_FUNCTION(Runtime_WasmGrowMemory) { 29 RUNTIME_FUNCTION(Runtime_WasmGrowMemory) {
26 HandleScope scope(isolate); 30 HandleScope scope(isolate);
27 DCHECK_EQ(1, args.length()); 31 DCHECK_EQ(1, args.length());
28 uint32_t delta_pages = 0; 32 uint32_t delta_pages = 0;
29 CHECK(args[0]->ToUint32(&delta_pages)); 33 CHECK(args[0]->ToUint32(&delta_pages));
30 Handle<JSObject> module_object; 34 Handle<JSObject> module_object;
31 35
32 { 36 {
33 // Get the module JSObject 37 // Get the module JSObject
34 DisallowHeapAllocation no_allocation; 38 DisallowHeapAllocation no_allocation;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 115 }
112 116
113 RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) { 117 RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) {
114 HandleScope scope(isolate); 118 HandleScope scope(isolate);
115 DCHECK_EQ(0, args.length()); 119 DCHECK_EQ(0, args.length());
116 THROW_NEW_ERROR_RETURN_FAILURE( 120 THROW_NEW_ERROR_RETURN_FAILURE(
117 isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError)); 121 isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError));
118 } 122 }
119 } // namespace internal 123 } // namespace internal
120 } // namespace v8 124 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698