OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 final); | 993 final); |
994 initial_map->AppendDescriptor(&field, witness); | 994 initial_map->AppendDescriptor(&field, witness); |
995 } | 995 } |
996 { | 996 { |
997 // ECMA-262, section 15.10.7.5. | 997 // ECMA-262, section 15.10.7.5. |
998 PropertyAttributes writable = | 998 PropertyAttributes writable = |
999 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE); | 999 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE); |
1000 FieldDescriptor field(heap->last_index_string(), | 1000 FieldDescriptor field(heap->last_index_string(), |
1001 JSRegExp::kLastIndexFieldIndex, | 1001 JSRegExp::kLastIndexFieldIndex, |
1002 writable); | 1002 writable); |
| 1003 field.SetStorageType(TAGGED); |
1003 initial_map->AppendDescriptor(&field, witness); | 1004 initial_map->AppendDescriptor(&field, witness); |
1004 } | 1005 } |
1005 | 1006 |
1006 initial_map->set_inobject_properties(5); | 1007 initial_map->set_inobject_properties(5); |
1007 initial_map->set_pre_allocated_property_fields(5); | 1008 initial_map->set_pre_allocated_property_fields(5); |
1008 initial_map->set_unused_property_fields(0); | 1009 initial_map->set_unused_property_fields(0); |
1009 initial_map->set_instance_size( | 1010 initial_map->set_instance_size( |
1010 initial_map->instance_size() + 5 * kPointerSize); | 1011 initial_map->instance_size() + 5 * kPointerSize); |
1011 initial_map->set_visitor_id(StaticVisitorBase::GetVisitorId(*initial_map)); | 1012 initial_map->set_visitor_id(StaticVisitorBase::GetVisitorId(*initial_map)); |
1012 | 1013 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 // Create the map. Allocate one in-object field for length. | 1146 // Create the map. Allocate one in-object field for length. |
1146 Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, | 1147 Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, |
1147 Heap::kArgumentsObjectSizeStrict); | 1148 Heap::kArgumentsObjectSizeStrict); |
1148 // Create the descriptor array for the arguments object. | 1149 // Create the descriptor array for the arguments object. |
1149 Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(0, 3); | 1150 Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(0, 3); |
1150 DescriptorArray::WhitenessWitness witness(*descriptors); | 1151 DescriptorArray::WhitenessWitness witness(*descriptors); |
1151 map->set_instance_descriptors(*descriptors); | 1152 map->set_instance_descriptors(*descriptors); |
1152 | 1153 |
1153 { // length | 1154 { // length |
1154 FieldDescriptor d(*factory->length_string(), 0, DONT_ENUM); | 1155 FieldDescriptor d(*factory->length_string(), 0, DONT_ENUM); |
| 1156 d.SetStorageType(TAGGED); |
1155 map->AppendDescriptor(&d, witness); | 1157 map->AppendDescriptor(&d, witness); |
1156 } | 1158 } |
1157 { // callee | 1159 { // callee |
1158 CallbacksDescriptor d(*factory->callee_string(), | 1160 CallbacksDescriptor d(*factory->callee_string(), |
1159 *callee, | 1161 *callee, |
1160 attributes); | 1162 attributes); |
1161 map->AppendDescriptor(&d, witness); | 1163 map->AppendDescriptor(&d, witness); |
1162 } | 1164 } |
1163 { // caller | 1165 { // caller |
1164 CallbacksDescriptor d(*factory->caller_string(), | 1166 CallbacksDescriptor d(*factory->caller_string(), |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 ASSERT(old != DescriptorArray::kNotFound); | 1913 ASSERT(old != DescriptorArray::kNotFound); |
1912 CallbacksDescriptor desc(length, | 1914 CallbacksDescriptor desc(length, |
1913 array_descriptors->GetValue(old), | 1915 array_descriptors->GetValue(old), |
1914 array_descriptors->GetDetails(old).attributes()); | 1916 array_descriptors->GetDetails(old).attributes()); |
1915 initial_map->AppendDescriptor(&desc, witness); | 1917 initial_map->AppendDescriptor(&desc, witness); |
1916 } | 1918 } |
1917 { | 1919 { |
1918 FieldDescriptor index_field(heap()->index_string(), | 1920 FieldDescriptor index_field(heap()->index_string(), |
1919 JSRegExpResult::kIndexIndex, | 1921 JSRegExpResult::kIndexIndex, |
1920 NONE); | 1922 NONE); |
| 1923 index_field.SetStorageType(TAGGED); |
1921 initial_map->AppendDescriptor(&index_field, witness); | 1924 initial_map->AppendDescriptor(&index_field, witness); |
1922 } | 1925 } |
1923 | 1926 |
1924 { | 1927 { |
1925 FieldDescriptor input_field(heap()->input_string(), | 1928 FieldDescriptor input_field(heap()->input_string(), |
1926 JSRegExpResult::kInputIndex, | 1929 JSRegExpResult::kInputIndex, |
1927 NONE); | 1930 NONE); |
1928 initial_map->AppendDescriptor(&input_field, witness); | 1931 initial_map->AppendDescriptor(&input_field, witness); |
1929 } | 1932 } |
1930 | 1933 |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2554 return from + sizeof(NestingCounterType); | 2557 return from + sizeof(NestingCounterType); |
2555 } | 2558 } |
2556 | 2559 |
2557 | 2560 |
2558 // Called when the top-level V8 mutex is destroyed. | 2561 // Called when the top-level V8 mutex is destroyed. |
2559 void Bootstrapper::FreeThreadResources() { | 2562 void Bootstrapper::FreeThreadResources() { |
2560 ASSERT(!IsActive()); | 2563 ASSERT(!IsActive()); |
2561 } | 2564 } |
2562 | 2565 |
2563 } } // namespace v8::internal | 2566 } } // namespace v8::internal |
OLD | NEW |