OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); | 702 DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); |
703 | 703 |
704 // Preserve the receiver register explicitly whenever it is different from the | 704 // Preserve the receiver register explicitly whenever it is different from the |
705 // holder and it is needed should the interceptor return without any result. | 705 // holder and it is needed should the interceptor return without any result. |
706 // The ACCESSOR case needs the receiver to be passed into C++ code, the FIELD | 706 // The ACCESSOR case needs the receiver to be passed into C++ code, the FIELD |
707 // case might cause a miss during the prototype check. | 707 // case might cause a miss during the prototype check. |
708 bool must_perform_prototype_check = | 708 bool must_perform_prototype_check = |
709 !holder().is_identical_to(it->GetHolder<JSObject>()); | 709 !holder().is_identical_to(it->GetHolder<JSObject>()); |
710 bool must_preserve_receiver_reg = | 710 bool must_preserve_receiver_reg = |
711 !receiver().is(holder_reg) && | 711 !receiver().is(holder_reg) && |
712 (it->property_kind() == LookupIterator::ACCESSOR || | 712 (it->state() == LookupIterator::ACCESSOR || must_perform_prototype_check); |
713 must_perform_prototype_check); | |
714 | 713 |
715 // Save necessary data before invoking an interceptor. | 714 // Save necessary data before invoking an interceptor. |
716 // Requires a frame to make GC aware of pushed pointers. | 715 // Requires a frame to make GC aware of pushed pointers. |
717 { | 716 { |
718 FrameAndConstantPoolScope frame_scope(masm(), StackFrame::INTERNAL); | 717 FrameAndConstantPoolScope frame_scope(masm(), StackFrame::INTERNAL); |
719 if (must_preserve_receiver_reg) { | 718 if (must_preserve_receiver_reg) { |
720 __ Push(receiver(), holder_reg, this->name()); | 719 __ Push(receiver(), holder_reg, this->name()); |
721 } else { | 720 } else { |
722 __ Push(holder_reg, this->name()); | 721 __ Push(holder_reg, this->name()); |
723 } | 722 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // Return the generated code. | 830 // Return the generated code. |
832 return GetCode(kind(), Code::NORMAL, name); | 831 return GetCode(kind(), Code::NORMAL, name); |
833 } | 832 } |
834 | 833 |
835 | 834 |
836 #undef __ | 835 #undef __ |
837 } | 836 } |
838 } // namespace v8::internal | 837 } // namespace v8::internal |
839 | 838 |
840 #endif // V8_TARGET_ARCH_ARM | 839 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |