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 3845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3856 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 3856 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
3857 } | 3857 } |
3858 | 3858 |
3859 | 3859 |
3860 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 3860 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
3861 ASSERT(ToRegister(instr->context()).is(rsi)); | 3861 ASSERT(ToRegister(instr->context()).is(rsi)); |
3862 ASSERT(ToRegister(instr->constructor()).is(rdi)); | 3862 ASSERT(ToRegister(instr->constructor()).is(rdi)); |
3863 ASSERT(ToRegister(instr->result()).is(rax)); | 3863 ASSERT(ToRegister(instr->result()).is(rax)); |
3864 | 3864 |
3865 __ Set(rax, instr->arity()); | 3865 __ Set(rax, instr->arity()); |
3866 __ Move(rbx, instr->hydrogen()->property_cell()); | 3866 __ Move(rbx, factory()->undefined_value()); |
3867 ElementsKind kind = instr->hydrogen()->elements_kind(); | 3867 ElementsKind kind = instr->hydrogen()->elements_kind(); |
3868 AllocationSiteOverrideMode override_mode = | 3868 AllocationSiteOverrideMode override_mode = |
3869 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) | 3869 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
3870 ? DISABLE_ALLOCATION_SITES | 3870 ? DISABLE_ALLOCATION_SITES |
3871 : DONT_OVERRIDE; | 3871 : DONT_OVERRIDE; |
3872 | 3872 |
3873 if (instr->arity() == 0) { | 3873 if (instr->arity() == 0) { |
3874 ArrayNoArgumentConstructorStub stub(kind, override_mode); | 3874 ArrayNoArgumentConstructorStub stub(kind, override_mode); |
3875 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 3875 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
3876 } else if (instr->arity() == 1) { | 3876 } else if (instr->arity() == 1) { |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5636 FixedArray::kHeaderSize - kPointerSize)); | 5636 FixedArray::kHeaderSize - kPointerSize)); |
5637 __ bind(&done); | 5637 __ bind(&done); |
5638 } | 5638 } |
5639 | 5639 |
5640 | 5640 |
5641 #undef __ | 5641 #undef __ |
5642 | 5642 |
5643 } } // namespace v8::internal | 5643 } } // namespace v8::internal |
5644 | 5644 |
5645 #endif // V8_TARGET_ARCH_X64 | 5645 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |