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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 stream->Add("%u", index()); | 1258 stream->Add("%u", index()); |
1259 } | 1259 } |
1260 | 1260 |
1261 | 1261 |
1262 void HLoadNamedField::PrintDataTo(StringStream* stream) { | 1262 void HLoadNamedField::PrintDataTo(StringStream* stream) { |
1263 object()->PrintNameTo(stream); | 1263 object()->PrintNameTo(stream); |
1264 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); | 1264 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); |
1265 } | 1265 } |
1266 | 1266 |
1267 | 1267 |
1268 HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* object, | 1268 HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context, |
| 1269 HValue* object, |
1269 ZoneMapList* types, | 1270 ZoneMapList* types, |
1270 Handle<String> name) | 1271 Handle<String> name) |
1271 : HUnaryOperation(object), | 1272 : types_(Min(types->length(), kMaxLoadPolymorphism)), |
1272 types_(Min(types->length(), kMaxLoadPolymorphism)), | |
1273 name_(name), | 1273 name_(name), |
1274 need_generic_(false) { | 1274 need_generic_(false) { |
| 1275 SetOperandAt(0, context); |
| 1276 SetOperandAt(1, object); |
1275 set_representation(Representation::Tagged()); | 1277 set_representation(Representation::Tagged()); |
1276 SetFlag(kDependsOnMaps); | 1278 SetFlag(kDependsOnMaps); |
1277 for (int i = 0; | 1279 for (int i = 0; |
1278 i < types->length() && types_.length() < kMaxLoadPolymorphism; | 1280 i < types->length() && types_.length() < kMaxLoadPolymorphism; |
1279 ++i) { | 1281 ++i) { |
1280 Handle<Map> map = types->at(i); | 1282 Handle<Map> map = types->at(i); |
1281 LookupResult lookup; | 1283 LookupResult lookup; |
1282 map->LookupInDescriptors(NULL, *name, &lookup); | 1284 map->LookupInDescriptors(NULL, *name, &lookup); |
1283 if (lookup.IsProperty()) { | 1285 if (lookup.IsProperty()) { |
1284 switch (lookup.type()) { | 1286 switch (lookup.type()) { |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 | 1804 |
1803 | 1805 |
1804 void HCheckPrototypeMaps::Verify() { | 1806 void HCheckPrototypeMaps::Verify() { |
1805 HInstruction::Verify(); | 1807 HInstruction::Verify(); |
1806 ASSERT(HasNoUses()); | 1808 ASSERT(HasNoUses()); |
1807 } | 1809 } |
1808 | 1810 |
1809 #endif | 1811 #endif |
1810 | 1812 |
1811 } } // namespace v8::internal | 1813 } } // namespace v8::internal |
OLD | NEW |