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

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

Issue 9643001: Inline functions that use arguments object in f.apply(o, arguments) pattern. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: regression test Created 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 HInstanceOfKnownGlobal* instr) { 1104 HInstanceOfKnownGlobal* instr) {
1105 LInstanceOfKnownGlobal* result = 1105 LInstanceOfKnownGlobal* result =
1106 new(zone()) LInstanceOfKnownGlobal( 1106 new(zone()) LInstanceOfKnownGlobal(
1107 UseFixed(instr->context(), esi), 1107 UseFixed(instr->context(), esi),
1108 UseFixed(instr->left(), InstanceofStub::left()), 1108 UseFixed(instr->left(), InstanceofStub::left()),
1109 FixedTemp(edi)); 1109 FixedTemp(edi));
1110 return MarkAsCall(DefineFixed(result, eax), instr); 1110 return MarkAsCall(DefineFixed(result, eax), instr);
1111 } 1111 }
1112 1112
1113 1113
1114 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
1115 LOperand* receiver = UseRegister(instr->receiver());
1116 LOperand* function = UseRegisterAtStart(instr->function());
1117 LOperand* temp = TempRegister();
1118 LWrapReceiver* result =
1119 new(zone()) LWrapReceiver(receiver, function, temp);
1120 return AssignEnvironment(DefineSameAsFirst(result));
1121 }
1122
1123
1114 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { 1124 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) {
1115 LOperand* function = UseFixed(instr->function(), edi); 1125 LOperand* function = UseFixed(instr->function(), edi);
1116 LOperand* receiver = UseFixed(instr->receiver(), eax); 1126 LOperand* receiver = UseFixed(instr->receiver(), eax);
1117 LOperand* length = UseFixed(instr->length(), ebx); 1127 LOperand* length = UseFixed(instr->length(), ebx);
1118 LOperand* elements = UseFixed(instr->elements(), ecx); 1128 LOperand* elements = UseFixed(instr->elements(), ecx);
1119 LOperand* temp = FixedTemp(edx);
1120 LApplyArguments* result = new(zone()) LApplyArguments(function, 1129 LApplyArguments* result = new(zone()) LApplyArguments(function,
1121 receiver, 1130 receiver,
1122 length, 1131 length,
1123 elements, 1132 elements);
1124 temp);
1125 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY); 1133 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY);
1126 } 1134 }
1127 1135
1128 1136
1129 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { 1137 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1130 ++argument_count_; 1138 ++argument_count_;
1131 LOperand* argument = UseAny(instr->argument()); 1139 LOperand* argument = UseAny(instr->argument());
1132 return new(zone()) LPushArgument(argument); 1140 return new(zone()) LPushArgument(argument);
1133 } 1141 }
1134 1142
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2424 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2417 LOperand* object = UseRegister(instr->object()); 2425 LOperand* object = UseRegister(instr->object());
2418 LOperand* index = UseTempRegister(instr->index()); 2426 LOperand* index = UseTempRegister(instr->index());
2419 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2427 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2420 } 2428 }
2421 2429
2422 2430
2423 } } // namespace v8::internal 2431 } } // namespace v8::internal
2424 2432
2425 #endif // V8_TARGET_ARCH_IA32 2433 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698