| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 984 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 985 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); | 985 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); |
| 986 } | 986 } |
| 987 | 987 |
| 988 | 988 |
| 989 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 989 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 990 HValue* value = instr->value(); | 990 HValue* value = instr->value(); |
| 991 if (value->EmitAtUses()) { | 991 if (value->EmitAtUses()) { |
| 992 ASSERT(value->IsConstant()); | 992 ASSERT(value->IsConstant()); |
| 993 ASSERT(!value->representation().IsDouble()); | 993 ASSERT(!value->representation().IsDouble()); |
| 994 HBasicBlock* successor = HConstant::cast(value)->ToBoolean() | 994 HBasicBlock* successor = HConstant::cast(value)->BooleanValue() |
| 995 ? instr->FirstSuccessor() | 995 ? instr->FirstSuccessor() |
| 996 : instr->SecondSuccessor(); | 996 : instr->SecondSuccessor(); |
| 997 return new(zone()) LGoto(successor->block_id()); | 997 return new(zone()) LGoto(successor->block_id()); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 // Untagged integers or doubles, smis and booleans don't require a | 1000 // Untagged integers or doubles, smis and booleans don't require a |
| 1001 // deoptimization environment nor a temp register. | 1001 // deoptimization environment nor a temp register. |
| 1002 Representation rep = value->representation(); | 1002 Representation rep = value->representation(); |
| 1003 HType type = value->type(); | 1003 HType type = value->type(); |
| 1004 if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) { | 1004 if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) { |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2612 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2612 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2613 LOperand* object = UseRegister(instr->object()); | 2613 LOperand* object = UseRegister(instr->object()); |
| 2614 LOperand* index = UseTempRegister(instr->index()); | 2614 LOperand* index = UseTempRegister(instr->index()); |
| 2615 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2615 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2616 } | 2616 } |
| 2617 | 2617 |
| 2618 | 2618 |
| 2619 } } // namespace v8::internal | 2619 } } // namespace v8::internal |
| 2620 | 2620 |
| 2621 #endif // V8_TARGET_ARCH_IA32 | 2621 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |