Chromium Code Reviews| 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 651 int displacement = Array::kHeaderSize - kHeapObjectTag - | 651 int displacement = Array::kHeaderSize - kHeapObjectTag - | 
| 652 ((1 << kSmiTagSize) * 2); | 652 ((1 << kSmiTagSize) * 2); | 
| 653 __ add(r2, r2, Operand(displacement)); | 653 __ add(r2, r2, Operand(displacement)); | 
| 654 __ add(r2, r2, Operand(r1, LSL, kPointerSizeLog2 - kSmiTagSize)); | 654 __ add(r2, r2, Operand(r1, LSL, kPointerSizeLog2 - kSmiTagSize)); | 
| 655 __ b(&fast); | 655 __ b(&fast); | 
| 656 | 656 | 
| 657 | 657 | 
| 658 // Array case: Get the length and the elements array from the JS | 658 // Array case: Get the length and the elements array from the JS | 
| 659 // array. Check that the array is in fast mode; if it is the | 659 // array. Check that the array is in fast mode; if it is the | 
| 660 // length is always a smi. | 660 // length is always a smi. | 
| 661 // r0 == value, r1 == key, r3 == object | 661 // r0 == value, r3 == object | 
| 662 __ bind(&array); | 662 __ bind(&array); | 
| 663 __ ldr(r2, FieldMemOperand(r3, JSObject::kElementsOffset)); | 663 __ ldr(r2, FieldMemOperand(r3, JSObject::kElementsOffset)); | 
| 664 __ ldr(ip, FieldMemOperand(r2, HeapObject::kMapOffset)); | 664 __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); | 
| 665 __ cmp(ip, Operand(Factory::hash_table_map())); | 665 __ cmp(r1, Operand(Factory::hash_table_map())); | 
| 666 __ b(eq, &slow); | 666 __ b(eq, &slow); | 
| 667 | 667 | 
| 668 // Check the key against the length in the array, compute the | 668 // Check the key against the length in the array, compute the | 
| 669 // address to store into and fall through to fast case. | 669 // address to store into and fall through to fast case. | 
| 670 __ ldr(r1, MemOperand(sp)); // resotre key | |
| 
 
iposva
2008/11/20 17:37:36
resotre -> restore
 
 | |
| 670 // r0 == value, r1 == key, r2 == elements, r3 == object. | 671 // r0 == value, r1 == key, r2 == elements, r3 == object. | 
| 671 __ ldr(ip, FieldMemOperand(r3, JSArray::kLengthOffset)); | 672 __ ldr(ip, FieldMemOperand(r3, JSArray::kLengthOffset)); | 
| 672 __ cmp(r1, Operand(ip)); | 673 __ cmp(r1, Operand(ip)); | 
| 673 __ b(hs, &extra); | 674 __ b(hs, &extra); | 
| 674 __ mov(r3, Operand(r2)); | 675 __ mov(r3, Operand(r2)); | 
| 675 __ add(r2, r2, Operand(Array::kHeaderSize - kHeapObjectTag)); | 676 __ add(r2, r2, Operand(Array::kHeaderSize - kHeapObjectTag)); | 
| 676 __ add(r2, r2, Operand(r1, LSL, kPointerSizeLog2 - kSmiTagSize)); | 677 __ add(r2, r2, Operand(r1, LSL, kPointerSizeLog2 - kSmiTagSize)); | 
| 677 | 678 | 
| 678 | 679 | 
| 679 // Fast case: Do the store. | 680 // Fast case: Do the store. | 
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 757 | 758 | 
| 758 // Perform tail call to the entry. | 759 // Perform tail call to the entry. | 
| 759 __ TailCallRuntime(f, 3); | 760 __ TailCallRuntime(f, 3); | 
| 760 } | 761 } | 
| 761 | 762 | 
| 762 | 763 | 
| 763 #undef __ | 764 #undef __ | 
| 764 | 765 | 
| 765 | 766 | 
| 766 } } // namespace v8::internal | 767 } } // namespace v8::internal | 
| OLD | NEW |