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 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3674 __ mov(ecx, instr->name()); | 3674 __ mov(ecx, instr->name()); |
3675 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) | 3675 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) |
3676 ? isolate()->builtins()->StoreIC_Initialize_Strict() | 3676 ? isolate()->builtins()->StoreIC_Initialize_Strict() |
3677 : isolate()->builtins()->StoreIC_Initialize(); | 3677 : isolate()->builtins()->StoreIC_Initialize(); |
3678 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3678 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3679 } | 3679 } |
3680 | 3680 |
3681 | 3681 |
3682 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { | 3682 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
3683 if (instr->index()->IsConstantOperand()) { | 3683 if (instr->index()->IsConstantOperand()) { |
3684 __ cmp(ToOperand(instr->length()), | 3684 int constant_index = |
3685 Immediate(ToInteger32(LConstantOperand::cast(instr->index())))); | 3685 ToInteger32(LConstantOperand::cast(instr->index())); |
| 3686 if (instr->hydrogen()->length()->representation().IsTagged()) { |
| 3687 __ cmp(ToOperand(instr->length()), |
| 3688 Immediate(Smi::FromInt(constant_index))); |
| 3689 } else { |
| 3690 __ cmp(ToOperand(instr->length()), Immediate(constant_index)); |
| 3691 } |
3686 DeoptimizeIf(below_equal, instr->environment()); | 3692 DeoptimizeIf(below_equal, instr->environment()); |
3687 } else { | 3693 } else { |
3688 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); | 3694 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); |
3689 DeoptimizeIf(above_equal, instr->environment()); | 3695 DeoptimizeIf(above_equal, instr->environment()); |
3690 } | 3696 } |
3691 } | 3697 } |
3692 | 3698 |
3693 | 3699 |
3694 void LCodeGen::DoStoreKeyedSpecializedArrayElement( | 3700 void LCodeGen::DoStoreKeyedSpecializedArrayElement( |
3695 LStoreKeyedSpecializedArrayElement* instr) { | 3701 LStoreKeyedSpecializedArrayElement* instr) { |
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5359 FixedArray::kHeaderSize - kPointerSize)); | 5365 FixedArray::kHeaderSize - kPointerSize)); |
5360 __ bind(&done); | 5366 __ bind(&done); |
5361 } | 5367 } |
5362 | 5368 |
5363 | 5369 |
5364 #undef __ | 5370 #undef __ |
5365 | 5371 |
5366 } } // namespace v8::internal | 5372 } } // namespace v8::internal |
5367 | 5373 |
5368 #endif // V8_TARGET_ARCH_IA32 | 5374 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |