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

Side by Side Diff: src/ia32/lithium-ia32.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(" ");
310 InputAt(1)->PrintTo(stream);
311 stream->Add(" #%d / ", arity());
312 }
313
314
306 void LCallKeyed::PrintDataTo(StringStream* stream) { 315 void LCallKeyed::PrintDataTo(StringStream* stream) {
307 stream->Add("[ecx] #%d / ", arity()); 316 stream->Add("[ecx] #%d / ", arity());
308 } 317 }
309 318
310 319
311 void LCallNamed::PrintDataTo(StringStream* stream) { 320 void LCallNamed::PrintDataTo(StringStream* stream) {
312 SmartPointer<char> name_string = name()->ToCString(); 321 SmartPointer<char> name_string = name()->ToCString();
313 stream->Add("%s #%d / ", *name_string, arity()); 322 stream->Add("%s #%d / ", *name_string, arity());
314 } 323 }
315 324
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 } 1224 }
1216 1225
1217 1226
1218 LInstruction* LChunkBuilder::DoCallConstantFunction( 1227 LInstruction* LChunkBuilder::DoCallConstantFunction(
1219 HCallConstantFunction* instr) { 1228 HCallConstantFunction* instr) {
1220 argument_count_ -= instr->argument_count(); 1229 argument_count_ -= instr->argument_count();
1221 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); 1230 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr);
1222 } 1231 }
1223 1232
1224 1233
1234 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
1235 LOperand* context = UseFixed(instr->context(), esi);
1236 LOperand* function = UseFixed(instr->function(), edi);
1237 argument_count_ -= instr->argument_count();
1238 LInvokeFunction* result = new LInvokeFunction(context, function);
1239 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1240 }
1241
1242
1225 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1243 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1226 BuiltinFunctionId op = instr->op(); 1244 BuiltinFunctionId op = instr->op();
1227 if (op == kMathLog) { 1245 if (op == kMathLog) {
1228 ASSERT(instr->representation().IsDouble()); 1246 ASSERT(instr->representation().IsDouble());
1229 ASSERT(instr->value()->representation().IsDouble()); 1247 ASSERT(instr->value()->representation().IsDouble());
1230 LOperand* input = UseRegisterAtStart(instr->value()); 1248 LOperand* input = UseRegisterAtStart(instr->value());
1231 LUnaryMathOperation* result = new LUnaryMathOperation(input); 1249 LUnaryMathOperation* result = new LUnaryMathOperation(input);
1232 return DefineSameAsFirst(result); 1250 return DefineSameAsFirst(result);
1233 } else if (op == kMathSin || op == kMathCos) { 1251 } else if (op == kMathSin || op == kMathCos) {
1234 LOperand* input = UseFixedDouble(instr->value(), xmm1); 1252 LOperand* input = UseFixedDouble(instr->value(), xmm1);
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2190 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2173 HEnvironment* outer = current_block_->last_environment()->outer(); 2191 HEnvironment* outer = current_block_->last_environment()->outer();
2174 current_block_->UpdateEnvironment(outer); 2192 current_block_->UpdateEnvironment(outer);
2175 return NULL; 2193 return NULL;
2176 } 2194 }
2177 2195
2178 2196
2179 } } // namespace v8::internal 2197 } } // namespace v8::internal
2180 2198
2181 #endif // V8_TARGET_ARCH_IA32 2199 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/hydrogen.cc ('K') | « src/ia32/lithium-ia32.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698