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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 function->shared()->set_is_asm_wasm_broken(true); | 117 function->shared()->set_is_asm_wasm_broken(true); |
118 DCHECK(function->code() == | 118 DCHECK(function->code() == |
119 isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)); | 119 isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)); |
120 function->ReplaceCode(isolate->builtins()->builtin(Builtins::kCompileLazy)); | 120 function->ReplaceCode(isolate->builtins()->builtin(Builtins::kCompileLazy)); |
121 if (function->shared()->code() == | 121 if (function->shared()->code() == |
122 isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) { | 122 isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) { |
123 function->shared()->ReplaceCode( | 123 function->shared()->ReplaceCode( |
124 isolate->builtins()->builtin(Builtins::kCompileLazy)); | 124 isolate->builtins()->builtin(Builtins::kCompileLazy)); |
125 } | 125 } |
126 return Smi::FromInt(0); | 126 return Smi::kZero; |
127 } | 127 } |
128 | 128 |
129 RUNTIME_FUNCTION(Runtime_NotifyStubFailure) { | 129 RUNTIME_FUNCTION(Runtime_NotifyStubFailure) { |
130 HandleScope scope(isolate); | 130 HandleScope scope(isolate); |
131 DCHECK(args.length() == 0); | 131 DCHECK(args.length() == 0); |
132 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); | 132 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); |
133 DCHECK(AllowHeapAllocation::IsAllowed()); | 133 DCHECK(AllowHeapAllocation::IsAllowed()); |
134 delete deoptimizer; | 134 delete deoptimizer; |
135 return isolate->heap()->undefined_value(); | 135 return isolate->heap()->undefined_value(); |
136 } | 136 } |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 DCHECK(is_valid_language_mode(args.smi_at(3))); | 483 DCHECK(is_valid_language_mode(args.smi_at(3))); |
484 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); | 484 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); |
485 DCHECK(args[4]->IsSmi()); | 485 DCHECK(args[4]->IsSmi()); |
486 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), | 486 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), |
487 isolate); | 487 isolate); |
488 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, | 488 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, |
489 language_mode, args.smi_at(4), args.smi_at(5)); | 489 language_mode, args.smi_at(4), args.smi_at(5)); |
490 } | 490 } |
491 } // namespace internal | 491 } // namespace internal |
492 } // namespace v8 | 492 } // namespace v8 |
OLD | NEW |