OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 Register extra) { | 114 Register extra) { |
115 ASSERT(name->IsSymbol()); | 115 ASSERT(name->IsSymbol()); |
116 __ IncrementCounter(&Counters::negative_lookups, 1); | 116 __ IncrementCounter(&Counters::negative_lookups, 1); |
117 __ IncrementCounter(&Counters::negative_lookups_miss, 1); | 117 __ IncrementCounter(&Counters::negative_lookups_miss, 1); |
118 | 118 |
119 Label done; | 119 Label done; |
120 __ mov(r0, FieldOperand(receiver, HeapObject::kMapOffset)); | 120 __ mov(r0, FieldOperand(receiver, HeapObject::kMapOffset)); |
121 | 121 |
122 const int kInterceptorOrAccessCheckNeededMask = | 122 const int kInterceptorOrAccessCheckNeededMask = |
123 (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); | 123 (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); |
| 124 |
124 // Bail out if the receiver has a named interceptor or requires access checks. | 125 // Bail out if the receiver has a named interceptor or requires access checks. |
125 __ test(FieldOperand(r0, Map::kBitFieldOffset), | 126 __ test_b(FieldOperand(r0, Map::kBitFieldOffset), |
126 Immediate(kInterceptorOrAccessCheckNeededMask)); | 127 kInterceptorOrAccessCheckNeededMask); |
127 __ j(not_zero, miss_label, not_taken); | 128 __ j(not_zero, miss_label, not_taken); |
128 | 129 |
| 130 // Check that receiver is a JSObject. |
129 __ CmpInstanceType(r0, FIRST_JS_OBJECT_TYPE); | 131 __ CmpInstanceType(r0, FIRST_JS_OBJECT_TYPE); |
130 __ j(below, miss_label, not_taken); | 132 __ j(below, miss_label, not_taken); |
131 | 133 |
132 // Load properties array. | 134 // Load properties array. |
133 Register properties = r0; | 135 Register properties = r0; |
134 __ mov(properties, FieldOperand(receiver, JSObject::kPropertiesOffset)); | 136 __ mov(properties, FieldOperand(receiver, JSObject::kPropertiesOffset)); |
135 | 137 |
136 // Check that the properties array is a dictionary. | 138 // Check that the properties array is a dictionary. |
137 __ cmp(FieldOperand(properties, HeapObject::kMapOffset), | 139 __ cmp(FieldOperand(properties, HeapObject::kMapOffset), |
138 Immediate(Factory::hash_table_map())); | 140 Immediate(Factory::hash_table_map())); |
(...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 // Return the generated code. | 2732 // Return the generated code. |
2731 return GetCode(); | 2733 return GetCode(); |
2732 } | 2734 } |
2733 | 2735 |
2734 | 2736 |
2735 #undef __ | 2737 #undef __ |
2736 | 2738 |
2737 } } // namespace v8::internal | 2739 } } // namespace v8::internal |
2738 | 2740 |
2739 #endif // V8_TARGET_ARCH_IA32 | 2741 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |