| 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/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
| (...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 int i = Natives::GetDebuggerCount(); | 2110 int i = Natives::GetDebuggerCount(); |
| 2111 if (!CompileBuiltin(isolate(), i)) return false; | 2111 if (!CompileBuiltin(isolate(), i)) return false; |
| 2112 if (!InstallJSBuiltins(builtins)) return false; | 2112 if (!InstallJSBuiltins(builtins)) return false; |
| 2113 | 2113 |
| 2114 for (++i; i < Natives::GetBuiltinsCount(); ++i) { | 2114 for (++i; i < Natives::GetBuiltinsCount(); ++i) { |
| 2115 if (!CompileBuiltin(isolate(), i)) return false; | 2115 if (!CompileBuiltin(isolate(), i)) return false; |
| 2116 } | 2116 } |
| 2117 | 2117 |
| 2118 InstallNativeFunctions(); | 2118 InstallNativeFunctions(); |
| 2119 | 2119 |
| 2120 native_context()->set_function_cache(heap()->empty_fixed_array()); | 2120 auto function_cache = |
| 2121 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize); |
| 2122 native_context()->set_function_cache(*function_cache); |
| 2121 | 2123 |
| 2122 // Store the map for the string prototype after the natives has been compiled | 2124 // Store the map for the string prototype after the natives has been compiled |
| 2123 // and the String function has been set up. | 2125 // and the String function has been set up. |
| 2124 Handle<JSFunction> string_function(native_context()->string_function()); | 2126 Handle<JSFunction> string_function(native_context()->string_function()); |
| 2125 DCHECK(JSObject::cast( | 2127 DCHECK(JSObject::cast( |
| 2126 string_function->initial_map()->prototype())->HasFastProperties()); | 2128 string_function->initial_map()->prototype())->HasFastProperties()); |
| 2127 native_context()->set_string_function_prototype_map( | 2129 native_context()->set_string_function_prototype_map( |
| 2128 HeapObject::cast(string_function->initial_map()->prototype())->map()); | 2130 HeapObject::cast(string_function->initial_map()->prototype())->map()); |
| 2129 | 2131 |
| 2130 // Install Function.prototype.call and apply. | 2132 // Install Function.prototype.call and apply. |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2922 return from + sizeof(NestingCounterType); | 2924 return from + sizeof(NestingCounterType); |
| 2923 } | 2925 } |
| 2924 | 2926 |
| 2925 | 2927 |
| 2926 // Called when the top-level V8 mutex is destroyed. | 2928 // Called when the top-level V8 mutex is destroyed. |
| 2927 void Bootstrapper::FreeThreadResources() { | 2929 void Bootstrapper::FreeThreadResources() { |
| 2928 DCHECK(!IsActive()); | 2930 DCHECK(!IsActive()); |
| 2929 } | 2931 } |
| 2930 | 2932 |
| 2931 } } // namespace v8::internal | 2933 } } // namespace v8::internal |
| OLD | NEW |