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/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 native_context()->set_initial_object_prototype(*object_function_prototype); | 527 native_context()->set_initial_object_prototype(*object_function_prototype); |
528 // For bootstrapping set the array prototype to be the same as the object | 528 // For bootstrapping set the array prototype to be the same as the object |
529 // prototype, otherwise the missing initial_array_prototype will cause | 529 // prototype, otherwise the missing initial_array_prototype will cause |
530 // assertions during startup. | 530 // assertions during startup. |
531 native_context()->set_initial_array_prototype(*object_function_prototype); | 531 native_context()->set_initial_array_prototype(*object_function_prototype); |
532 Accessors::FunctionSetPrototype(object_fun, object_function_prototype) | 532 Accessors::FunctionSetPrototype(object_fun, object_function_prototype) |
533 .Assert(); | 533 .Assert(); |
534 | 534 |
535 // Allocate initial strong object map. | 535 // Allocate initial strong object map. |
536 Handle<Map> strong_object_map = | 536 Handle<Map> strong_object_map = |
537 Map::Copy(object_function_map, "EmptyStrongObject"); | 537 Map::Copy(Handle<Map>(object_fun->initial_map()), "EmptyStrongObject"); |
538 strong_object_map->set_is_strong(); | 538 strong_object_map->set_is_strong(); |
539 native_context()->set_js_object_strong_map(*strong_object_map); | 539 native_context()->set_js_object_strong_map(*strong_object_map); |
540 } | 540 } |
541 | 541 |
542 // Allocate the empty function as the prototype for function - ES6 19.2.3 | 542 // Allocate the empty function as the prototype for function - ES6 19.2.3 |
543 Handle<Code> code(isolate->builtins()->builtin(Builtins::kEmptyFunction)); | 543 Handle<Code> code(isolate->builtins()->builtin(Builtins::kEmptyFunction)); |
544 Handle<JSFunction> empty_function = | 544 Handle<JSFunction> empty_function = |
545 factory->NewFunctionWithoutPrototype(factory->empty_string(), code); | 545 factory->NewFunctionWithoutPrototype(factory->empty_string(), code); |
546 | 546 |
547 // Allocate the function map first and then patch the prototype later | 547 // Allocate the function map first and then patch the prototype later |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3081 return from + sizeof(NestingCounterType); | 3081 return from + sizeof(NestingCounterType); |
3082 } | 3082 } |
3083 | 3083 |
3084 | 3084 |
3085 // Called when the top-level V8 mutex is destroyed. | 3085 // Called when the top-level V8 mutex is destroyed. |
3086 void Bootstrapper::FreeThreadResources() { | 3086 void Bootstrapper::FreeThreadResources() { |
3087 DCHECK(!IsActive()); | 3087 DCHECK(!IsActive()); |
3088 } | 3088 } |
3089 | 3089 |
3090 } } // namespace v8::internal | 3090 } } // namespace v8::internal |
OLD | NEW |