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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 __ LoadRoot(ip, Heap::kFixedArrayMapRootIndex); | 593 __ LoadRoot(ip, Heap::kFixedArrayMapRootIndex); |
594 __ cmp(r3, ip); | 594 __ cmp(r3, ip); |
595 __ b(ne, &slow); | 595 __ b(ne, &slow); |
596 // Check that the key (index) is within bounds. | 596 // Check that the key (index) is within bounds. |
597 __ ldr(r3, FieldMemOperand(r1, Array::kLengthOffset)); | 597 __ ldr(r3, FieldMemOperand(r1, Array::kLengthOffset)); |
598 __ cmp(r0, Operand(r3)); | 598 __ cmp(r0, Operand(r3)); |
599 __ b(lo, &fast); | 599 __ b(lo, &fast); |
600 | 600 |
601 // Slow case: Push extra copies of the arguments (2). | 601 // Slow case: Push extra copies of the arguments (2). |
602 __ bind(&slow); | 602 __ bind(&slow); |
603 __ IncrementCounter(&Counters::keyed_load_generic_slow, 1, r0, r1); | 603 __ IncrementCounter(&COUNTER(keyed_load_generic_slow), 1, r0, r1); |
604 __ ldm(ia, sp, r0.bit() | r1.bit()); | 604 __ ldm(ia, sp, r0.bit() | r1.bit()); |
605 __ stm(db_w, sp, r0.bit() | r1.bit()); | 605 __ stm(db_w, sp, r0.bit() | r1.bit()); |
606 // Do tail-call to runtime routine. | 606 // Do tail-call to runtime routine. |
607 __ TailCallRuntime(ExternalReference(Runtime::kGetProperty), 2, 1); | 607 __ TailCallRuntime(ExternalReference(Runtime::kGetProperty), 2, 1); |
608 | 608 |
609 // Fast case: Do the load. | 609 // Fast case: Do the load. |
610 __ bind(&fast); | 610 __ bind(&fast); |
611 __ add(r3, r1, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 611 __ add(r3, r1, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
612 __ ldr(r0, MemOperand(r3, r0, LSL, kPointerSizeLog2)); | 612 __ ldr(r0, MemOperand(r3, r0, LSL, kPointerSizeLog2)); |
613 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 613 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 | 834 |
835 // Perform tail call to the entry. | 835 // Perform tail call to the entry. |
836 __ TailCallRuntime(f, 3, 1); | 836 __ TailCallRuntime(f, 3, 1); |
837 } | 837 } |
838 | 838 |
839 | 839 |
840 #undef __ | 840 #undef __ |
841 | 841 |
842 | 842 |
843 } } // namespace v8::internal | 843 } } // namespace v8::internal |
OLD | NEW |