OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 __ j(equal, &slow); | 758 __ j(equal, &slow); |
759 __ CmpInstanceType(edi, JS_FUNCTION_PROXY_TYPE); | 759 __ CmpInstanceType(edi, JS_FUNCTION_PROXY_TYPE); |
760 __ j(equal, &slow); | 760 __ j(equal, &slow); |
761 | 761 |
762 // Object case: Check key against length in the elements array. | 762 // Object case: Check key against length in the elements array. |
763 // eax: value | 763 // eax: value |
764 // edx: JSObject | 764 // edx: JSObject |
765 // ecx: key (a smi) | 765 // ecx: key (a smi) |
766 // edi: receiver map | 766 // edi: receiver map |
767 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); | 767 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); |
768 // Check that the object is in fast mode and writable. | 768 // Check array bounds. Both the key and the length of FixedArray are smis. |
769 __ cmp(ecx, FieldOperand(ebx, FixedArray::kLengthOffset)); | 769 __ cmp(ecx, FieldOperand(ebx, FixedArray::kLengthOffset)); |
770 __ j(below, &fast_object_with_map_check); | 770 __ j(below, &fast_object_with_map_check); |
771 | 771 |
772 // Slow case: call runtime. | 772 // Slow case: call runtime. |
773 __ bind(&slow); | 773 __ bind(&slow); |
774 GenerateRuntimeSetProperty(masm, strict_mode); | 774 GenerateRuntimeSetProperty(masm, strict_mode); |
775 | 775 |
776 // Extra capacity case: Check if there is extra capacity to | 776 // Extra capacity case: Check if there is extra capacity to |
777 // perform the store and update the length. Used for adding one | 777 // perform the store and update the length. Used for adding one |
778 // element to the array by writing to array[array.length]. | 778 // element to the array by writing to array[array.length]. |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1683 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1684 ? not_zero | 1684 ? not_zero |
1685 : zero; | 1685 : zero; |
1686 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1686 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1687 } | 1687 } |
1688 | 1688 |
1689 | 1689 |
1690 } } // namespace v8::internal | 1690 } } // namespace v8::internal |
1691 | 1691 |
1692 #endif // V8_TARGET_ARCH_IA32 | 1692 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |