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

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

Issue 2958283003: [wasm] Naming convention: get_origin() -> origin() (Closed)
Patch Set: Created 3 years, 5 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/wasm/wasm-module.h ('k') | no next file » | 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 <setjmp.h> 8 #include <setjmp.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 DCHECK_LT(index, kMaxFunctions); // limited for testing. 208 DCHECK_LT(index, kMaxFunctions); // limited for testing.
209 return index; 209 return index;
210 } 210 }
211 211
212 uint32_t AddJsFunction(FunctionSig* sig, const char* source) { 212 uint32_t AddJsFunction(FunctionSig* sig, const char* source) {
213 Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle( 213 Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
214 *v8::Local<v8::Function>::Cast(CompileRun(source)))); 214 *v8::Local<v8::Function>::Cast(CompileRun(source))));
215 uint32_t index = AddFunction(sig, Handle<Code>::null(), nullptr); 215 uint32_t index = AddFunction(sig, Handle<Code>::null(), nullptr);
216 Handle<Code> code = CompileWasmToJSWrapper( 216 Handle<Code> code = CompileWasmToJSWrapper(
217 isolate_, jsfunc, sig, index, Handle<String>::null(), 217 isolate_, jsfunc, sig, index, Handle<String>::null(),
218 Handle<String>::null(), module->get_origin()); 218 Handle<String>::null(), module->origin());
219 instance->function_code[index] = code; 219 instance->function_code[index] = code;
220 return index; 220 return index;
221 } 221 }
222 222
223 Handle<JSFunction> WrapCode(uint32_t index) { 223 Handle<JSFunction> WrapCode(uint32_t index) {
224 // Wrap the code so it can be called as a JS function. 224 // Wrap the code so it can be called as a JS function.
225 Handle<Code> code = instance->function_code[index]; 225 Handle<Code> code = instance->function_code[index];
226 Handle<Code> ret_code = 226 Handle<Code> ret_code =
227 compiler::CompileJSToWasmWrapper(isolate_, &module_, code, index); 227 compiler::CompileJSToWasmWrapper(isolate_, &module_, code, index);
228 Handle<JSFunction> ret = WasmExportedFunction::New( 228 Handle<JSFunction> ret = WasmExportedFunction::New(
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 if (trap_handler::UseTrapHandler()) { \ 837 if (trap_handler::UseTrapHandler()) { \
838 return; \ 838 return; \
839 } \ 839 } \
840 RunWasm_##name(kExecuteInterpreted); \ 840 RunWasm_##name(kExecuteInterpreted); \
841 } \ 841 } \
842 void RunWasm_##name(WasmExecutionMode execution_mode) 842 void RunWasm_##name(WasmExecutionMode execution_mode)
843 843
844 } // namespace 844 } // namespace
845 845
846 #endif 846 #endif
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698