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

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

Issue 6838018: Support %_CallFunction in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Include regression test. Created 9 years, 8 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 296
297 void LStoreContextSlot::PrintDataTo(StringStream* stream) { 297 void LStoreContextSlot::PrintDataTo(StringStream* stream) {
298 InputAt(0)->PrintTo(stream); 298 InputAt(0)->PrintTo(stream);
299 stream->Add("[%d] <- ", slot_index()); 299 stream->Add("[%d] <- ", slot_index());
300 InputAt(1)->PrintTo(stream); 300 InputAt(1)->PrintTo(stream);
301 } 301 }
302 302
303 303
304 void LInvokeFunction::PrintDataTo(StringStream* stream) {
305 stream->Add("= ");
306 InputAt(0)->PrintTo(stream);
307 stream->Add(" #%d / ", arity());
308 }
309
310
304 void LCallKeyed::PrintDataTo(StringStream* stream) { 311 void LCallKeyed::PrintDataTo(StringStream* stream) {
305 stream->Add("[r2] #%d / ", arity()); 312 stream->Add("[r2] #%d / ", arity());
306 } 313 }
307 314
308 315
309 void LCallNamed::PrintDataTo(StringStream* stream) { 316 void LCallNamed::PrintDataTo(StringStream* stream) {
310 SmartPointer<char> name_string = name()->ToCString(); 317 SmartPointer<char> name_string = name()->ToCString();
311 stream->Add("%s #%d / ", *name_string, arity()); 318 stream->Add("%s #%d / ", *name_string, arity());
312 } 319 }
313 320
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 } 1212 }
1206 1213
1207 1214
1208 LInstruction* LChunkBuilder::DoCallConstantFunction( 1215 LInstruction* LChunkBuilder::DoCallConstantFunction(
1209 HCallConstantFunction* instr) { 1216 HCallConstantFunction* instr) {
1210 argument_count_ -= instr->argument_count(); 1217 argument_count_ -= instr->argument_count();
1211 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr); 1218 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr);
1212 } 1219 }
1213 1220
1214 1221
1222 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
1223 LOperand* function = UseFixed(instr->function(), r1);
1224 argument_count_ -= instr->argument_count();
1225 LInvokeFunction* result = new LInvokeFunction(function);
1226 return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1227 }
1228
1229
1215 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1230 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1216 BuiltinFunctionId op = instr->op(); 1231 BuiltinFunctionId op = instr->op();
1217 if (op == kMathLog || op == kMathSin || op == kMathCos) { 1232 if (op == kMathLog || op == kMathSin || op == kMathCos) {
1218 LOperand* input = UseFixedDouble(instr->value(), d2); 1233 LOperand* input = UseFixedDouble(instr->value(), d2);
1219 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); 1234 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL);
1220 return MarkAsCall(DefineFixedDouble(result, d2), instr); 1235 return MarkAsCall(DefineFixedDouble(result, d2), instr);
1221 } else { 1236 } else {
1222 LOperand* input = UseRegisterAtStart(instr->value()); 1237 LOperand* input = UseRegisterAtStart(instr->value());
1223 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; 1238 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL;
1224 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); 1239 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp);
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 2126
2112 2127
2113 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2128 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2114 HEnvironment* outer = current_block_->last_environment()->outer(); 2129 HEnvironment* outer = current_block_->last_environment()->outer();
2115 current_block_->UpdateEnvironment(outer); 2130 current_block_->UpdateEnvironment(outer);
2116 return NULL; 2131 return NULL;
2117 } 2132 }
2118 2133
2119 2134
2120 } } // namespace v8::internal 2135 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698