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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 const int kInterceptorOrAccessCheckNeededMask = | 50 const int kInterceptorOrAccessCheckNeededMask = |
51 (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); | 51 (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); |
52 | 52 |
53 // Bail out if the receiver has a named interceptor or requires access checks. | 53 // Bail out if the receiver has a named interceptor or requires access checks. |
54 __ testb(FieldOperand(scratch0, Map::kBitFieldOffset), | 54 __ testb(FieldOperand(scratch0, Map::kBitFieldOffset), |
55 Immediate(kInterceptorOrAccessCheckNeededMask)); | 55 Immediate(kInterceptorOrAccessCheckNeededMask)); |
56 __ j(not_zero, miss_label); | 56 __ j(not_zero, miss_label); |
57 | 57 |
58 // Check that receiver is a JSObject. | 58 // Check that receiver is a JSObject. |
59 __ CmpInstanceType(scratch0, FIRST_SPEC_OBJECT_TYPE); | 59 __ CmpInstanceType(scratch0, FIRST_JS_RECEIVER_TYPE); |
60 __ j(below, miss_label); | 60 __ j(below, miss_label); |
61 | 61 |
62 // Load properties array. | 62 // Load properties array. |
63 Register properties = scratch0; | 63 Register properties = scratch0; |
64 __ movp(properties, FieldOperand(receiver, JSObject::kPropertiesOffset)); | 64 __ movp(properties, FieldOperand(receiver, JSObject::kPropertiesOffset)); |
65 | 65 |
66 // Check that the properties array is a dictionary. | 66 // Check that the properties array is a dictionary. |
67 __ CompareRoot(FieldOperand(properties, HeapObject::kMapOffset), | 67 __ CompareRoot(FieldOperand(properties, HeapObject::kMapOffset), |
68 Heap::kHashTableMapRootIndex); | 68 Heap::kHashTableMapRootIndex); |
69 __ j(not_equal, miss_label); | 69 __ j(not_equal, miss_label); |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 // Return the generated code. | 804 // Return the generated code. |
805 return GetCode(kind(), Code::NORMAL, name); | 805 return GetCode(kind(), Code::NORMAL, name); |
806 } | 806 } |
807 | 807 |
808 | 808 |
809 #undef __ | 809 #undef __ |
810 } // namespace internal | 810 } // namespace internal |
811 } // namespace v8 | 811 } // namespace v8 |
812 | 812 |
813 #endif // V8_TARGET_ARCH_X64 | 813 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |