OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3342 // (currently anything except for external arrays which means anything with | 3342 // (currently anything except for external arrays which means anything with |
3343 // elements of FixedArray type). Value must be a number, but only smis are | 3343 // elements of FixedArray type). Value must be a number, but only smis are |
3344 // accepted as the most common case. | 3344 // accepted as the most common case. |
3345 | 3345 |
3346 Label miss; | 3346 Label miss; |
3347 | 3347 |
3348 Register receiver = edx; | 3348 Register receiver = edx; |
3349 Register value = eax; | 3349 Register value = eax; |
3350 Register scratch = ebx; | 3350 Register scratch = ebx; |
3351 | 3351 |
3352 if (kind() == Code::KEYED_LOAD_IC) { | 3352 if (kind() == Code::KEYED_STORE_IC) { |
3353 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_symbol())); | 3353 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_symbol())); |
3354 __ j(not_equal, &miss); | 3354 __ j(not_equal, &miss); |
3355 } | 3355 } |
3356 | 3356 |
3357 // Check that the receiver isn't a smi. | 3357 // Check that the receiver isn't a smi. |
3358 __ JumpIfSmi(receiver, &miss); | 3358 __ JumpIfSmi(receiver, &miss); |
3359 | 3359 |
3360 // Check that the object is a JS array. | 3360 // Check that the object is a JS array. |
3361 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); | 3361 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); |
3362 __ j(not_equal, &miss); | 3362 __ j(not_equal, &miss); |
(...skipping 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7687 // Restore ecx. | 7687 // Restore ecx. |
7688 __ pop(ecx); | 7688 __ pop(ecx); |
7689 __ ret(0); | 7689 __ ret(0); |
7690 } | 7690 } |
7691 | 7691 |
7692 #undef __ | 7692 #undef __ |
7693 | 7693 |
7694 } } // namespace v8::internal | 7694 } } // namespace v8::internal |
7695 | 7695 |
7696 #endif // V8_TARGET_ARCH_IA32 | 7696 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |