OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 | 664 |
665 | 665 |
666 bool LCodeGen::GeneratePrologue() { | 666 bool LCodeGen::GeneratePrologue() { |
667 ASSERT(is_generating()); | 667 ASSERT(is_generating()); |
668 | 668 |
669 if (info()->IsOptimizing()) { | 669 if (info()->IsOptimizing()) { |
670 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 670 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
671 | 671 |
672 // TODO(all): Add support for stop_t FLAG in DEBUG mode. | 672 // TODO(all): Add support for stop_t FLAG in DEBUG mode. |
673 | 673 |
674 // Classic mode functions and builtins need to replace the receiver with the | 674 // Sloppy mode functions and builtins need to replace the receiver with the |
675 // global proxy when called as functions (without an explicit receiver | 675 // global proxy when called as functions (without an explicit receiver |
676 // object). | 676 // object). |
677 if (info_->this_has_uses() && | 677 if (info_->this_has_uses() && |
678 info_->is_classic_mode() && | 678 info_->is_sloppy_mode() && |
679 !info_->is_native()) { | 679 !info_->is_native()) { |
680 Label ok; | 680 Label ok; |
681 int receiver_offset = info_->scope()->num_parameters() * kXRegSizeInBytes; | 681 int receiver_offset = info_->scope()->num_parameters() * kXRegSizeInBytes; |
682 __ Peek(x10, receiver_offset); | 682 __ Peek(x10, receiver_offset); |
683 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 683 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); |
684 | 684 |
685 __ Ldr(x10, GlobalObjectMemOperand()); | 685 __ Ldr(x10, GlobalObjectMemOperand()); |
686 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalReceiverOffset)); | 686 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalReceiverOffset)); |
687 __ Poke(x10, receiver_offset); | 687 __ Poke(x10, receiver_offset); |
688 | 688 |
(...skipping 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3422 case FLOAT64_ELEMENTS: | 3422 case FLOAT64_ELEMENTS: |
3423 case EXTERNAL_FLOAT32_ELEMENTS: | 3423 case EXTERNAL_FLOAT32_ELEMENTS: |
3424 case EXTERNAL_FLOAT64_ELEMENTS: | 3424 case EXTERNAL_FLOAT64_ELEMENTS: |
3425 case FAST_HOLEY_DOUBLE_ELEMENTS: | 3425 case FAST_HOLEY_DOUBLE_ELEMENTS: |
3426 case FAST_HOLEY_ELEMENTS: | 3426 case FAST_HOLEY_ELEMENTS: |
3427 case FAST_HOLEY_SMI_ELEMENTS: | 3427 case FAST_HOLEY_SMI_ELEMENTS: |
3428 case FAST_DOUBLE_ELEMENTS: | 3428 case FAST_DOUBLE_ELEMENTS: |
3429 case FAST_ELEMENTS: | 3429 case FAST_ELEMENTS: |
3430 case FAST_SMI_ELEMENTS: | 3430 case FAST_SMI_ELEMENTS: |
3431 case DICTIONARY_ELEMENTS: | 3431 case DICTIONARY_ELEMENTS: |
3432 case NON_STRICT_ARGUMENTS_ELEMENTS: | 3432 case SLOPPY_ARGUMENTS_ELEMENTS: |
3433 UNREACHABLE(); | 3433 UNREACHABLE(); |
3434 break; | 3434 break; |
3435 } | 3435 } |
3436 } | 3436 } |
3437 } | 3437 } |
3438 | 3438 |
3439 | 3439 |
3440 void LCodeGen::CalcKeyedArrayBaseRegister(Register base, | 3440 void LCodeGen::CalcKeyedArrayBaseRegister(Register base, |
3441 Register elements, | 3441 Register elements, |
3442 Register key, | 3442 Register key, |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4933 case FLOAT64_ELEMENTS: | 4933 case FLOAT64_ELEMENTS: |
4934 case EXTERNAL_FLOAT32_ELEMENTS: | 4934 case EXTERNAL_FLOAT32_ELEMENTS: |
4935 case EXTERNAL_FLOAT64_ELEMENTS: | 4935 case EXTERNAL_FLOAT64_ELEMENTS: |
4936 case FAST_DOUBLE_ELEMENTS: | 4936 case FAST_DOUBLE_ELEMENTS: |
4937 case FAST_ELEMENTS: | 4937 case FAST_ELEMENTS: |
4938 case FAST_SMI_ELEMENTS: | 4938 case FAST_SMI_ELEMENTS: |
4939 case FAST_HOLEY_DOUBLE_ELEMENTS: | 4939 case FAST_HOLEY_DOUBLE_ELEMENTS: |
4940 case FAST_HOLEY_ELEMENTS: | 4940 case FAST_HOLEY_ELEMENTS: |
4941 case FAST_HOLEY_SMI_ELEMENTS: | 4941 case FAST_HOLEY_SMI_ELEMENTS: |
4942 case DICTIONARY_ELEMENTS: | 4942 case DICTIONARY_ELEMENTS: |
4943 case NON_STRICT_ARGUMENTS_ELEMENTS: | 4943 case SLOPPY_ARGUMENTS_ELEMENTS: |
4944 UNREACHABLE(); | 4944 UNREACHABLE(); |
4945 break; | 4945 break; |
4946 } | 4946 } |
4947 } | 4947 } |
4948 } | 4948 } |
4949 | 4949 |
4950 | 4950 |
4951 void LCodeGen::DoStoreKeyedFixedDouble(LStoreKeyedFixedDouble* instr) { | 4951 void LCodeGen::DoStoreKeyedFixedDouble(LStoreKeyedFixedDouble* instr) { |
4952 Register elements = ToRegister(instr->elements()); | 4952 Register elements = ToRegister(instr->elements()); |
4953 DoubleRegister value = ToDoubleRegister(instr->value()); | 4953 DoubleRegister value = ToDoubleRegister(instr->value()); |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5699 __ Bind(&out_of_object); | 5699 __ Bind(&out_of_object); |
5700 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5700 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5701 // Index is equal to negated out of object property index plus 1. | 5701 // Index is equal to negated out of object property index plus 1. |
5702 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5702 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5703 __ Ldr(result, FieldMemOperand(result, | 5703 __ Ldr(result, FieldMemOperand(result, |
5704 FixedArray::kHeaderSize - kPointerSize)); | 5704 FixedArray::kHeaderSize - kPointerSize)); |
5705 __ Bind(&done); | 5705 __ Bind(&done); |
5706 } | 5706 } |
5707 | 5707 |
5708 } } // namespace v8::internal | 5708 } } // namespace v8::internal |
OLD | NEW |