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

Side by Side Diff: src/hydrogen.cc

Issue 25718002: Only fold polymorphic into monomorphic load if all load from either receiver or same prototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months 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 | test/mjsunit/regress/regress-polymorphic-load.js » ('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 4689 matching lines...) Expand 10 before | Expand all | Expand 10 after
4700 } 4700 }
4701 4701
4702 4702
4703 bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatibleForLoad( 4703 bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatibleForLoad(
4704 PropertyAccessInfo* info) { 4704 PropertyAccessInfo* info) {
4705 if (!CanInlinePropertyAccess(*map_)) return false; 4705 if (!CanInlinePropertyAccess(*map_)) return false;
4706 4706
4707 if (!LookupDescriptor()) return false; 4707 if (!LookupDescriptor()) return false;
4708 4708
4709 if (!lookup_.IsFound()) { 4709 if (!lookup_.IsFound()) {
4710 return (!info->lookup_.IsFound() || !info->holder_.is_null()) && 4710 return (!info->lookup_.IsFound() || info->has_holder()) &&
4711 map_->prototype() == info->map_->prototype(); 4711 map_->prototype() == info->map_->prototype();
4712 } 4712 }
4713 4713
4714 // Mismatch if the other access info found the property in the prototype
4715 // chain.
4716 if (info->has_holder()) return false;
4717
4714 if (lookup_.IsPropertyCallbacks()) { 4718 if (lookup_.IsPropertyCallbacks()) {
4715 return accessor_.is_identical_to(info->accessor_); 4719 return accessor_.is_identical_to(info->accessor_);
4716 } 4720 }
4717 4721
4718 if (lookup_.IsConstant()) { 4722 if (lookup_.IsConstant()) {
4719 return constant_.is_identical_to(info->constant_); 4723 return constant_.is_identical_to(info->constant_);
4720 } 4724 }
4721 4725
4722 ASSERT(lookup_.IsField()); 4726 ASSERT(lookup_.IsField());
4723 if (!info->lookup_.IsField()) return false; 4727 if (!info->lookup_.IsField()) return false;
(...skipping 5123 matching lines...) Expand 10 before | Expand all | Expand 10 after
9847 if (ShouldProduceTraceOutput()) { 9851 if (ShouldProduceTraceOutput()) {
9848 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9852 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9849 } 9853 }
9850 9854
9851 #ifdef DEBUG 9855 #ifdef DEBUG
9852 graph_->Verify(false); // No full verify. 9856 graph_->Verify(false); // No full verify.
9853 #endif 9857 #endif
9854 } 9858 }
9855 9859
9856 } } // namespace v8::internal 9860 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-polymorphic-load.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698