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 7095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7106 return new(zone()) HConstant(function, Representation::Tagged()); | 7106 return new(zone()) HConstant(function, Representation::Tagged()); |
7107 } | 7107 } |
7108 | 7108 |
7109 // Handle a load from a known field somewhere in the prototype chain. | 7109 // Handle a load from a known field somewhere in the prototype chain. |
7110 LookupInPrototypes(map, name, &lookup); | 7110 LookupInPrototypes(map, name, &lookup); |
7111 if (lookup.IsField()) { | 7111 if (lookup.IsField()) { |
7112 Handle<JSObject> prototype(JSObject::cast(map->prototype())); | 7112 Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
7113 Handle<JSObject> holder(lookup.holder()); | 7113 Handle<JSObject> holder(lookup.holder()); |
7114 Handle<Map> holder_map(holder->map()); | 7114 Handle<Map> holder_map(holder->map()); |
7115 AddCheckMap(object, map); | 7115 AddCheckMap(object, map); |
7116 HInstruction* holder_value = AddInstruction( | 7116 AddInstruction( |
7117 new(zone()) HCheckPrototypeMaps(prototype, holder, zone())); | 7117 new(zone()) HCheckPrototypeMaps(prototype, holder, zone())); |
| 7118 HValue* holder_value = AddInstruction( |
| 7119 new(zone()) HConstant(holder, Representation::Tagged())); |
7118 return BuildLoadNamedField(holder_value, holder_map, &lookup); | 7120 return BuildLoadNamedField(holder_value, holder_map, &lookup); |
7119 } | 7121 } |
7120 | 7122 |
7121 // Handle a load of a constant function somewhere in the prototype chain. | 7123 // Handle a load of a constant function somewhere in the prototype chain. |
7122 if (lookup.IsConstantFunction()) { | 7124 if (lookup.IsConstantFunction()) { |
7123 Handle<JSObject> prototype(JSObject::cast(map->prototype())); | 7125 Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
7124 Handle<JSObject> holder(lookup.holder()); | 7126 Handle<JSObject> holder(lookup.holder()); |
7125 Handle<Map> holder_map(holder->map()); | 7127 Handle<Map> holder_map(holder->map()); |
7126 AddCheckMap(object, map); | 7128 AddCheckMap(object, map); |
7127 AddInstruction(new(zone()) HCheckPrototypeMaps(prototype, holder, zone())); | 7129 AddInstruction(new(zone()) HCheckPrototypeMaps(prototype, holder, zone())); |
(...skipping 4156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11284 } | 11286 } |
11285 } | 11287 } |
11286 | 11288 |
11287 #ifdef DEBUG | 11289 #ifdef DEBUG |
11288 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11290 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
11289 if (allocator_ != NULL) allocator_->Verify(); | 11291 if (allocator_ != NULL) allocator_->Verify(); |
11290 #endif | 11292 #endif |
11291 } | 11293 } |
11292 | 11294 |
11293 } } // namespace v8::internal | 11295 } } // namespace v8::internal |
OLD | NEW |