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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { | 284 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { |
285 stream->Add("if typeof "); | 285 stream->Add("if typeof "); |
286 value()->PrintTo(stream); | 286 value()->PrintTo(stream); |
287 stream->Add(" == \"%s\" then B%d else B%d", | 287 stream->Add(" == \"%s\" then B%d else B%d", |
288 *hydrogen()->type_literal()->ToCString(), | 288 *hydrogen()->type_literal()->ToCString(), |
289 true_block_id(), false_block_id()); | 289 true_block_id(), false_block_id()); |
290 } | 290 } |
291 | 291 |
292 | 292 |
| 293 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) { |
| 294 stream->Add(" = "); |
| 295 base_object()->PrintTo(stream); |
| 296 stream->Add(" + %d", offset()); |
| 297 } |
| 298 |
| 299 |
293 void LCallConstantFunction::PrintDataTo(StringStream* stream) { | 300 void LCallConstantFunction::PrintDataTo(StringStream* stream) { |
294 stream->Add("#%d / ", arity()); | 301 stream->Add("#%d / ", arity()); |
295 } | 302 } |
296 | 303 |
297 | 304 |
298 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { | 305 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { |
299 stream->Add("/%s ", hydrogen()->OpName()); | 306 stream->Add("/%s ", hydrogen()->OpName()); |
300 value()->PrintTo(stream); | 307 value()->PrintTo(stream); |
301 } | 308 } |
302 | 309 |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 } | 1017 } |
1011 | 1018 |
1012 | 1019 |
1013 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { | 1020 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
1014 ++argument_count_; | 1021 ++argument_count_; |
1015 LOperand* argument = Use(instr->argument()); | 1022 LOperand* argument = Use(instr->argument()); |
1016 return new(zone()) LPushArgument(argument); | 1023 return new(zone()) LPushArgument(argument); |
1017 } | 1024 } |
1018 | 1025 |
1019 | 1026 |
| 1027 LInstruction* LChunkBuilder::DoInnerAllocatedObject( |
| 1028 HInnerAllocatedObject* inner_object) { |
| 1029 LOperand* base_object = UseRegisterAtStart(inner_object->base_object()); |
| 1030 LInnerAllocatedObject* result = |
| 1031 new(zone()) LInnerAllocatedObject(base_object); |
| 1032 return DefineAsRegister(result); |
| 1033 } |
| 1034 |
| 1035 |
1020 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { | 1036 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { |
1021 return instr->HasNoUses() | 1037 return instr->HasNoUses() |
1022 ? NULL | 1038 ? NULL |
1023 : DefineAsRegister(new(zone()) LThisFunction); | 1039 : DefineAsRegister(new(zone()) LThisFunction); |
1024 } | 1040 } |
1025 | 1041 |
1026 | 1042 |
1027 LInstruction* LChunkBuilder::DoContext(HContext* instr) { | 1043 LInstruction* LChunkBuilder::DoContext(HContext* instr) { |
1028 // If there is a non-return use, the context must be allocated in a register. | 1044 // If there is a non-return use, the context must be allocated in a register. |
1029 for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { | 1045 for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { |
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 | 2529 |
2514 | 2530 |
2515 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2531 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2516 LOperand* object = UseRegister(instr->object()); | 2532 LOperand* object = UseRegister(instr->object()); |
2517 LOperand* index = UseRegister(instr->index()); | 2533 LOperand* index = UseRegister(instr->index()); |
2518 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2534 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2519 } | 2535 } |
2520 | 2536 |
2521 | 2537 |
2522 } } // namespace v8::internal | 2538 } } // namespace v8::internal |
OLD | NEW |