OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 } | 805 } |
806 descriptors->SetNextEnumerationIndex(enum_index); | 806 descriptors->SetNextEnumerationIndex(enum_index); |
807 descriptors->Sort(); | 807 descriptors->Sort(); |
808 | 808 |
809 initial_map->set_inobject_properties(5); | 809 initial_map->set_inobject_properties(5); |
810 initial_map->set_pre_allocated_property_fields(5); | 810 initial_map->set_pre_allocated_property_fields(5); |
811 initial_map->set_unused_property_fields(0); | 811 initial_map->set_unused_property_fields(0); |
812 initial_map->set_instance_size( | 812 initial_map->set_instance_size( |
813 initial_map->instance_size() + 5 * kPointerSize); | 813 initial_map->instance_size() + 5 * kPointerSize); |
814 initial_map->set_instance_descriptors(*descriptors); | 814 initial_map->set_instance_descriptors(*descriptors); |
815 initial_map->set_scavenger( | |
816 Heap::GetScavenger(initial_map->instance_type(), | |
817 initial_map->instance_size())); | |
818 } | 815 } |
819 | 816 |
820 { // -- J S O N | 817 { // -- J S O N |
821 Handle<String> name = Factory::NewStringFromAscii(CStrVector("JSON")); | 818 Handle<String> name = Factory::NewStringFromAscii(CStrVector("JSON")); |
822 Handle<JSFunction> cons = Factory::NewFunction( | 819 Handle<JSFunction> cons = Factory::NewFunction( |
823 name, | 820 name, |
824 Factory::the_hole_value()); | 821 Factory::the_hole_value()); |
825 cons->SetInstancePrototype(global_context()->initial_object_prototype()); | 822 cons->SetInstancePrototype(global_context()->initial_object_prototype()); |
826 cons->SetInstanceClassName(*name); | 823 cons->SetInstanceClassName(*name); |
827 Handle<JSObject> json_object = Factory::NewJSObject(cons, TENURED); | 824 Handle<JSObject> json_object = Factory::NewJSObject(cons, TENURED); |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 } | 1807 } |
1811 | 1808 |
1812 | 1809 |
1813 // Restore statics that are thread local. | 1810 // Restore statics that are thread local. |
1814 char* BootstrapperActive::RestoreState(char* from) { | 1811 char* BootstrapperActive::RestoreState(char* from) { |
1815 nesting_ = *reinterpret_cast<int*>(from); | 1812 nesting_ = *reinterpret_cast<int*>(from); |
1816 return from + sizeof(nesting_); | 1813 return from + sizeof(nesting_); |
1817 } | 1814 } |
1818 | 1815 |
1819 } } // namespace v8::internal | 1816 } } // namespace v8::internal |
OLD | NEW |