Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: src/ic.cc

Issue 10802034: Moved lastadded from DescriptorArray to Map. Renamed kLastAdded to kEnumCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 break; 1509 break;
1510 } 1510 }
1511 case INTERCEPTOR: 1511 case INTERCEPTOR:
1512 ASSERT(!receiver->GetNamedInterceptor()->setter()->IsUndefined()); 1512 ASSERT(!receiver->GetNamedInterceptor()->setter()->IsUndefined());
1513 code = isolate()->stub_cache()->ComputeStoreInterceptor( 1513 code = isolate()->stub_cache()->ComputeStoreInterceptor(
1514 name, receiver, strict_mode); 1514 name, receiver, strict_mode);
1515 break; 1515 break;
1516 case CONSTANT_FUNCTION: 1516 case CONSTANT_FUNCTION:
1517 return; 1517 return;
1518 case TRANSITION: { 1518 case TRANSITION: {
1519 Map* value = lookup->GetTransitionTarget(); 1519 Handle<Map> transition(lookup->GetTransitionTarget());
1520 Handle<Map> transition(Map::cast(value)); 1520 int descriptor = transition->LastAdded();
1521
1521 DescriptorArray* target_descriptors = transition->instance_descriptors(); 1522 DescriptorArray* target_descriptors = transition->instance_descriptors();
1522 int descriptor = target_descriptors->LastAdded();
1523 PropertyDetails details = target_descriptors->GetDetails(descriptor); 1523 PropertyDetails details = target_descriptors->GetDetails(descriptor);
1524 1524
1525 if (details.type() != FIELD || details.attributes() != NONE) return; 1525 if (details.type() != FIELD || details.attributes() != NONE) return;
1526 1526
1527 int field_index = target_descriptors->GetFieldIndex(descriptor); 1527 int field_index = target_descriptors->GetFieldIndex(descriptor);
1528 code = isolate()->stub_cache()->ComputeStoreField( 1528 code = isolate()->stub_cache()->ComputeStoreField(
1529 name, receiver, field_index, transition, strict_mode); 1529 name, receiver, field_index, transition, strict_mode);
1530 1530
1531 break; 1531 break;
1532 } 1532 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 Handle<Code> code; 1973 Handle<Code> code;
1974 1974
1975 switch (type) { 1975 switch (type) {
1976 case FIELD: 1976 case FIELD:
1977 code = isolate()->stub_cache()->ComputeKeyedStoreField( 1977 code = isolate()->stub_cache()->ComputeKeyedStoreField(
1978 name, receiver, lookup->GetFieldIndex(), 1978 name, receiver, lookup->GetFieldIndex(),
1979 Handle<Map>::null(), strict_mode); 1979 Handle<Map>::null(), strict_mode);
1980 break; 1980 break;
1981 case TRANSITION: { 1981 case TRANSITION: {
1982 Handle<Map> transition(lookup->GetTransitionTarget()); 1982 Handle<Map> transition(lookup->GetTransitionTarget());
1983 int descriptor = transition->LastAdded();
1983 1984
1984 DescriptorArray* target_descriptors = transition->instance_descriptors(); 1985 DescriptorArray* target_descriptors = transition->instance_descriptors();
1985 int descriptor = target_descriptors->LastAdded();
1986 PropertyDetails details = target_descriptors->GetDetails(descriptor); 1986 PropertyDetails details = target_descriptors->GetDetails(descriptor);
1987 1987
1988 if (details.type() == FIELD && details.attributes() == NONE) { 1988 if (details.type() == FIELD && details.attributes() == NONE) {
1989 int field_index = target_descriptors->GetFieldIndex(descriptor); 1989 int field_index = target_descriptors->GetFieldIndex(descriptor);
1990 code = isolate()->stub_cache()->ComputeKeyedStoreField( 1990 code = isolate()->stub_cache()->ComputeKeyedStoreField(
1991 name, receiver, field_index, transition, strict_mode); 1991 name, receiver, field_index, transition, strict_mode);
1992 break; 1992 break;
1993 } 1993 }
1994 // fall through. 1994 // fall through.
1995 } 1995 }
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 #undef ADDR 2696 #undef ADDR
2697 }; 2697 };
2698 2698
2699 2699
2700 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2700 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2701 return IC_utilities[id]; 2701 return IC_utilities[id];
2702 } 2702 }
2703 2703
2704 2704
2705 } } // namespace v8::internal 2705 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698