Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 585 holder); | 585 holder); |
| 586 case HANDLER: { | 586 case HANDLER: { |
| 587 JSProxy* proxy = JSProxy::cast(this); | 587 JSProxy* proxy = JSProxy::cast(this); |
| 588 return GetPropertyWithHandler(receiver, name, proxy->handler()); | 588 return GetPropertyWithHandler(receiver, name, proxy->handler()); |
| 589 } | 589 } |
| 590 case INTERCEPTOR: { | 590 case INTERCEPTOR: { |
| 591 JSObject* recvr = JSObject::cast(receiver); | 591 JSObject* recvr = JSObject::cast(receiver); |
| 592 return holder->GetPropertyWithInterceptor(recvr, name, attributes); | 592 return holder->GetPropertyWithInterceptor(recvr, name, attributes); |
| 593 } | 593 } |
| 594 case MAP_TRANSITION: | 594 case MAP_TRANSITION: |
| 595 case EXTERNAL_ARRAY_TRANSITION: | 595 case ELEMENTS_TRANSITION: |
| 596 case CONSTANT_TRANSITION: | 596 case CONSTANT_TRANSITION: |
| 597 case NULL_DESCRIPTOR: | 597 case NULL_DESCRIPTOR: |
| 598 break; | 598 break; |
| 599 } | 599 } |
| 600 UNREACHABLE(); | 600 UNREACHABLE(); |
| 601 return NULL; | 601 return NULL; |
| 602 } | 602 } |
| 603 | 603 |
| 604 | 604 |
| 605 MaybeObject* Object::GetElementWithReceiver(Object* receiver, uint32_t index) { | 605 MaybeObject* Object::GetElementWithReceiver(Object* receiver, uint32_t index) { |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1429 if (!maybe_new_descriptors->ToObject(&new_descriptors)) { | 1429 if (!maybe_new_descriptors->ToObject(&new_descriptors)) { |
| 1430 return maybe_new_descriptors; | 1430 return maybe_new_descriptors; |
| 1431 } | 1431 } |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 // Only allow map transition if the object isn't the global object and there | 1434 // Only allow map transition if the object isn't the global object and there |
| 1435 // is not a transition for the name, or there's a transition for the name but | 1435 // is not a transition for the name, or there's a transition for the name but |
| 1436 // it's unrelated to properties. | 1436 // it's unrelated to properties. |
| 1437 int descriptor_index = old_descriptors->Search(name); | 1437 int descriptor_index = old_descriptors->Search(name); |
| 1438 | 1438 |
| 1439 // External array transitions are stored in the descriptor for property "", | 1439 // External array transitions are stored in the descriptor for property "", |
|
Jakob Kummerow
2011/09/09 07:55:53
s/External array/Elements/
| |
| 1440 // which is not a identifier and should have forced a switch to slow | 1440 // which is not a identifier and should have forced a switch to slow |
| 1441 // properties above. | 1441 // properties above. |
| 1442 ASSERT(descriptor_index == DescriptorArray::kNotFound || | 1442 ASSERT(descriptor_index == DescriptorArray::kNotFound || |
| 1443 old_descriptors->GetType(descriptor_index) != EXTERNAL_ARRAY_TRANSITION); | 1443 old_descriptors->GetType(descriptor_index) != ELEMENTS_TRANSITION); |
| 1444 bool can_insert_transition = descriptor_index == DescriptorArray::kNotFound || | 1444 bool can_insert_transition = descriptor_index == DescriptorArray::kNotFound || |
| 1445 old_descriptors->GetType(descriptor_index) == EXTERNAL_ARRAY_TRANSITION; | 1445 old_descriptors->GetType(descriptor_index) == ELEMENTS_TRANSITION; |
| 1446 bool allow_map_transition = | 1446 bool allow_map_transition = |
| 1447 can_insert_transition && | 1447 can_insert_transition && |
| 1448 (isolate->context()->global_context()->object_function()->map() != map()); | 1448 (isolate->context()->global_context()->object_function()->map() != map()); |
| 1449 | 1449 |
| 1450 ASSERT(index < map()->inobject_properties() || | 1450 ASSERT(index < map()->inobject_properties() || |
| 1451 (index - map()->inobject_properties()) < properties()->length() || | 1451 (index - map()->inobject_properties()) < properties()->length() || |
| 1452 map()->unused_property_fields() == 0); | 1452 map()->unused_property_fields() == 0); |
| 1453 // Allocate a new map for the object. | 1453 // Allocate a new map for the object. |
| 1454 Object* r; | 1454 Object* r; |
| 1455 { MaybeObject* maybe_r = map()->CopyDropDescriptors(); | 1455 { MaybeObject* maybe_r = map()->CopyDropDescriptors(); |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1983 cache->Update(descriptors, name, number); | 1983 cache->Update(descriptors, name, number); |
| 1984 } | 1984 } |
| 1985 if (number != DescriptorArray::kNotFound) { | 1985 if (number != DescriptorArray::kNotFound) { |
| 1986 result->DescriptorResult(holder, descriptors->GetDetails(number), number); | 1986 result->DescriptorResult(holder, descriptors->GetDetails(number), number); |
| 1987 } else { | 1987 } else { |
| 1988 result->NotFound(); | 1988 result->NotFound(); |
| 1989 } | 1989 } |
| 1990 } | 1990 } |
| 1991 | 1991 |
| 1992 | 1992 |
| 1993 static ElementsKind GetElementsKindFromExternalArrayType( | 1993 MaybeObject* Map::GetElementsTransitionMap(ElementsKind elements_kind, |
| 1994 ExternalArrayType array_type) { | 1994 bool safe_to_add_transition) { |
| 1995 switch (array_type) { | |
| 1996 case kExternalByteArray: | |
| 1997 return EXTERNAL_BYTE_ELEMENTS; | |
| 1998 break; | |
| 1999 case kExternalUnsignedByteArray: | |
| 2000 return EXTERNAL_UNSIGNED_BYTE_ELEMENTS; | |
| 2001 break; | |
| 2002 case kExternalShortArray: | |
| 2003 return EXTERNAL_SHORT_ELEMENTS; | |
| 2004 break; | |
| 2005 case kExternalUnsignedShortArray: | |
| 2006 return EXTERNAL_UNSIGNED_SHORT_ELEMENTS; | |
| 2007 break; | |
| 2008 case kExternalIntArray: | |
| 2009 return EXTERNAL_INT_ELEMENTS; | |
| 2010 break; | |
| 2011 case kExternalUnsignedIntArray: | |
| 2012 return EXTERNAL_UNSIGNED_INT_ELEMENTS; | |
| 2013 break; | |
| 2014 case kExternalFloatArray: | |
| 2015 return EXTERNAL_FLOAT_ELEMENTS; | |
| 2016 break; | |
| 2017 case kExternalDoubleArray: | |
| 2018 return EXTERNAL_DOUBLE_ELEMENTS; | |
| 2019 break; | |
| 2020 case kExternalPixelArray: | |
| 2021 return EXTERNAL_PIXEL_ELEMENTS; | |
| 2022 break; | |
| 2023 } | |
| 2024 UNREACHABLE(); | |
| 2025 return DICTIONARY_ELEMENTS; | |
| 2026 } | |
| 2027 | |
| 2028 | |
| 2029 MaybeObject* Map::GetExternalArrayElementsMap(ExternalArrayType array_type, | |
| 2030 bool safe_to_add_transition) { | |
| 2031 Heap* current_heap = heap(); | 1995 Heap* current_heap = heap(); |
| 2032 DescriptorArray* descriptors = instance_descriptors(); | 1996 DescriptorArray* descriptors = instance_descriptors(); |
| 2033 String* external_array_sentinel_name = current_heap->empty_symbol(); | 1997 String* elements_transition_sentinel_name = current_heap->empty_symbol(); |
| 2034 | 1998 |
| 2035 if (safe_to_add_transition) { | 1999 if (safe_to_add_transition) { |
| 2036 // It's only safe to manipulate the descriptor array if it would be | 2000 // It's only safe to manipulate the descriptor array if it would be |
| 2037 // safe to add a transition. | 2001 // safe to add a transition. |
| 2038 | 2002 |
| 2039 ASSERT(!is_shared()); // no transitions can be added to shared maps. | 2003 ASSERT(!is_shared()); // no transitions can be added to shared maps. |
| 2040 // Check if the external array transition already exists. | 2004 // Check if the elements transition already exists. |
| 2041 DescriptorLookupCache* cache = | 2005 DescriptorLookupCache* cache = |
| 2042 current_heap->isolate()->descriptor_lookup_cache(); | 2006 current_heap->isolate()->descriptor_lookup_cache(); |
| 2043 int index = cache->Lookup(descriptors, external_array_sentinel_name); | 2007 int index = cache->Lookup(descriptors, elements_transition_sentinel_name); |
| 2044 if (index == DescriptorLookupCache::kAbsent) { | 2008 if (index == DescriptorLookupCache::kAbsent) { |
| 2045 index = descriptors->Search(external_array_sentinel_name); | 2009 index = descriptors->Search(elements_transition_sentinel_name); |
| 2046 cache->Update(descriptors, | 2010 cache->Update(descriptors, |
| 2047 external_array_sentinel_name, | 2011 elements_transition_sentinel_name, |
| 2048 index); | 2012 index); |
| 2049 } | 2013 } |
| 2050 | 2014 |
| 2051 // If the transition already exists, check the type. If there is a match, | 2015 // If the transition already exists, check the type. If there is a match, |
| 2052 // return it. | 2016 // return it. |
| 2053 if (index != DescriptorArray::kNotFound) { | 2017 if (index != DescriptorArray::kNotFound) { |
| 2054 PropertyDetails details(PropertyDetails(descriptors->GetDetails(index))); | 2018 PropertyDetails details(PropertyDetails(descriptors->GetDetails(index))); |
| 2055 if (details.type() == EXTERNAL_ARRAY_TRANSITION && | 2019 if (details.type() == ELEMENTS_TRANSITION && |
| 2056 details.array_type() == array_type) { | 2020 details.elements_kind() == elements_kind) { |
| 2057 return descriptors->GetValue(index); | 2021 return descriptors->GetValue(index); |
| 2058 } else { | 2022 } else { |
| 2059 safe_to_add_transition = false; | 2023 safe_to_add_transition = false; |
| 2060 } | 2024 } |
| 2061 } | 2025 } |
| 2062 } | 2026 } |
| 2063 | 2027 |
| 2064 // No transition to an existing external array map. Make a new one. | 2028 // No transition to an existing external array map. Make a new one. |
| 2065 Object* obj; | 2029 Object* obj; |
| 2066 { MaybeObject* maybe_map = CopyDropTransitions(); | 2030 { MaybeObject* maybe_map = CopyDropTransitions(); |
| 2067 if (!maybe_map->ToObject(&obj)) return maybe_map; | 2031 if (!maybe_map->ToObject(&obj)) return maybe_map; |
| 2068 } | 2032 } |
| 2069 Map* new_map = Map::cast(obj); | 2033 Map* new_map = Map::cast(obj); |
| 2070 | 2034 |
| 2071 new_map->set_elements_kind(GetElementsKindFromExternalArrayType(array_type)); | 2035 new_map->set_elements_kind(elements_kind); |
| 2072 GetIsolate()->counters()->map_to_external_array_elements()->Increment(); | 2036 GetIsolate()->counters()->map_to_external_array_elements()->Increment(); |
| 2073 | 2037 |
| 2074 // Only remember the map transition if the object's map is NOT equal to the | 2038 // Only remember the map transition if the object's map is NOT equal to the |
| 2075 // global object_function's map and there is not an already existing | 2039 // global object_function's map and there is not an already existing |
| 2076 // non-matching external array transition. | 2040 // non-matching external array transition. |
|
Jakob Kummerow
2011/09/09 07:55:53
s/external array/elements/
| |
| 2077 bool allow_map_transition = | 2041 bool allow_map_transition = |
| 2078 safe_to_add_transition && | 2042 safe_to_add_transition && |
| 2079 (GetIsolate()->context()->global_context()->object_function()->map() != | 2043 (GetIsolate()->context()->global_context()->object_function()->map() != |
| 2080 map()); | 2044 map()); |
| 2081 if (allow_map_transition) { | 2045 if (allow_map_transition) { |
| 2082 // Allocate new instance descriptors for the old map with map transition. | 2046 // Allocate new instance descriptors for the old map with map transition. |
| 2083 ExternalArrayTransitionDescriptor desc(external_array_sentinel_name, | 2047 ElementsTransitionDescriptor desc(elements_transition_sentinel_name, |
| 2084 Map::cast(new_map), | 2048 Map::cast(new_map), |
| 2085 array_type); | 2049 elements_kind); |
| 2086 Object* new_descriptors; | 2050 Object* new_descriptors; |
| 2087 MaybeObject* maybe_new_descriptors = descriptors->CopyInsert( | 2051 MaybeObject* maybe_new_descriptors = descriptors->CopyInsert( |
| 2088 &desc, | 2052 &desc, |
| 2089 KEEP_TRANSITIONS); | 2053 KEEP_TRANSITIONS); |
| 2090 if (!maybe_new_descriptors->ToObject(&new_descriptors)) { | 2054 if (!maybe_new_descriptors->ToObject(&new_descriptors)) { |
| 2091 return maybe_new_descriptors; | 2055 return maybe_new_descriptors; |
| 2092 } | 2056 } |
| 2093 descriptors = DescriptorArray::cast(new_descriptors); | 2057 descriptors = DescriptorArray::cast(new_descriptors); |
| 2094 set_instance_descriptors(descriptors); | 2058 set_instance_descriptors(descriptors); |
| 2095 } | 2059 } |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2492 ASSERT(!HEAP->InNewSpace(function)); | 2456 ASSERT(!HEAP->InNewSpace(function)); |
| 2493 if (value == function) { | 2457 if (value == function) { |
| 2494 set_map(target_map); | 2458 set_map(target_map); |
| 2495 return value; | 2459 return value; |
| 2496 } | 2460 } |
| 2497 // Otherwise, replace with a MAP_TRANSITION to a new map with a | 2461 // Otherwise, replace with a MAP_TRANSITION to a new map with a |
| 2498 // FIELD, even if the value is a constant function. | 2462 // FIELD, even if the value is a constant function. |
| 2499 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); | 2463 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); |
| 2500 } | 2464 } |
| 2501 case NULL_DESCRIPTOR: | 2465 case NULL_DESCRIPTOR: |
| 2502 case EXTERNAL_ARRAY_TRANSITION: | 2466 case ELEMENTS_TRANSITION: |
| 2503 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); | 2467 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); |
| 2504 default: | 2468 default: |
| 2505 UNREACHABLE(); | 2469 UNREACHABLE(); |
| 2506 } | 2470 } |
| 2507 UNREACHABLE(); | 2471 UNREACHABLE(); |
| 2508 return value; | 2472 return value; |
| 2509 } | 2473 } |
| 2510 | 2474 |
| 2511 | 2475 |
| 2512 // Set a real local property, even if it is READ_ONLY. If the property is not | 2476 // Set a real local property, even if it is READ_ONLY. If the property is not |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2580 return ConvertDescriptorToField(name, value, attributes); | 2544 return ConvertDescriptorToField(name, value, attributes); |
| 2581 case CALLBACKS: | 2545 case CALLBACKS: |
| 2582 case INTERCEPTOR: | 2546 case INTERCEPTOR: |
| 2583 // Override callback in clone | 2547 // Override callback in clone |
| 2584 return ConvertDescriptorToField(name, value, attributes); | 2548 return ConvertDescriptorToField(name, value, attributes); |
| 2585 case CONSTANT_TRANSITION: | 2549 case CONSTANT_TRANSITION: |
| 2586 // Replace with a MAP_TRANSITION to a new map with a FIELD, even | 2550 // Replace with a MAP_TRANSITION to a new map with a FIELD, even |
| 2587 // if the value is a function. | 2551 // if the value is a function. |
| 2588 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); | 2552 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); |
| 2589 case NULL_DESCRIPTOR: | 2553 case NULL_DESCRIPTOR: |
| 2590 case EXTERNAL_ARRAY_TRANSITION: | 2554 case ELEMENTS_TRANSITION: |
| 2591 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); | 2555 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); |
| 2592 default: | 2556 default: |
| 2593 UNREACHABLE(); | 2557 UNREACHABLE(); |
| 2594 } | 2558 } |
| 2595 UNREACHABLE(); | 2559 UNREACHABLE(); |
| 2596 return value; | 2560 return value; |
| 2597 } | 2561 } |
| 2598 | 2562 |
| 2599 | 2563 |
| 2600 PropertyAttributes JSObject::GetPropertyAttributePostInterceptor( | 2564 PropertyAttributes JSObject::GetPropertyAttributePostInterceptor( |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2861 dictionary->Add(descs->GetKey(i), value, d); | 2825 dictionary->Add(descs->GetKey(i), value, d); |
| 2862 if (!maybe_result->ToObject(&result)) return maybe_result; | 2826 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 2863 } | 2827 } |
| 2864 dictionary = StringDictionary::cast(result); | 2828 dictionary = StringDictionary::cast(result); |
| 2865 break; | 2829 break; |
| 2866 } | 2830 } |
| 2867 case MAP_TRANSITION: | 2831 case MAP_TRANSITION: |
| 2868 case CONSTANT_TRANSITION: | 2832 case CONSTANT_TRANSITION: |
| 2869 case NULL_DESCRIPTOR: | 2833 case NULL_DESCRIPTOR: |
| 2870 case INTERCEPTOR: | 2834 case INTERCEPTOR: |
| 2871 case EXTERNAL_ARRAY_TRANSITION: | 2835 case ELEMENTS_TRANSITION: |
| 2872 break; | 2836 break; |
| 2873 default: | 2837 default: |
| 2874 UNREACHABLE(); | 2838 UNREACHABLE(); |
| 2875 } | 2839 } |
| 2876 } | 2840 } |
| 2877 | 2841 |
| 2878 Heap* current_heap = map_of_this->heap(); | 2842 Heap* current_heap = map_of_this->heap(); |
| 2879 | 2843 |
| 2880 // Copy the next enumeration index from instance descriptor. | 2844 // Copy the next enumeration index from instance descriptor. |
| 2881 int index = map_of_this->instance_descriptors()->NextEnumerationIndex(); | 2845 int index = map_of_this->instance_descriptors()->NextEnumerationIndex(); |
| (...skipping 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6195 for (int i = 0; i < length; i++) { | 6159 for (int i = 0; i < length; i++) { |
| 6196 fprintf(file, "%c", Get(i)); | 6160 fprintf(file, "%c", Get(i)); |
| 6197 } | 6161 } |
| 6198 } | 6162 } |
| 6199 | 6163 |
| 6200 | 6164 |
| 6201 void Map::CreateBackPointers() { | 6165 void Map::CreateBackPointers() { |
| 6202 DescriptorArray* descriptors = instance_descriptors(); | 6166 DescriptorArray* descriptors = instance_descriptors(); |
| 6203 for (int i = 0; i < descriptors->number_of_descriptors(); i++) { | 6167 for (int i = 0; i < descriptors->number_of_descriptors(); i++) { |
| 6204 if (descriptors->GetType(i) == MAP_TRANSITION || | 6168 if (descriptors->GetType(i) == MAP_TRANSITION || |
| 6205 descriptors->GetType(i) == EXTERNAL_ARRAY_TRANSITION || | 6169 descriptors->GetType(i) == ELEMENTS_TRANSITION || |
| 6206 descriptors->GetType(i) == CONSTANT_TRANSITION) { | 6170 descriptors->GetType(i) == CONSTANT_TRANSITION) { |
| 6207 // Get target. | 6171 // Get target. |
| 6208 Map* target = Map::cast(descriptors->GetValue(i)); | 6172 Map* target = Map::cast(descriptors->GetValue(i)); |
| 6209 #ifdef DEBUG | 6173 #ifdef DEBUG |
| 6210 // Verify target. | 6174 // Verify target. |
| 6211 Object* source_prototype = prototype(); | 6175 Object* source_prototype = prototype(); |
| 6212 Object* target_prototype = target->prototype(); | 6176 Object* target_prototype = target->prototype(); |
| 6213 ASSERT(source_prototype->IsJSObject() || | 6177 ASSERT(source_prototype->IsJSObject() || |
| 6214 source_prototype->IsMap() || | 6178 source_prototype->IsMap() || |
| 6215 source_prototype->IsNull()); | 6179 source_prototype->IsNull()); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 6238 d->get(DescriptorArray::kContentArrayIndex)); | 6202 d->get(DescriptorArray::kContentArrayIndex)); |
| 6239 ASSERT(contents->length() >= 2); | 6203 ASSERT(contents->length() >= 2); |
| 6240 for (int i = 0; i < contents->length(); i += 2) { | 6204 for (int i = 0; i < contents->length(); i += 2) { |
| 6241 // If the pair (value, details) is a map transition, | 6205 // If the pair (value, details) is a map transition, |
| 6242 // check if the target is live. If not, null the descriptor. | 6206 // check if the target is live. If not, null the descriptor. |
| 6243 // Also drop the back pointer for that map transition, so that this | 6207 // Also drop the back pointer for that map transition, so that this |
| 6244 // map is not reached again by following a back pointer from a | 6208 // map is not reached again by following a back pointer from a |
| 6245 // non-live object. | 6209 // non-live object. |
| 6246 PropertyDetails details(Smi::cast(contents->get(i + 1))); | 6210 PropertyDetails details(Smi::cast(contents->get(i + 1))); |
| 6247 if (details.type() == MAP_TRANSITION || | 6211 if (details.type() == MAP_TRANSITION || |
| 6248 details.type() == EXTERNAL_ARRAY_TRANSITION || | 6212 details.type() == ELEMENTS_TRANSITION || |
| 6249 details.type() == CONSTANT_TRANSITION) { | 6213 details.type() == CONSTANT_TRANSITION) { |
| 6250 Map* target = reinterpret_cast<Map*>(contents->get(i)); | 6214 Map* target = reinterpret_cast<Map*>(contents->get(i)); |
| 6251 ASSERT(target->IsHeapObject()); | 6215 ASSERT(target->IsHeapObject()); |
| 6252 if (!target->IsMarked()) { | 6216 if (!target->IsMarked()) { |
| 6253 ASSERT(target->IsMap()); | 6217 ASSERT(target->IsMap()); |
| 6254 contents->set_unchecked(i + 1, NullDescriptorDetails); | 6218 contents->set_unchecked(i + 1, NullDescriptorDetails); |
| 6255 contents->set_null_unchecked(heap, i); | 6219 contents->set_null_unchecked(heap, i); |
| 6256 ASSERT(target->prototype() == this || | 6220 ASSERT(target->prototype() == this || |
| 6257 target->prototype() == real_prototype); | 6221 target->prototype() == real_prototype); |
| 6258 // Getter prototype() is read-only, set_prototype() has side effects. | 6222 // Getter prototype() is read-only, set_prototype() has side effects. |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7127 | 7091 |
| 7128 const char* Code::PropertyType2String(PropertyType type) { | 7092 const char* Code::PropertyType2String(PropertyType type) { |
| 7129 switch (type) { | 7093 switch (type) { |
| 7130 case NORMAL: return "NORMAL"; | 7094 case NORMAL: return "NORMAL"; |
| 7131 case FIELD: return "FIELD"; | 7095 case FIELD: return "FIELD"; |
| 7132 case CONSTANT_FUNCTION: return "CONSTANT_FUNCTION"; | 7096 case CONSTANT_FUNCTION: return "CONSTANT_FUNCTION"; |
| 7133 case CALLBACKS: return "CALLBACKS"; | 7097 case CALLBACKS: return "CALLBACKS"; |
| 7134 case HANDLER: return "HANDLER"; | 7098 case HANDLER: return "HANDLER"; |
| 7135 case INTERCEPTOR: return "INTERCEPTOR"; | 7099 case INTERCEPTOR: return "INTERCEPTOR"; |
| 7136 case MAP_TRANSITION: return "MAP_TRANSITION"; | 7100 case MAP_TRANSITION: return "MAP_TRANSITION"; |
| 7137 case EXTERNAL_ARRAY_TRANSITION: return "EXTERNAL_ARRAY_TRANSITION"; | 7101 case ELEMENTS_TRANSITION: return "ELEMENTS_TRANSITION"; |
| 7138 case CONSTANT_TRANSITION: return "CONSTANT_TRANSITION"; | 7102 case CONSTANT_TRANSITION: return "CONSTANT_TRANSITION"; |
| 7139 case NULL_DESCRIPTOR: return "NULL_DESCRIPTOR"; | 7103 case NULL_DESCRIPTOR: return "NULL_DESCRIPTOR"; |
| 7140 } | 7104 } |
| 7141 UNREACHABLE(); | 7105 UNREACHABLE(); |
| 7142 return NULL; | 7106 return NULL; |
| 7143 } | 7107 } |
| 7144 | 7108 |
| 7145 | 7109 |
| 7146 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { | 7110 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { |
| 7147 const char* name = NULL; | 7111 const char* name = NULL; |
| (...skipping 4451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11599 if (break_point_objects()->IsUndefined()) return 0; | 11563 if (break_point_objects()->IsUndefined()) return 0; |
| 11600 // Single break point. | 11564 // Single break point. |
| 11601 if (!break_point_objects()->IsFixedArray()) return 1; | 11565 if (!break_point_objects()->IsFixedArray()) return 1; |
| 11602 // Multiple break points. | 11566 // Multiple break points. |
| 11603 return FixedArray::cast(break_point_objects())->length(); | 11567 return FixedArray::cast(break_point_objects())->length(); |
| 11604 } | 11568 } |
| 11605 #endif | 11569 #endif |
| 11606 | 11570 |
| 11607 | 11571 |
| 11608 } } // namespace v8::internal | 11572 } } // namespace v8::internal |
| OLD | NEW |