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 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 break; | 1511 break; |
1512 case CONSTANT_FUNCTION: | 1512 case CONSTANT_FUNCTION: |
1513 return; | 1513 return; |
1514 case TRANSITION: { | 1514 case TRANSITION: { |
1515 Object* value = lookup->GetTransitionValue(); | 1515 Object* value = lookup->GetTransitionValue(); |
1516 // Callbacks. | 1516 // Callbacks. |
1517 if (value->IsAccessorPair()) return; | 1517 if (value->IsAccessorPair()) return; |
1518 | 1518 |
1519 Handle<Map> transition(Map::cast(value)); | 1519 Handle<Map> transition(Map::cast(value)); |
1520 DescriptorArray* target_descriptors = transition->instance_descriptors(); | 1520 DescriptorArray* target_descriptors = transition->instance_descriptors(); |
1521 int descriptor = target_descriptors->SearchWithCache(*name); | 1521 int descriptor = target_descriptors->LastAdded(); |
1522 ASSERT(descriptor != DescriptorArray::kNotFound); | |
1523 PropertyDetails details = target_descriptors->GetDetails(descriptor); | 1522 PropertyDetails details = target_descriptors->GetDetails(descriptor); |
1524 | 1523 |
1525 if (details.type() != FIELD || details.attributes() != NONE) return; | 1524 if (details.type() != FIELD || details.attributes() != NONE) return; |
1526 | 1525 |
1527 int field_index = target_descriptors->GetFieldIndex(descriptor); | 1526 int field_index = target_descriptors->GetFieldIndex(descriptor); |
1528 code = isolate()->stub_cache()->ComputeStoreField( | 1527 code = isolate()->stub_cache()->ComputeStoreField( |
1529 name, receiver, field_index, transition, strict_mode); | 1528 name, receiver, field_index, transition, strict_mode); |
1530 | 1529 |
1531 break; | 1530 break; |
1532 } | 1531 } |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 // Callbacks transition. | 1982 // Callbacks transition. |
1984 if (value->IsAccessorPair()) { | 1983 if (value->IsAccessorPair()) { |
1985 code = (strict_mode == kStrictMode) | 1984 code = (strict_mode == kStrictMode) |
1986 ? generic_stub_strict() | 1985 ? generic_stub_strict() |
1987 : generic_stub(); | 1986 : generic_stub(); |
1988 break; | 1987 break; |
1989 } | 1988 } |
1990 | 1989 |
1991 Handle<Map> transition(Map::cast(value)); | 1990 Handle<Map> transition(Map::cast(value)); |
1992 DescriptorArray* target_descriptors = transition->instance_descriptors(); | 1991 DescriptorArray* target_descriptors = transition->instance_descriptors(); |
1993 int descriptor = target_descriptors->SearchWithCache(*name); | 1992 int descriptor = target_descriptors->LastAdded(); |
1994 ASSERT(descriptor != DescriptorArray::kNotFound); | |
1995 PropertyDetails details = target_descriptors->GetDetails(descriptor); | 1993 PropertyDetails details = target_descriptors->GetDetails(descriptor); |
1996 | 1994 |
1997 if (details.type() == FIELD && details.attributes() == NONE) { | 1995 if (details.type() == FIELD && details.attributes() == NONE) { |
1998 int field_index = target_descriptors->GetFieldIndex(descriptor); | 1996 int field_index = target_descriptors->GetFieldIndex(descriptor); |
1999 code = isolate()->stub_cache()->ComputeKeyedStoreField( | 1997 code = isolate()->stub_cache()->ComputeKeyedStoreField( |
2000 name, receiver, field_index, transition, strict_mode); | 1998 name, receiver, field_index, transition, strict_mode); |
2001 break; | 1999 break; |
2002 } | 2000 } |
2003 // fall through. | 2001 // fall through. |
2004 } | 2002 } |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 #undef ADDR | 2703 #undef ADDR |
2706 }; | 2704 }; |
2707 | 2705 |
2708 | 2706 |
2709 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2707 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2710 return IC_utilities[id]; | 2708 return IC_utilities[id]; |
2711 } | 2709 } |
2712 | 2710 |
2713 | 2711 |
2714 } } // namespace v8::internal | 2712 } } // namespace v8::internal |
OLD | NEW |