Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 203173003: Array constructor expects AllocationSite or undefined as feedback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after
3825 } 3825 }
3826 3826
3827 3827
3828 void LCodeGen::DoCallNew(LCallNew* instr) { 3828 void LCodeGen::DoCallNew(LCallNew* instr) {
3829 ASSERT(ToRegister(instr->context()).is(rsi)); 3829 ASSERT(ToRegister(instr->context()).is(rsi));
3830 ASSERT(ToRegister(instr->constructor()).is(rdi)); 3830 ASSERT(ToRegister(instr->constructor()).is(rdi));
3831 ASSERT(ToRegister(instr->result()).is(rax)); 3831 ASSERT(ToRegister(instr->result()).is(rax));
3832 3832
3833 __ Set(rax, instr->arity()); 3833 __ Set(rax, instr->arity());
3834 // No cell in ebx for construct type feedback in optimized code 3834 // No cell in ebx for construct type feedback in optimized code
3835 Handle<Object> megamorphic_symbol = 3835 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
3836 TypeFeedbackInfo::MegamorphicSentinel(isolate());
3837 __ Move(rbx, megamorphic_symbol);
3838 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); 3836 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
3839 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3837 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3840 } 3838 }
3841 3839
3842 3840
3843 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3841 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3844 ASSERT(ToRegister(instr->context()).is(rsi)); 3842 ASSERT(ToRegister(instr->context()).is(rsi));
3845 ASSERT(ToRegister(instr->constructor()).is(rdi)); 3843 ASSERT(ToRegister(instr->constructor()).is(rdi));
3846 ASSERT(ToRegister(instr->result()).is(rax)); 3844 ASSERT(ToRegister(instr->result()).is(rax));
3847 3845
3848 __ Set(rax, instr->arity()); 3846 __ Set(rax, instr->arity());
3849 __ Move(rbx, TypeFeedbackInfo::MegamorphicSentinel(isolate())); 3847 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
3850 ElementsKind kind = instr->hydrogen()->elements_kind(); 3848 ElementsKind kind = instr->hydrogen()->elements_kind();
3851 AllocationSiteOverrideMode override_mode = 3849 AllocationSiteOverrideMode override_mode =
3852 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) 3850 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
3853 ? DISABLE_ALLOCATION_SITES 3851 ? DISABLE_ALLOCATION_SITES
3854 : DONT_OVERRIDE; 3852 : DONT_OVERRIDE;
3855 3853
3856 if (instr->arity() == 0) { 3854 if (instr->arity() == 0) {
3857 ArrayNoArgumentConstructorStub stub(kind, override_mode); 3855 ArrayNoArgumentConstructorStub stub(kind, override_mode);
3858 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3856 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3859 } else if (instr->arity() == 1) { 3857 } else if (instr->arity() == 1) {
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
5642 FixedArray::kHeaderSize - kPointerSize)); 5640 FixedArray::kHeaderSize - kPointerSize));
5643 __ bind(&done); 5641 __ bind(&done);
5644 } 5642 }
5645 5643
5646 5644
5647 #undef __ 5645 #undef __
5648 5646
5649 } } // namespace v8::internal 5647 } } // namespace v8::internal
5650 5648
5651 #endif // V8_TARGET_ARCH_X64 5649 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698