OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 // If this assert fails, we have to check upper bound too. | 89 // If this assert fails, we have to check upper bound too. |
90 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); | 90 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); |
91 | 91 |
92 GenerateGlobalInstanceTypeCheck(masm, t1, miss); | 92 GenerateGlobalInstanceTypeCheck(masm, t1, miss); |
93 | 93 |
94 // Check that the global object does not require access checks. | 94 // Check that the global object does not require access checks. |
95 __ ldrb(t1, FieldMemOperand(t0, Map::kBitFieldOffset)); | 95 __ ldrb(t1, FieldMemOperand(t0, Map::kBitFieldOffset)); |
96 __ tst(t1, Operand((1 << Map::kIsAccessCheckNeeded) | | 96 __ tst(t1, Operand((1 << Map::kIsAccessCheckNeeded) | |
97 (1 << Map::kHasNamedInterceptor))); | 97 (1 << Map::kHasNamedInterceptor))); |
98 __ b(nz, miss); | 98 __ b(ne, miss); |
99 | 99 |
100 __ ldr(elements, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 100 __ ldr(elements, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
101 __ ldr(t1, FieldMemOperand(elements, HeapObject::kMapOffset)); | 101 __ ldr(t1, FieldMemOperand(elements, HeapObject::kMapOffset)); |
102 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); | 102 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); |
103 __ cmp(t1, ip); | 103 __ cmp(t1, ip); |
104 __ b(nz, miss); | 104 __ b(ne, miss); |
105 } | 105 } |
106 | 106 |
107 | 107 |
108 // Probe the string dictionary in the |elements| register. Jump to the | 108 // Probe the string dictionary in the |elements| register. Jump to the |
109 // |done| label if a property with the given name is found. Jump to | 109 // |done| label if a property with the given name is found. Jump to |
110 // the |miss| label otherwise. | 110 // the |miss| label otherwise. |
111 static void GenerateStringDictionaryProbes(MacroAssembler* masm, | 111 static void GenerateStringDictionaryProbes(MacroAssembler* masm, |
112 Label* miss, | 112 Label* miss, |
113 Label* done, | 113 Label* done, |
114 Register elements, | 114 Register elements, |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 int interceptor_bit, | 419 int interceptor_bit, |
420 Label* slow) { | 420 Label* slow) { |
421 // Check that the object isn't a smi. | 421 // Check that the object isn't a smi. |
422 __ BranchOnSmi(receiver, slow); | 422 __ BranchOnSmi(receiver, slow); |
423 // Get the map of the receiver. | 423 // Get the map of the receiver. |
424 __ ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 424 __ ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
425 // Check bit field. | 425 // Check bit field. |
426 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 426 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
427 __ tst(scratch, | 427 __ tst(scratch, |
428 Operand((1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit))); | 428 Operand((1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit))); |
429 __ b(nz, slow); | 429 __ b(ne, slow); |
430 // Check that the object is some kind of JS object EXCEPT JS Value type. | 430 // Check that the object is some kind of JS object EXCEPT JS Value type. |
431 // In the case that the object is a value-wrapper object, | 431 // In the case that the object is a value-wrapper object, |
432 // we enter the runtime system to make sure that indexing into string | 432 // we enter the runtime system to make sure that indexing into string |
433 // objects work as intended. | 433 // objects work as intended. |
434 ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE); | 434 ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE); |
435 __ ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 435 __ ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
436 __ cmp(scratch, Operand(JS_OBJECT_TYPE)); | 436 __ cmp(scratch, Operand(JS_OBJECT_TYPE)); |
437 __ b(lt, slow); | 437 __ b(lt, slow); |
438 } | 438 } |
439 | 439 |
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 | 2387 |
2388 | 2388 |
2389 void PatchInlinedSmiCode(Address address) { | 2389 void PatchInlinedSmiCode(Address address) { |
2390 UNIMPLEMENTED(); | 2390 UNIMPLEMENTED(); |
2391 } | 2391 } |
2392 | 2392 |
2393 | 2393 |
2394 } } // namespace v8::internal | 2394 } } // namespace v8::internal |
2395 | 2395 |
2396 #endif // V8_TARGET_ARCH_ARM | 2396 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |