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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); | 692 DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); |
693 | 693 |
694 // Preserve the receiver register explicitly whenever it is different from the | 694 // Preserve the receiver register explicitly whenever it is different from the |
695 // holder and it is needed should the interceptor return without any result. | 695 // holder and it is needed should the interceptor return without any result. |
696 // The ACCESSOR case needs the receiver to be passed into C++ code, the FIELD | 696 // The ACCESSOR case needs the receiver to be passed into C++ code, the FIELD |
697 // case might cause a miss during the prototype check. | 697 // case might cause a miss during the prototype check. |
698 bool must_perform_prototype_check = | 698 bool must_perform_prototype_check = |
699 !holder().is_identical_to(it->GetHolder<JSObject>()); | 699 !holder().is_identical_to(it->GetHolder<JSObject>()); |
700 bool must_preserve_receiver_reg = | 700 bool must_preserve_receiver_reg = |
701 !receiver().is(holder_reg) && | 701 !receiver().is(holder_reg) && |
702 (it->property_kind() == LookupIterator::ACCESSOR || | 702 (it->state() == LookupIterator::ACCESSOR || must_perform_prototype_check); |
703 must_perform_prototype_check); | |
704 | 703 |
705 // Save necessary data before invoking an interceptor. | 704 // Save necessary data before invoking an interceptor. |
706 // Requires a frame to make GC aware of pushed pointers. | 705 // Requires a frame to make GC aware of pushed pointers. |
707 { | 706 { |
708 FrameScope frame_scope(masm(), StackFrame::INTERNAL); | 707 FrameScope frame_scope(masm(), StackFrame::INTERNAL); |
709 | 708 |
710 if (must_preserve_receiver_reg) { | 709 if (must_preserve_receiver_reg) { |
711 __ push(receiver()); | 710 __ push(receiver()); |
712 } | 711 } |
713 __ push(holder_reg); | 712 __ push(holder_reg); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 // Return the generated code. | 843 // Return the generated code. |
845 return GetCode(kind(), Code::NORMAL, name); | 844 return GetCode(kind(), Code::NORMAL, name); |
846 } | 845 } |
847 | 846 |
848 | 847 |
849 #undef __ | 848 #undef __ |
850 } | 849 } |
851 } // namespace v8::internal | 850 } // namespace v8::internal |
852 | 851 |
853 #endif // V8_TARGET_ARCH_IA32 | 852 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |