| 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 "bootstrapper.h" | 5 #include "bootstrapper.h" |
| 6 | 6 |
| 7 #include "accessors.h" | 7 #include "accessors.h" |
| 8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
| 9 #include "natives.h" | 9 #include "natives.h" |
| 10 #include "snapshot.h" | 10 #include "snapshot.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 Factory* factory = isolate->factory(); | 465 Factory* factory = isolate->factory(); |
| 466 | 466 |
| 467 Handle<String> object_name = factory->Object_string(); | 467 Handle<String> object_name = factory->Object_string(); |
| 468 | 468 |
| 469 { // --- O b j e c t --- | 469 { // --- O b j e c t --- |
| 470 Handle<JSFunction> object_fun = factory->NewFunction(object_name); | 470 Handle<JSFunction> object_fun = factory->NewFunction(object_name); |
| 471 Handle<Map> object_function_map = | 471 Handle<Map> object_function_map = |
| 472 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); | 472 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
| 473 object_fun->set_initial_map(*object_function_map); | 473 object_fun->set_initial_map(*object_function_map); |
| 474 object_function_map->set_constructor(*object_fun); | 474 object_function_map->set_constructor(*object_fun); |
| 475 object_function_map->set_unused_property_fields( |
| 476 JSObject::kInitialGlobalObjectUnusedPropertiesCount); |
| 475 | 477 |
| 476 native_context()->set_object_function(*object_fun); | 478 native_context()->set_object_function(*object_fun); |
| 477 | 479 |
| 478 // Allocate a new prototype for the object function. | 480 // Allocate a new prototype for the object function. |
| 479 Handle<JSObject> prototype = factory->NewJSObject( | 481 Handle<JSObject> prototype = factory->NewJSObject( |
| 480 isolate->object_function(), | 482 isolate->object_function(), |
| 481 TENURED); | 483 TENURED); |
| 482 | 484 |
| 483 native_context()->set_initial_object_prototype(*prototype); | 485 native_context()->set_initial_object_prototype(*prototype); |
| 484 // For bootstrapping set the array prototype to be the same as the object | 486 // For bootstrapping set the array prototype to be the same as the object |
| (...skipping 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2699 return from + sizeof(NestingCounterType); | 2701 return from + sizeof(NestingCounterType); |
| 2700 } | 2702 } |
| 2701 | 2703 |
| 2702 | 2704 |
| 2703 // Called when the top-level V8 mutex is destroyed. | 2705 // Called when the top-level V8 mutex is destroyed. |
| 2704 void Bootstrapper::FreeThreadResources() { | 2706 void Bootstrapper::FreeThreadResources() { |
| 2705 ASSERT(!IsActive()); | 2707 ASSERT(!IsActive()); |
| 2706 } | 2708 } |
| 2707 | 2709 |
| 2708 } } // namespace v8::internal | 2710 } } // namespace v8::internal |
| OLD | NEW |