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

Side by Side Diff: test/cctest/wasm/wasm-run-utils.h

Issue 2555243002: [wasm] Fix location for error in asm.js ToNumber conversion (Closed)
Patch Set: Fix gc error by storing callee_pc_address 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 | « src/wasm/wasm-objects.cc ('k') | test/mjsunit/wasm/asm-wasm-exception-in-tonumber.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 #ifndef WASM_RUN_UTILS_H 5 #ifndef WASM_RUN_UTILS_H
6 #define WASM_RUN_UTILS_H 6 #define WASM_RUN_UTILS_H
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 CHECK_EQ(index, static_cast<uint32_t>(interpreter_index)); 192 CHECK_EQ(index, static_cast<uint32_t>(interpreter_index));
193 } 193 }
194 DCHECK_LT(index, kMaxFunctions); // limited for testing. 194 DCHECK_LT(index, kMaxFunctions); // limited for testing.
195 return index; 195 return index;
196 } 196 }
197 197
198 uint32_t AddJsFunction(FunctionSig* sig, const char* source) { 198 uint32_t AddJsFunction(FunctionSig* sig, const char* source) {
199 Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle( 199 Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
200 *v8::Local<v8::Function>::Cast(CompileRun(source)))); 200 *v8::Local<v8::Function>::Cast(CompileRun(source))));
201 uint32_t index = AddFunction(sig, Handle<Code>::null()); 201 uint32_t index = AddFunction(sig, Handle<Code>::null());
202 Handle<Code> code = 202 Handle<Code> code = CompileWasmToJSWrapper(
203 CompileWasmToJSWrapper(isolate_, jsfunc, sig, index, 203 isolate_, jsfunc, sig, index, Handle<String>::null(),
204 Handle<String>::null(), Handle<String>::null()); 204 Handle<String>::null(), module->origin);
205 instance->function_code[index] = code; 205 instance->function_code[index] = code;
206 return index; 206 return index;
207 } 207 }
208 208
209 Handle<JSFunction> WrapCode(uint32_t index) { 209 Handle<JSFunction> WrapCode(uint32_t index) {
210 // Wrap the code so it can be called as a JS function. 210 // Wrap the code so it can be called as a JS function.
211 Handle<WasmInstanceObject> instance_obj(0, isolate_); 211 Handle<WasmInstanceObject> instance_obj(0, isolate_);
212 Handle<Code> code = instance->function_code[index]; 212 Handle<Code> code = instance->function_code[index];
213 WasmJs::InstallWasmMapsIfNeeded(isolate_, isolate_->native_context()); 213 WasmJs::InstallWasmMapsIfNeeded(isolate_, isolate_->native_context());
214 Handle<Code> ret_code = 214 Handle<Code> ret_code =
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 void RunWasm_##name(WasmExecutionMode execution_mode) 797 void RunWasm_##name(WasmExecutionMode execution_mode)
798 798
799 #define WASM_EXEC_COMPILED_TEST(name) \ 799 #define WASM_EXEC_COMPILED_TEST(name) \
800 void RunWasm_##name(WasmExecutionMode execution_mode); \ 800 void RunWasm_##name(WasmExecutionMode execution_mode); \
801 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ 801 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \
802 void RunWasm_##name(WasmExecutionMode execution_mode) 802 void RunWasm_##name(WasmExecutionMode execution_mode)
803 803
804 } // namespace 804 } // namespace
805 805
806 #endif 806 #endif
OLDNEW
« no previous file with comments | « src/wasm/wasm-objects.cc ('k') | test/mjsunit/wasm/asm-wasm-exception-in-tonumber.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698