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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 Factory* factory = isolate->factory(); | 462 Factory* factory = isolate->factory(); |
463 | 463 |
464 Handle<String> object_name = factory->Object_string(); | 464 Handle<String> object_name = factory->Object_string(); |
465 | 465 |
466 { // --- O b j e c t --- | 466 { // --- O b j e c t --- |
467 Handle<JSFunction> object_fun = factory->NewFunction(object_name); | 467 Handle<JSFunction> object_fun = factory->NewFunction(object_name); |
468 Handle<Map> object_function_map = | 468 Handle<Map> object_function_map = |
469 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); | 469 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
470 object_fun->set_initial_map(*object_function_map); | 470 object_fun->set_initial_map(*object_function_map); |
471 object_function_map->set_constructor(*object_fun); | 471 object_function_map->set_constructor(*object_fun); |
| 472 object_function_map->set_unused_property_fields( |
| 473 JSObject::kInitialUnusedPropertiesCount); |
472 | 474 |
473 native_context()->set_object_function(*object_fun); | 475 native_context()->set_object_function(*object_fun); |
474 | 476 |
475 // Allocate a new prototype for the object function. | 477 // Allocate a new prototype for the object function. |
476 Handle<JSObject> prototype = factory->NewJSObject( | 478 Handle<JSObject> prototype = factory->NewJSObject( |
477 isolate->object_function(), | 479 isolate->object_function(), |
478 TENURED); | 480 TENURED); |
479 | 481 |
480 native_context()->set_initial_object_prototype(*prototype); | 482 native_context()->set_initial_object_prototype(*prototype); |
481 // For bootstrapping set the array prototype to be the same as the object | 483 // For bootstrapping set the array prototype to be the same as the object |
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2653 return from + sizeof(NestingCounterType); | 2655 return from + sizeof(NestingCounterType); |
2654 } | 2656 } |
2655 | 2657 |
2656 | 2658 |
2657 // Called when the top-level V8 mutex is destroyed. | 2659 // Called when the top-level V8 mutex is destroyed. |
2658 void Bootstrapper::FreeThreadResources() { | 2660 void Bootstrapper::FreeThreadResources() { |
2659 ASSERT(!IsActive()); | 2661 ASSERT(!IsActive()); |
2660 } | 2662 } |
2661 | 2663 |
2662 } } // namespace v8::internal | 2664 } } // namespace v8::internal |
OLD | NEW |