| OLD | NEW |
| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 | 296 |
| 297 | 297 |
| 298 void LStoreContextSlot::PrintDataTo(StringStream* stream) { | 298 void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
| 299 InputAt(0)->PrintTo(stream); | 299 InputAt(0)->PrintTo(stream); |
| 300 stream->Add("[%d] <- ", slot_index()); | 300 stream->Add("[%d] <- ", slot_index()); |
| 301 InputAt(1)->PrintTo(stream); | 301 InputAt(1)->PrintTo(stream); |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 void LInvokeFunction::PrintDataTo(StringStream* stream) { |
| 306 stream->Add("= "); |
| 307 InputAt(0)->PrintTo(stream); |
| 308 stream->Add(" "); |
| 309 InputAt(1)->PrintTo(stream); |
| 310 stream->Add(" #%d / ", arity()); |
| 311 } |
| 312 |
| 313 |
| 305 void LCallKeyed::PrintDataTo(StringStream* stream) { | 314 void LCallKeyed::PrintDataTo(StringStream* stream) { |
| 306 stream->Add("[ecx] #%d / ", arity()); | 315 stream->Add("[ecx] #%d / ", arity()); |
| 307 } | 316 } |
| 308 | 317 |
| 309 | 318 |
| 310 void LCallNamed::PrintDataTo(StringStream* stream) { | 319 void LCallNamed::PrintDataTo(StringStream* stream) { |
| 311 SmartPointer<char> name_string = name()->ToCString(); | 320 SmartPointer<char> name_string = name()->ToCString(); |
| 312 stream->Add("%s #%d / ", *name_string, arity()); | 321 stream->Add("%s #%d / ", *name_string, arity()); |
| 313 } | 322 } |
| 314 | 323 |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 } | 1223 } |
| 1215 | 1224 |
| 1216 | 1225 |
| 1217 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1226 LInstruction* LChunkBuilder::DoCallConstantFunction( |
| 1218 HCallConstantFunction* instr) { | 1227 HCallConstantFunction* instr) { |
| 1219 argument_count_ -= instr->argument_count(); | 1228 argument_count_ -= instr->argument_count(); |
| 1220 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); | 1229 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); |
| 1221 } | 1230 } |
| 1222 | 1231 |
| 1223 | 1232 |
| 1233 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
| 1234 LOperand* context = UseFixed(instr->context(), esi); |
| 1235 LOperand* function = UseFixed(instr->function(), edi); |
| 1236 argument_count_ -= instr->argument_count(); |
| 1237 LInvokeFunction* result = new LInvokeFunction(context, function); |
| 1238 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1239 } |
| 1240 |
| 1241 |
| 1224 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1242 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
| 1225 BuiltinFunctionId op = instr->op(); | 1243 BuiltinFunctionId op = instr->op(); |
| 1226 if (op == kMathLog) { | 1244 if (op == kMathLog) { |
| 1227 ASSERT(instr->representation().IsDouble()); | 1245 ASSERT(instr->representation().IsDouble()); |
| 1228 ASSERT(instr->value()->representation().IsDouble()); | 1246 ASSERT(instr->value()->representation().IsDouble()); |
| 1229 LOperand* input = UseRegisterAtStart(instr->value()); | 1247 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1230 LUnaryMathOperation* result = new LUnaryMathOperation(input); | 1248 LUnaryMathOperation* result = new LUnaryMathOperation(input); |
| 1231 return DefineSameAsFirst(result); | 1249 return DefineSameAsFirst(result); |
| 1232 } else if (op == kMathSin || op == kMathCos) { | 1250 } else if (op == kMathSin || op == kMathCos) { |
| 1233 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1251 LOperand* input = UseFixedDouble(instr->value(), xmm1); |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2197 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2180 HEnvironment* outer = current_block_->last_environment()->outer(); | 2198 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2181 current_block_->UpdateEnvironment(outer); | 2199 current_block_->UpdateEnvironment(outer); |
| 2182 return NULL; | 2200 return NULL; |
| 2183 } | 2201 } |
| 2184 | 2202 |
| 2185 | 2203 |
| 2186 } } // namespace v8::internal | 2204 } } // namespace v8::internal |
| 2187 | 2205 |
| 2188 #endif // V8_TARGET_ARCH_IA32 | 2206 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |