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/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #ifdef DEBUG | 25 #ifdef DEBUG |
26 if (FLAG_trace_lazy && !function->shared()->is_compiled()) { | 26 if (FLAG_trace_lazy && !function->shared()->is_compiled()) { |
27 PrintF("[unoptimized: "); | 27 PrintF("[unoptimized: "); |
28 function->PrintName(); | 28 function->PrintName(); |
29 PrintF("]\n"); | 29 PrintF("]\n"); |
30 } | 30 } |
31 #endif | 31 #endif |
32 | 32 |
33 StackLimitCheck check(isolate); | 33 StackLimitCheck check(isolate); |
34 if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow(); | 34 if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow(); |
35 if (!Compiler::Compile(function, KEEP_EXCEPTION)) { | 35 if (!Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) { |
36 return isolate->heap()->exception(); | 36 return isolate->heap()->exception(); |
37 } | 37 } |
38 DCHECK(function->is_compiled()); | 38 DCHECK(function->is_compiled()); |
39 return function->code(); | 39 return function->code(); |
40 } | 40 } |
41 | 41 |
42 | 42 |
43 RUNTIME_FUNCTION(Runtime_CompileOptimized_Concurrent) { | 43 RUNTIME_FUNCTION(Runtime_CompileOptimized_Concurrent) { |
44 HandleScope scope(isolate); | 44 HandleScope scope(isolate); |
45 DCHECK(args.length() == 1); | 45 DCHECK(args.length() == 1); |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 DCHECK(is_valid_language_mode(args.smi_at(3))); | 402 DCHECK(is_valid_language_mode(args.smi_at(3))); |
403 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); | 403 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); |
404 DCHECK(args[4]->IsSmi()); | 404 DCHECK(args[4]->IsSmi()); |
405 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), | 405 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), |
406 isolate); | 406 isolate); |
407 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, | 407 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, |
408 language_mode, args.smi_at(4)); | 408 language_mode, args.smi_at(4)); |
409 } | 409 } |
410 } // namespace internal | 410 } // namespace internal |
411 } // namespace v8 | 411 } // namespace v8 |
OLD | NEW |