Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |