OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); | 740 DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); |
741 | 741 |
742 // Preserve the receiver register explicitly whenever it is different from the | 742 // Preserve the receiver register explicitly whenever it is different from the |
743 // holder and it is needed should the interceptor return without any result. | 743 // holder and it is needed should the interceptor return without any result. |
744 // The ACCESSOR case needs the receiver to be passed into C++ code, the FIELD | 744 // The ACCESSOR case needs the receiver to be passed into C++ code, the FIELD |
745 // case might cause a miss during the prototype check. | 745 // case might cause a miss during the prototype check. |
746 bool must_perform_prototype_check = | 746 bool must_perform_prototype_check = |
747 !holder().is_identical_to(it->GetHolder<JSObject>()); | 747 !holder().is_identical_to(it->GetHolder<JSObject>()); |
748 bool must_preserve_receiver_reg = | 748 bool must_preserve_receiver_reg = |
749 !receiver().is(holder_reg) && | 749 !receiver().is(holder_reg) && |
750 (it->property_kind() == LookupIterator::ACCESSOR || | 750 (it->state() == LookupIterator::ACCESSOR || must_perform_prototype_check); |
751 must_perform_prototype_check); | |
752 | 751 |
753 // Save necessary data before invoking an interceptor. | 752 // Save necessary data before invoking an interceptor. |
754 // Requires a frame to make GC aware of pushed pointers. | 753 // Requires a frame to make GC aware of pushed pointers. |
755 { | 754 { |
756 FrameScope frame_scope(masm(), StackFrame::INTERNAL); | 755 FrameScope frame_scope(masm(), StackFrame::INTERNAL); |
757 | 756 |
758 if (must_preserve_receiver_reg) { | 757 if (must_preserve_receiver_reg) { |
759 __ push(receiver()); | 758 __ push(receiver()); |
760 } | 759 } |
761 __ push(holder_reg); | 760 __ push(holder_reg); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 // Return the generated code. | 891 // Return the generated code. |
893 return GetCode(kind(), Code::NORMAL, name); | 892 return GetCode(kind(), Code::NORMAL, name); |
894 } | 893 } |
895 | 894 |
896 | 895 |
897 #undef __ | 896 #undef __ |
898 } | 897 } |
899 } // namespace v8::internal | 898 } // namespace v8::internal |
900 | 899 |
901 #endif // V8_TARGET_ARCH_X87 | 900 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |