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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 HandleScope scope(isolate()); | 2503 HandleScope scope(isolate()); |
2504 for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) { | 2504 for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) { |
2505 Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i); | 2505 Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i); |
2506 Handle<Object> function_object = Object::GetProperty( | 2506 Handle<Object> function_object = Object::GetProperty( |
2507 isolate(), builtins, Builtins::GetName(id)).ToHandleChecked(); | 2507 isolate(), builtins, Builtins::GetName(id)).ToHandleChecked(); |
2508 Handle<JSFunction> function = Handle<JSFunction>::cast(function_object); | 2508 Handle<JSFunction> function = Handle<JSFunction>::cast(function_object); |
2509 builtins->set_javascript_builtin(id, *function); | 2509 builtins->set_javascript_builtin(id, *function); |
2510 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work, | 2510 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work, |
2511 // the correct solution is to restore the context register after invoking | 2511 // the correct solution is to restore the context register after invoking |
2512 // builtins from full-codegen. | 2512 // builtins from full-codegen. |
| 2513 function->shared()->set_disable_optimization_reason(kOptimizationDisabled); |
2513 function->shared()->set_optimization_disabled(true); | 2514 function->shared()->set_optimization_disabled(true); |
2514 if (!Compiler::EnsureCompiled(function, CLEAR_EXCEPTION)) { | 2515 if (!Compiler::EnsureCompiled(function, CLEAR_EXCEPTION)) { |
2515 return false; | 2516 return false; |
2516 } | 2517 } |
2517 builtins->set_javascript_builtin_code(id, function->shared()->code()); | 2518 builtins->set_javascript_builtin_code(id, function->shared()->code()); |
2518 } | 2519 } |
2519 return true; | 2520 return true; |
2520 } | 2521 } |
2521 | 2522 |
2522 | 2523 |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2857 return from + sizeof(NestingCounterType); | 2858 return from + sizeof(NestingCounterType); |
2858 } | 2859 } |
2859 | 2860 |
2860 | 2861 |
2861 // Called when the top-level V8 mutex is destroyed. | 2862 // Called when the top-level V8 mutex is destroyed. |
2862 void Bootstrapper::FreeThreadResources() { | 2863 void Bootstrapper::FreeThreadResources() { |
2863 DCHECK(!IsActive()); | 2864 DCHECK(!IsActive()); |
2864 } | 2865 } |
2865 | 2866 |
2866 } } // namespace v8::internal | 2867 } } // namespace v8::internal |
OLD | NEW |