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

Side by Side Diff: src/hydrogen.cc

Issue 37253003: 3.20 branch: Fix HObjectAccess for loads from migrating prototypes (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.20
Patch Set: Created 7 years, 1 month 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 | « no previous file | src/version.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 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 5433 matching lines...) Expand 10 before | Expand all | Expand 10 after
5444 AddCheckMap(object, map); 5444 AddCheckMap(object, map);
5445 Handle<Object> constant(lookup.GetConstantFromMap(*map), isolate()); 5445 Handle<Object> constant(lookup.GetConstantFromMap(*map), isolate());
5446 return New<HConstant>(constant); 5446 return New<HConstant>(constant);
5447 } 5447 }
5448 5448
5449 // Handle a load from a known field somewhere in the prototype chain. 5449 // Handle a load from a known field somewhere in the prototype chain.
5450 LookupInPrototypes(map, name, &lookup); 5450 LookupInPrototypes(map, name, &lookup);
5451 if (lookup.IsField()) { 5451 if (lookup.IsField()) {
5452 Handle<JSObject> prototype(JSObject::cast(map->prototype())); 5452 Handle<JSObject> prototype(JSObject::cast(map->prototype()));
5453 Handle<JSObject> holder(lookup.holder()); 5453 Handle<JSObject> holder(lookup.holder());
5454 Handle<Map> holder_map(holder->map());
5455 HCheckMaps* type_check = AddCheckMap(object, map); 5454 HCheckMaps* type_check = AddCheckMap(object, map);
5456 BuildCheckPrototypeMaps(prototype, holder); 5455 BuildCheckPrototypeMaps(prototype, holder);
5457 HValue* holder_value = Add<HConstant>(holder); 5456 HValue* holder_value = Add<HConstant>(holder);
5457 Handle<Map> holder_map(holder->map());
5458 return BuildLoadNamedField(holder_value, 5458 return BuildLoadNamedField(holder_value,
5459 HObjectAccess::ForField(holder_map, &lookup, name), type_check); 5459 HObjectAccess::ForField(holder_map, &lookup, name), type_check);
5460 } 5460 }
5461 5461
5462 // Handle a load of a constant function somewhere in the prototype chain. 5462 // Handle a load of a constant function somewhere in the prototype chain.
5463 if (lookup.IsConstant()) { 5463 if (lookup.IsConstant()) {
5464 Handle<JSObject> prototype(JSObject::cast(map->prototype())); 5464 Handle<JSObject> prototype(JSObject::cast(map->prototype()));
5465 Handle<JSObject> holder(lookup.holder()); 5465 Handle<JSObject> holder(lookup.holder());
5466 Handle<Map> holder_map(holder->map()); 5466 Handle<Map> holder_map(holder->map());
5467 AddCheckMap(object, map); 5467 AddCheckMap(object, map);
(...skipping 4375 matching lines...) Expand 10 before | Expand all | Expand 10 after
9843 if (ShouldProduceTraceOutput()) { 9843 if (ShouldProduceTraceOutput()) {
9844 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9844 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9845 } 9845 }
9846 9846
9847 #ifdef DEBUG 9847 #ifdef DEBUG
9848 graph_->Verify(false); // No full verify. 9848 graph_->Verify(false); // No full verify.
9849 #endif 9849 #endif
9850 } 9850 }
9851 9851
9852 } } // namespace v8::internal 9852 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698