| 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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { | 754 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { |
| 755 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); | 755 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); |
| 756 jump_table_.Add(table_entry, zone()); | 756 jump_table_.Add(table_entry, zone()); |
| 757 } | 757 } |
| 758 if (cc == no_condition) { | 758 if (cc == no_condition) { |
| 759 __ jmp(&jump_table_.last().label); | 759 __ jmp(&jump_table_.last().label); |
| 760 } else { | 760 } else { |
| 761 __ j(cc, &jump_table_.last().label); | 761 __ j(cc, &jump_table_.last().label); |
| 762 } | 762 } |
| 763 } | 763 } |
| 764 __ bind(&done); | |
| 765 } | 764 } |
| 766 | 765 |
| 767 | 766 |
| 768 void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { | 767 void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { |
| 769 ZoneList<Handle<Map> > maps(1, zone()); | 768 ZoneList<Handle<Map> > maps(1, zone()); |
| 770 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 769 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
| 771 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) { | 770 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) { |
| 772 RelocInfo::Mode mode = it.rinfo()->rmode(); | 771 RelocInfo::Mode mode = it.rinfo()->rmode(); |
| 773 if (mode == RelocInfo::EMBEDDED_OBJECT && | 772 if (mode == RelocInfo::EMBEDDED_OBJECT && |
| 774 it.rinfo()->target_object()->IsMap()) { | 773 it.rinfo()->target_object()->IsMap()) { |
| (...skipping 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3883 CALL_AS_FUNCTION, | 3882 CALL_AS_FUNCTION, |
| 3884 RDI_UNINITIALIZED); | 3883 RDI_UNINITIALIZED); |
| 3885 } | 3884 } |
| 3886 | 3885 |
| 3887 | 3886 |
| 3888 void LCodeGen::DoCallNew(LCallNew* instr) { | 3887 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 3889 ASSERT(ToRegister(instr->constructor()).is(rdi)); | 3888 ASSERT(ToRegister(instr->constructor()).is(rdi)); |
| 3890 ASSERT(ToRegister(instr->result()).is(rax)); | 3889 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3891 | 3890 |
| 3892 __ Set(rax, instr->arity()); | 3891 __ Set(rax, instr->arity()); |
| 3893 // No cell in ebx for construct type feedback in optimized code | 3892 if (FLAG_optimize_constructed_arrays) { |
| 3894 Handle<Object> undefined_value(isolate()->factory()->undefined_value()); | 3893 // No cell in ebx for construct type feedback in optimized code |
| 3895 __ Move(rbx, undefined_value); | 3894 Handle<Object> undefined_value(isolate()->factory()->undefined_value()); |
| 3895 __ Move(rbx, undefined_value); |
| 3896 } |
| 3896 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | 3897 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 3897 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 3898 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 3898 } | 3899 } |
| 3899 | 3900 |
| 3900 | 3901 |
| 3901 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 3902 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 3902 ASSERT(ToRegister(instr->constructor()).is(rdi)); | 3903 ASSERT(ToRegister(instr->constructor()).is(rdi)); |
| 3903 ASSERT(ToRegister(instr->result()).is(rax)); | 3904 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3905 ASSERT(FLAG_optimize_constructed_arrays); |
| 3904 | 3906 |
| 3905 __ Set(rax, instr->arity()); | 3907 __ Set(rax, instr->arity()); |
| 3906 __ Move(rbx, instr->hydrogen()->property_cell()); | 3908 __ Move(rbx, instr->hydrogen()->property_cell()); |
| 3907 Handle<Code> array_construct_code = | 3909 Handle<Code> array_construct_code = |
| 3908 isolate()->builtins()->ArrayConstructCode(); | 3910 isolate()->builtins()->ArrayConstructCode(); |
| 3909 | |
| 3910 CallCode(array_construct_code, RelocInfo::CONSTRUCT_CALL, instr); | 3911 CallCode(array_construct_code, RelocInfo::CONSTRUCT_CALL, instr); |
| 3911 } | 3912 } |
| 3912 | 3913 |
| 3913 | 3914 |
| 3914 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 3915 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
| 3915 CallRuntime(instr->function(), instr->arity(), instr); | 3916 CallRuntime(instr->function(), instr->arity(), instr); |
| 3916 } | 3917 } |
| 3917 | 3918 |
| 3918 | 3919 |
| 3919 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 3920 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
| (...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5802 FixedArray::kHeaderSize - kPointerSize)); | 5803 FixedArray::kHeaderSize - kPointerSize)); |
| 5803 __ bind(&done); | 5804 __ bind(&done); |
| 5804 } | 5805 } |
| 5805 | 5806 |
| 5806 | 5807 |
| 5807 #undef __ | 5808 #undef __ |
| 5808 | 5809 |
| 5809 } } // namespace v8::internal | 5810 } } // namespace v8::internal |
| 5810 | 5811 |
| 5811 #endif // V8_TARGET_ARCH_X64 | 5812 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |