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

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

Issue 535873002: Encapsulate megamorphic load/tail-call in hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 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/ia32/lithium-ia32.h ('k') | src/ic/arm/ic-arm.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ia32/lithium-codegen-ia32.h" 10 #include "src/ia32/lithium-codegen-ia32.h"
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); 1132 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
1133 ops.Add(op, zone()); 1133 ops.Add(op, zone());
1134 } 1134 }
1135 1135
1136 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1136 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
1137 descriptor, ops, zone()); 1137 descriptor, ops, zone());
1138 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1138 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1139 } 1139 }
1140 1140
1141 1141
1142 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache(
1143 HTailCallThroughMegamorphicCache* instr) {
1144 LOperand* context = UseFixed(instr->context(), esi);
1145 LOperand* receiver_register =
1146 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister());
1147 LOperand* name_register =
1148 UseFixed(instr->name(), LoadDescriptor::NameRegister());
1149 // Not marked as call. It can't deoptimize, and it never returns.
1150 return new (zone()) LTailCallThroughMegamorphicCache(
1151 context, receiver_register, name_register);
1152 }
1153
1154
1142 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 1155 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
1143 LOperand* context = UseFixed(instr->context(), esi); 1156 LOperand* context = UseFixed(instr->context(), esi);
1144 LOperand* function = UseFixed(instr->function(), edi); 1157 LOperand* function = UseFixed(instr->function(), edi);
1145 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); 1158 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function);
1146 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1159 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1147 } 1160 }
1148 1161
1149 1162
1150 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1163 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1151 switch (instr->op()) { 1164 switch (instr->op()) {
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2701 LOperand* function = UseRegisterAtStart(instr->function()); 2714 LOperand* function = UseRegisterAtStart(instr->function());
2702 LAllocateBlockContext* result = 2715 LAllocateBlockContext* result =
2703 new(zone()) LAllocateBlockContext(context, function); 2716 new(zone()) LAllocateBlockContext(context, function);
2704 return MarkAsCall(DefineFixed(result, esi), instr); 2717 return MarkAsCall(DefineFixed(result, esi), instr);
2705 } 2718 }
2706 2719
2707 2720
2708 } } // namespace v8::internal 2721 } } // namespace v8::internal
2709 2722
2710 #endif // V8_TARGET_ARCH_IA32 2723 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ic/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698