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

Side by Side Diff: src/x64/lithium-x64.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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 297
298 298
299 void LStoreContextSlot::PrintDataTo(StringStream* stream) { 299 void LStoreContextSlot::PrintDataTo(StringStream* stream) {
300 InputAt(0)->PrintTo(stream); 300 InputAt(0)->PrintTo(stream);
301 stream->Add("[%d] <- ", slot_index()); 301 stream->Add("[%d] <- ", slot_index());
302 InputAt(1)->PrintTo(stream); 302 InputAt(1)->PrintTo(stream);
303 } 303 }
304 304
305 305
306 void LInvokeFunction::PrintDataTo(StringStream* stream) {
307 stream->Add("= ");
308 InputAt(0)->PrintTo(stream);
309 stream->Add(" #%d / ", arity());
310 }
311
312
306 void LCallKeyed::PrintDataTo(StringStream* stream) { 313 void LCallKeyed::PrintDataTo(StringStream* stream) {
307 stream->Add("[rcx] #%d / ", arity()); 314 stream->Add("[rcx] #%d / ", arity());
308 } 315 }
309 316
310 317
311 void LCallNamed::PrintDataTo(StringStream* stream) { 318 void LCallNamed::PrintDataTo(StringStream* stream) {
312 SmartPointer<char> name_string = name()->ToCString(); 319 SmartPointer<char> name_string = name()->ToCString();
313 stream->Add("%s #%d / ", *name_string, arity()); 320 stream->Add("%s #%d / ", *name_string, arity());
314 } 321 }
315 322
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 } 1211 }
1205 1212
1206 1213
1207 LInstruction* LChunkBuilder::DoCallConstantFunction( 1214 LInstruction* LChunkBuilder::DoCallConstantFunction(
1208 HCallConstantFunction* instr) { 1215 HCallConstantFunction* instr) {
1209 argument_count_ -= instr->argument_count(); 1216 argument_count_ -= instr->argument_count();
1210 return MarkAsCall(DefineFixed(new LCallConstantFunction, rax), instr); 1217 return MarkAsCall(DefineFixed(new LCallConstantFunction, rax), instr);
1211 } 1218 }
1212 1219
1213 1220
1221 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
1222 LOperand* function = UseFixed(instr->function(), rdi);
1223 argument_count_ -= instr->argument_count();
1224 LInvokeFunction* result = new LInvokeFunction(function);
1225 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1226 }
1227
1228
1214 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1229 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1215 BuiltinFunctionId op = instr->op(); 1230 BuiltinFunctionId op = instr->op();
1216 if (op == kMathLog || op == kMathSin || op == kMathCos) { 1231 if (op == kMathLog || op == kMathSin || op == kMathCos) {
1217 LOperand* input = UseFixedDouble(instr->value(), xmm1); 1232 LOperand* input = UseFixedDouble(instr->value(), xmm1);
1218 LUnaryMathOperation* result = new LUnaryMathOperation(input); 1233 LUnaryMathOperation* result = new LUnaryMathOperation(input);
1219 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); 1234 return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1220 } else { 1235 } else {
1221 LOperand* input = UseRegisterAtStart(instr->value()); 1236 LOperand* input = UseRegisterAtStart(instr->value());
1222 LUnaryMathOperation* result = new LUnaryMathOperation(input); 1237 LUnaryMathOperation* result = new LUnaryMathOperation(input);
1223 switch (op) { 1238 switch (op) {
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 2121
2107 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2122 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2108 HEnvironment* outer = current_block_->last_environment()->outer(); 2123 HEnvironment* outer = current_block_->last_environment()->outer();
2109 current_block_->UpdateEnvironment(outer); 2124 current_block_->UpdateEnvironment(outer);
2110 return NULL; 2125 return NULL;
2111 } 2126 }
2112 2127
2113 } } // namespace v8::internal 2128 } } // namespace v8::internal
2114 2129
2115 #endif // V8_TARGET_ARCH_X64 2130 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698