| 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 4689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |