OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 stream->Add("[r2] #%d / ", arity()); | 306 stream->Add("[r2] #%d / ", arity()); |
307 } | 307 } |
308 | 308 |
309 | 309 |
310 void LCallNamed::PrintDataTo(StringStream* stream) { | 310 void LCallNamed::PrintDataTo(StringStream* stream) { |
311 SmartArrayPointer<char> name_string = name()->ToCString(); | 311 SmartArrayPointer<char> name_string = name()->ToCString(); |
312 stream->Add("%s #%d / ", name_string.get(), arity()); | 312 stream->Add("%s #%d / ", name_string.get(), arity()); |
313 } | 313 } |
314 | 314 |
315 | 315 |
316 void LCallGlobal::PrintDataTo(StringStream* stream) { | |
317 SmartArrayPointer<char> name_string = name()->ToCString(); | |
318 stream->Add("%s #%d / ", name_string.get(), arity()); | |
319 } | |
320 | |
321 | |
322 void LCallKnownGlobal::PrintDataTo(StringStream* stream) { | 316 void LCallKnownGlobal::PrintDataTo(StringStream* stream) { |
323 stream->Add("#%d / ", arity()); | 317 stream->Add("#%d / ", arity()); |
324 } | 318 } |
325 | 319 |
326 | 320 |
327 void LCallNew::PrintDataTo(StringStream* stream) { | 321 void LCallNew::PrintDataTo(StringStream* stream) { |
328 stream->Add("= "); | 322 stream->Add("= "); |
329 constructor()->PrintTo(stream); | 323 constructor()->PrintTo(stream); |
330 stream->Add(" #%d / ", arity()); | 324 stream->Add(" #%d / ", arity()); |
331 } | 325 } |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 DefineFixed(new(zone()) LCallKeyed(context, key), r0), instr); | 1175 DefineFixed(new(zone()) LCallKeyed(context, key), r0), instr); |
1182 } | 1176 } |
1183 | 1177 |
1184 | 1178 |
1185 LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) { | 1179 LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) { |
1186 LOperand* context = UseFixed(instr->context(), cp); | 1180 LOperand* context = UseFixed(instr->context(), cp); |
1187 return MarkAsCall(DefineFixed(new(zone()) LCallNamed(context), r0), instr); | 1181 return MarkAsCall(DefineFixed(new(zone()) LCallNamed(context), r0), instr); |
1188 } | 1182 } |
1189 | 1183 |
1190 | 1184 |
1191 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { | |
1192 LOperand* context = UseFixed(instr->context(), cp); | |
1193 return MarkAsCall(DefineFixed(new(zone()) LCallGlobal(context), r0), instr); | |
1194 } | |
1195 | |
1196 | |
1197 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { | 1185 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { |
1198 return MarkAsCall(DefineFixed(new(zone()) LCallKnownGlobal, r0), instr); | 1186 return MarkAsCall(DefineFixed(new(zone()) LCallKnownGlobal, r0), instr); |
1199 } | 1187 } |
1200 | 1188 |
1201 | 1189 |
1202 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { | 1190 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { |
1203 LOperand* context = UseFixed(instr->context(), cp); | 1191 LOperand* context = UseFixed(instr->context(), cp); |
1204 LOperand* constructor = UseFixed(instr->constructor(), r1); | 1192 LOperand* constructor = UseFixed(instr->constructor(), r1); |
1205 LCallNew* result = new(zone()) LCallNew(context, constructor); | 1193 LCallNew* result = new(zone()) LCallNew(context, constructor); |
1206 return MarkAsCall(DefineFixed(result, r0), instr); | 1194 return MarkAsCall(DefineFixed(result, r0), instr); |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 } | 2551 } |
2564 | 2552 |
2565 | 2553 |
2566 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2554 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2567 LOperand* object = UseRegister(instr->object()); | 2555 LOperand* object = UseRegister(instr->object()); |
2568 LOperand* index = UseRegister(instr->index()); | 2556 LOperand* index = UseRegister(instr->index()); |
2569 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2557 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2570 } | 2558 } |
2571 | 2559 |
2572 } } // namespace v8::internal | 2560 } } // namespace v8::internal |
OLD | NEW |