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

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

Issue 2254803002: [wasm] Throw a type error if an I64 is exported to JS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove IfSuccess nodes for now. Created 4 years, 4 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') | test/mjsunit/wasm/calls.js » ('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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // Set new buffer to be wasm memory 103 // Set new buffer to be wasm memory
104 module_object->SetInternalField(kWasmMemArrayBuffer, *buffer); 104 module_object->SetInternalField(kWasmMemArrayBuffer, *buffer);
105 105
106 CHECK(wasm::UpdateWasmModuleMemory(module_object, old_mem_start, 106 CHECK(wasm::UpdateWasmModuleMemory(module_object, old_mem_start,
107 new_mem_start, old_size, new_size)); 107 new_mem_start, old_size, new_size));
108 108
109 return *isolate->factory()->NewNumberFromInt(old_size / 109 return *isolate->factory()->NewNumberFromInt(old_size /
110 wasm::WasmModule::kPageSize); 110 wasm::WasmModule::kPageSize);
111 } 111 }
112
113 RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) {
114 HandleScope scope(isolate);
115 DCHECK_EQ(0, args.length());
116 THROW_NEW_ERROR_RETURN_FAILURE(
117 isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError));
118 }
112 } // namespace internal 119 } // namespace internal
113 } // namespace v8 120 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/wasm/calls.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698