OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5399 // Cannot handle the property, do a generic load instead. | 5399 // Cannot handle the property, do a generic load instead. |
5400 HValue* context = environment()->context(); | 5400 HValue* context = environment()->context(); |
5401 return new(zone()) HLoadNamedGeneric(context, object, name); | 5401 return new(zone()) HLoadNamedGeneric(context, object, name); |
5402 } | 5402 } |
5403 | 5403 |
5404 // Handle a load from a known field somewhere in the prototype chain. | 5404 // Handle a load from a known field somewhere in the prototype chain. |
5405 LookupInPrototypes(map, name, &lookup); | 5405 LookupInPrototypes(map, name, &lookup); |
5406 if (lookup.IsField()) { | 5406 if (lookup.IsField()) { |
5407 Handle<JSObject> prototype(JSObject::cast(map->prototype())); | 5407 Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
5408 Handle<JSObject> holder(lookup.holder()); | 5408 Handle<JSObject> holder(lookup.holder()); |
5409 Handle<Map> holder_map(holder->map()); | |
5410 AddCheckMap(object, map); | 5409 AddCheckMap(object, map); |
5411 HValue* checked_holder = BuildCheckPrototypeMaps(prototype, holder); | 5410 HValue* checked_holder = BuildCheckPrototypeMaps(prototype, holder); |
| 5411 Handle<Map> holder_map(holder->map()); |
5412 return BuildLoadNamedField( | 5412 return BuildLoadNamedField( |
5413 checked_holder, HObjectAccess::ForField(holder_map, &lookup, name)); | 5413 checked_holder, HObjectAccess::ForField(holder_map, &lookup, name)); |
5414 } | 5414 } |
5415 | 5415 |
5416 // Handle a load of a constant function somewhere in the prototype chain. | 5416 // Handle a load of a constant function somewhere in the prototype chain. |
5417 if (lookup.IsConstant()) { | 5417 if (lookup.IsConstant()) { |
5418 Handle<JSObject> prototype(JSObject::cast(map->prototype())); | 5418 Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
5419 Handle<JSObject> holder(lookup.holder()); | 5419 Handle<JSObject> holder(lookup.holder()); |
5420 Handle<Map> holder_map(holder->map()); | 5420 Handle<Map> holder_map(holder->map()); |
5421 AddCheckMap(object, map); | 5421 AddCheckMap(object, map); |
(...skipping 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9694 if (ShouldProduceTraceOutput()) { | 9694 if (ShouldProduceTraceOutput()) { |
9695 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9695 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9696 } | 9696 } |
9697 | 9697 |
9698 #ifdef DEBUG | 9698 #ifdef DEBUG |
9699 graph_->Verify(false); // No full verify. | 9699 graph_->Verify(false); // No full verify. |
9700 #endif | 9700 #endif |
9701 } | 9701 } |
9702 | 9702 |
9703 } } // namespace v8::internal | 9703 } } // namespace v8::internal |
OLD | NEW |