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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 name_(name), | 1199 name_(name), |
1200 need_generic_(false) { | 1200 need_generic_(false) { |
1201 set_representation(Representation::Tagged()); | 1201 set_representation(Representation::Tagged()); |
1202 SetFlag(kDependsOnMaps); | 1202 SetFlag(kDependsOnMaps); |
1203 for (int i = 0; | 1203 for (int i = 0; |
1204 i < types->length() && types_.length() < kMaxLoadPolymorphism; | 1204 i < types->length() && types_.length() < kMaxLoadPolymorphism; |
1205 ++i) { | 1205 ++i) { |
1206 Handle<Map> map = types->at(i); | 1206 Handle<Map> map = types->at(i); |
1207 LookupResult lookup; | 1207 LookupResult lookup; |
1208 map->LookupInDescriptors(NULL, *name, &lookup); | 1208 map->LookupInDescriptors(NULL, *name, &lookup); |
1209 if (lookup.IsProperty() && lookup.type() == FIELD) { | 1209 if (lookup.IsProperty()) { |
1210 types_.Add(types->at(i)); | 1210 switch (lookup.type()) { |
1211 int index = lookup.GetLocalFieldIndexFromMap(*map); | 1211 case FIELD: { |
1212 if (index < 0) { | 1212 int index = lookup.GetLocalFieldIndexFromMap(*map); |
1213 SetFlag(kDependsOnInobjectFields); | 1213 if (index < 0) { |
1214 } else { | 1214 SetFlag(kDependsOnInobjectFields); |
1215 SetFlag(kDependsOnBackingStoreFields); | 1215 } else { |
| 1216 SetFlag(kDependsOnBackingStoreFields); |
| 1217 } |
| 1218 types_.Add(types->at(i)); |
| 1219 break; |
| 1220 } |
| 1221 case CONSTANT_FUNCTION: |
| 1222 types_.Add(types->at(i)); |
| 1223 break; |
| 1224 default: |
| 1225 break; |
1216 } | 1226 } |
1217 } | 1227 } |
1218 } | 1228 } |
1219 | 1229 |
1220 if (types_.length() == types->length() && FLAG_deoptimize_uncommon_cases) { | 1230 if (types_.length() == types->length() && FLAG_deoptimize_uncommon_cases) { |
1221 SetFlag(kUseGVN); | 1231 SetFlag(kUseGVN); |
1222 } else { | 1232 } else { |
1223 SetAllSideEffects(); | 1233 SetAllSideEffects(); |
1224 need_generic_ = true; | 1234 need_generic_ = true; |
1225 } | 1235 } |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 | 1686 |
1677 | 1687 |
1678 void HCheckPrototypeMaps::Verify() { | 1688 void HCheckPrototypeMaps::Verify() { |
1679 HInstruction::Verify(); | 1689 HInstruction::Verify(); |
1680 ASSERT(HasNoUses()); | 1690 ASSERT(HasNoUses()); |
1681 } | 1691 } |
1682 | 1692 |
1683 #endif | 1693 #endif |
1684 | 1694 |
1685 } } // namespace v8::internal | 1695 } } // namespace v8::internal |
OLD | NEW |