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

Side by Side Diff: src/a64/builtins-a64.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 | « no previous file | src/a64/code-stubs-a64.cc » ('j') | 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (FLAG_debug_code) { 142 if (FLAG_debug_code) {
143 // Initial map for the builtin Array functions should be maps. 143 // Initial map for the builtin Array functions should be maps.
144 __ Ldr(x10, FieldMemOperand(x1, JSFunction::kPrototypeOrInitialMapOffset)); 144 __ Ldr(x10, FieldMemOperand(x1, JSFunction::kPrototypeOrInitialMapOffset));
145 __ Tst(x10, kSmiTagMask); 145 __ Tst(x10, kSmiTagMask);
146 __ Assert(ne, kUnexpectedInitialMapForArrayFunction); 146 __ Assert(ne, kUnexpectedInitialMapForArrayFunction);
147 __ CompareObjectType(x10, x11, x12, MAP_TYPE); 147 __ CompareObjectType(x10, x11, x12, MAP_TYPE);
148 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); 148 __ Assert(eq, kUnexpectedInitialMapForArrayFunction);
149 } 149 }
150 150
151 // Run the native code for the Array function called as a normal function. 151 // Run the native code for the Array function called as a normal function.
152 Handle<Object> megamorphic_sentinel = 152 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
153 TypeFeedbackInfo::MegamorphicSentinel(masm->isolate());
154 __ Mov(x2, Operand(megamorphic_sentinel));
155 ArrayConstructorStub stub(masm->isolate()); 153 ArrayConstructorStub stub(masm->isolate());
156 __ TailCallStub(&stub); 154 __ TailCallStub(&stub);
157 } 155 }
158 156
159 157
160 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { 158 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
161 // ----------- S t a t e ------------- 159 // ----------- S t a t e -------------
162 // -- x0 : number of arguments 160 // -- x0 : number of arguments
163 // -- x1 : constructor function 161 // -- x1 : constructor function
164 // -- lr : return address 162 // -- lr : return address
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 __ Mov(x25, x19); 719 __ Mov(x25, x19);
722 // Don't initialize the reserved registers. 720 // Don't initialize the reserved registers.
723 // x26 : root register (root). 721 // x26 : root register (root).
724 // x27 : context pointer (cp). 722 // x27 : context pointer (cp).
725 // x28 : JS stack pointer (jssp). 723 // x28 : JS stack pointer (jssp).
726 // x29 : frame pointer (fp). 724 // x29 : frame pointer (fp).
727 725
728 __ Mov(x0, argc); 726 __ Mov(x0, argc);
729 if (is_construct) { 727 if (is_construct) {
730 // No type feedback cell is available. 728 // No type feedback cell is available.
731 Handle<Object> megamorphic_sentinel = 729 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
732 TypeFeedbackInfo::MegamorphicSentinel(masm->isolate());
733 __ Mov(x2, Operand(megamorphic_sentinel));
734 730
735 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); 731 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
736 __ CallStub(&stub); 732 __ CallStub(&stub);
737 } else { 733 } else {
738 ParameterCount actual(x0); 734 ParameterCount actual(x0);
739 __ InvokeFunction(function, actual, CALL_FUNCTION, NullCallWrapper()); 735 __ InvokeFunction(function, actual, CALL_FUNCTION, NullCallWrapper());
740 } 736 }
741 // Exit the JS internal frame and remove the parameters (except function), 737 // Exit the JS internal frame and remove the parameters (except function),
742 // and return. 738 // and return.
743 } 739 }
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 __ Bind(&dont_adapt_arguments); 1496 __ Bind(&dont_adapt_arguments);
1501 __ Jump(code_entry); 1497 __ Jump(code_entry);
1502 } 1498 }
1503 1499
1504 1500
1505 #undef __ 1501 #undef __
1506 1502
1507 } } // namespace v8::internal 1503 } } // namespace v8::internal
1508 1504
1509 #endif // V8_TARGET_ARCH_ARM 1505 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/a64/code-stubs-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698