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: src/runtime/runtime-compiler.cc

Issue 2251433002: [wasm] asm.js - Check stdlib.NaN is valid, prepare for the rest. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix 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
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.h" 9 #include "src/compiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 86 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
87 87
88 Handle<JSObject> foreign; 88 Handle<JSObject> foreign;
89 if (args[2]->IsJSObject()) { 89 if (args[2]->IsJSObject()) {
90 foreign = args.at<i::JSObject>(2); 90 foreign = args.at<i::JSObject>(2);
91 } 91 }
92 Handle<JSArrayBuffer> memory; 92 Handle<JSArrayBuffer> memory;
93 if (args[3]->IsJSArrayBuffer()) { 93 if (args[3]->IsJSArrayBuffer()) {
94 memory = args.at<i::JSArrayBuffer>(3); 94 memory = args.at<i::JSArrayBuffer>(3);
95 } 95 }
96 if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData()) { 96 if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData() &&
97 AsmJs::IsStdlibValid(isolate, handle(function->shared()->asm_wasm_data()),
98 args.at<JSObject>(1))) {
titzer 2016/08/19 10:00:28 Does that need to be args.at<JSReceiver>?
bradn 2016/08/19 17:29:08 Done.
97 MaybeHandle<Object> result; 99 MaybeHandle<Object> result;
98 result = AsmJs::InstantiateAsmWasm( 100 result = AsmJs::InstantiateAsmWasm(
99 isolate, handle(function->shared()->asm_wasm_data()), memory, foreign); 101 isolate, handle(function->shared()->asm_wasm_data()), memory, foreign);
100 if (!result.is_null()) { 102 if (!result.is_null()) {
101 return *result.ToHandleChecked(); 103 return *result.ToHandleChecked();
102 } 104 }
103 } 105 }
104 // Remove wasm data, mark as broken for asm->wasm, 106 // Remove wasm data, mark as broken for asm->wasm,
105 // replace code with CompileLazy, and return a smi 0 to indicate failure. 107 // replace code with CompileLazy, and return a smi 0 to indicate failure.
106 if (function->shared()->HasAsmWasmData()) { 108 if (function->shared()->HasAsmWasmData()) {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 DCHECK(is_valid_language_mode(args.smi_at(3))); 443 DCHECK(is_valid_language_mode(args.smi_at(3)));
442 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); 444 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3));
443 DCHECK(args[4]->IsSmi()); 445 DCHECK(args[4]->IsSmi());
444 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 446 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
445 isolate); 447 isolate);
446 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 448 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
447 language_mode, args.smi_at(4), args.smi_at(5)); 449 language_mode, args.smi_at(4), args.smi_at(5));
448 } 450 }
449 } // namespace internal 451 } // namespace internal
450 } // namespace v8 452 } // namespace v8
OLDNEW
« src/asmjs/asm-js.cc ('K') | « src/asmjs/asm-typer.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698