| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 } | 293 } |
| 294 | 294 |
| 295 | 295 |
| 296 void LStoreContextSlot::PrintDataTo(StringStream* stream) { | 296 void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
| 297 InputAt(0)->PrintTo(stream); | 297 InputAt(0)->PrintTo(stream); |
| 298 stream->Add("[%d] <- ", slot_index()); | 298 stream->Add("[%d] <- ", slot_index()); |
| 299 InputAt(1)->PrintTo(stream); | 299 InputAt(1)->PrintTo(stream); |
| 300 } | 300 } |
| 301 | 301 |
| 302 | 302 |
| 303 void LInvokeFunction::PrintDataTo(StringStream* stream) { |
| 304 stream->Add("= "); |
| 305 InputAt(0)->PrintTo(stream); |
| 306 stream->Add(" #%d / ", arity()); |
| 307 } |
| 308 |
| 309 |
| 303 void LCallKeyed::PrintDataTo(StringStream* stream) { | 310 void LCallKeyed::PrintDataTo(StringStream* stream) { |
| 304 stream->Add("[r2] #%d / ", arity()); | 311 stream->Add("[r2] #%d / ", arity()); |
| 305 } | 312 } |
| 306 | 313 |
| 307 | 314 |
| 308 void LCallNamed::PrintDataTo(StringStream* stream) { | 315 void LCallNamed::PrintDataTo(StringStream* stream) { |
| 309 SmartPointer<char> name_string = name()->ToCString(); | 316 SmartPointer<char> name_string = name()->ToCString(); |
| 310 stream->Add("%s #%d / ", *name_string, arity()); | 317 stream->Add("%s #%d / ", *name_string, arity()); |
| 311 } | 318 } |
| 312 | 319 |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, r0), instr); | 1217 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr); |
| 1211 } | 1218 } |
| 1212 | 1219 |
| 1213 | 1220 |
| 1221 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
| 1222 LOperand* function = UseFixed(instr->function(), r1); |
| 1223 argument_count_ -= instr->argument_count(); |
| 1224 LInvokeFunction* result = new LInvokeFunction(function); |
| 1225 return MarkAsCall(DefineFixed(result, r0), 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(), d2); | 1232 LOperand* input = UseFixedDouble(instr->value(), d2); |
| 1218 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); | 1233 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); |
| 1219 return MarkAsCall(DefineFixedDouble(result, d2), instr); | 1234 return MarkAsCall(DefineFixedDouble(result, d2), instr); |
| 1220 } else { | 1235 } else { |
| 1221 LOperand* input = UseRegisterAtStart(instr->value()); | 1236 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1222 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; | 1237 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; |
| 1223 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); | 1238 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2117 | 2132 |
| 2118 | 2133 |
| 2119 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2134 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2120 HEnvironment* outer = current_block_->last_environment()->outer(); | 2135 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2121 current_block_->UpdateEnvironment(outer); | 2136 current_block_->UpdateEnvironment(outer); |
| 2122 return NULL; | 2137 return NULL; |
| 2123 } | 2138 } |
| 2124 | 2139 |
| 2125 | 2140 |
| 2126 } } // namespace v8::internal | 2141 } } // namespace v8::internal |
| OLD | NEW |