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

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

Issue 2263953002: [wasm] Use the right context in the wasm-to-js wrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup the test. 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/compiler/wasm-compiler.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/asmjs/asm-js.h" 8 #include "src/asmjs/asm-js.h"
9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" 9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return isolate->heap()->exception(); 78 return isolate->heap()->exception();
79 } 79 }
80 DCHECK(function->is_compiled()); 80 DCHECK(function->is_compiled());
81 return function->code(); 81 return function->code();
82 } 82 }
83 83
84 RUNTIME_FUNCTION(Runtime_InstantiateAsmJs) { 84 RUNTIME_FUNCTION(Runtime_InstantiateAsmJs) {
85 HandleScope scope(isolate); 85 HandleScope scope(isolate);
86 DCHECK_EQ(args.length(), 4); 86 DCHECK_EQ(args.length(), 4);
87 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 87 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
88
titzer 2016/08/22 11:32:02 Spurious whitespace change
89 Handle<JSObject> foreign; 88 Handle<JSObject> foreign;
90 if (args[2]->IsJSObject()) { 89 if (args[2]->IsJSObject()) {
91 foreign = args.at<i::JSObject>(2); 90 foreign = args.at<i::JSObject>(2);
92 } 91 }
93 Handle<JSArrayBuffer> memory; 92 Handle<JSArrayBuffer> memory;
94 if (args[3]->IsJSArrayBuffer()) { 93 if (args[3]->IsJSArrayBuffer()) {
95 memory = args.at<i::JSArrayBuffer>(3); 94 memory = args.at<i::JSArrayBuffer>(3);
96 } 95 }
97 if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData() && 96 if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData() &&
98 AsmJs::IsStdlibValid(isolate, handle(function->shared()->asm_wasm_data()), 97 AsmJs::IsStdlibValid(isolate, handle(function->shared()->asm_wasm_data()),
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 DCHECK(is_valid_language_mode(args.smi_at(3))); 443 DCHECK(is_valid_language_mode(args.smi_at(3)));
445 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); 444 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3));
446 DCHECK(args[4]->IsSmi()); 445 DCHECK(args[4]->IsSmi());
447 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 446 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
448 isolate); 447 isolate);
449 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 448 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
450 language_mode, args.smi_at(4), args.smi_at(5)); 449 language_mode, args.smi_at(4), args.smi_at(5));
451 } 450 }
452 } // namespace internal 451 } // namespace internal
453 } // namespace v8 452 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698