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

Side by Side Diff: src/builtins/ia32/builtins-ia32.cc

Issue 2165633003: Revert of [Interpreter] Collect type feedback for 'new' in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « src/builtins/builtins.cc ('k') | src/builtins/mips/builtins-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 RelocInfo::CODE_TARGET); 751 RelocInfo::CODE_TARGET);
752 } else { 752 } else {
753 DCHECK_EQ(function_type, CallableType::kAny); 753 DCHECK_EQ(function_type, CallableType::kAny);
754 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, 754 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
755 tail_call_mode), 755 tail_call_mode),
756 RelocInfo::CODE_TARGET); 756 RelocInfo::CODE_TARGET);
757 } 757 }
758 } 758 }
759 759
760 // static 760 // static
761 void Builtins::Generate_InterpreterPushArgsAndConstructImpl( 761 void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
762 MacroAssembler* masm, CallableType construct_type) {
763 // ----------- S t a t e ------------- 762 // ----------- S t a t e -------------
764 // -- eax : the number of arguments (not including the receiver) 763 // -- eax : the number of arguments (not including the receiver)
765 // -- edx : the new target 764 // -- edx : the new target
766 // -- edi : the constructor 765 // -- edi : the constructor
767 // -- ebx : the address of the first argument to be pushed. Subsequent 766 // -- ebx : the address of the first argument to be pushed. Subsequent
768 // arguments should be consecutive above this, in the same order as 767 // arguments should be consecutive above this, in the same order as
769 // they are to be pushed onto the stack. 768 // they are to be pushed onto the stack.
770 // ----------------------------------- 769 // -----------------------------------
771 770
772 // Pop return address to allow tail-call after pushing arguments. 771 // Pop return address to allow tail-call after pushing arguments.
(...skipping 11 matching lines...) Expand all
784 783
785 Generate_InterpreterPushArgs(masm, edi); 784 Generate_InterpreterPushArgs(masm, edi);
786 785
787 // Restore the constructor from slot on stack. It was pushed at the slot 786 // Restore the constructor from slot on stack. It was pushed at the slot
788 // meant for receiver. 787 // meant for receiver.
789 __ mov(edi, Operand(esp, eax, times_pointer_size, 0)); 788 __ mov(edi, Operand(esp, eax, times_pointer_size, 0));
790 789
791 // Re-push return address. 790 // Re-push return address.
792 __ Push(ecx); 791 __ Push(ecx);
793 792
794 if (construct_type == CallableType::kJSFunction) { 793 // Call the constructor with unmodified eax, edi, ebi values.
795 // TODO(mythria): Change this when allocation site feedback is available. 794 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
796 // ConstructFunction initializes allocation site to undefined.
797 __ Jump(masm->isolate()->builtins()->ConstructFunction(),
798 RelocInfo::CODE_TARGET);
799 } else {
800 DCHECK_EQ(construct_type, CallableType::kAny);
801
802 // Call the constructor with unmodified eax, edi, ebi values.
803 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
804 }
805 } 795 }
806 796
807 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { 797 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
808 // Set the return address to the correct point in the interpreter entry 798 // Set the return address to the correct point in the interpreter entry
809 // trampoline. 799 // trampoline.
810 Smi* interpreter_entry_return_pc_offset( 800 Smi* interpreter_entry_return_pc_offset(
811 masm->isolate()->heap()->interpreter_entry_return_pc_offset()); 801 masm->isolate()->heap()->interpreter_entry_return_pc_offset());
812 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0)); 802 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0));
813 __ LoadHeapObject(ebx, 803 __ LoadHeapObject(ebx,
814 masm->isolate()->builtins()->InterpreterEntryTrampoline()); 804 masm->isolate()->builtins()->InterpreterEntryTrampoline());
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3013 3003
3014 // And "return" to the OSR entry point of the function. 3004 // And "return" to the OSR entry point of the function.
3015 __ ret(0); 3005 __ ret(0);
3016 } 3006 }
3017 3007
3018 #undef __ 3008 #undef __
3019 } // namespace internal 3009 } // namespace internal
3020 } // namespace v8 3010 } // namespace v8
3021 3011
3022 #endif // V8_TARGET_ARCH_IA32 3012 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/builtins/builtins.cc ('k') | src/builtins/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698