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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 938 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
939 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); | 939 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); |
940 } | 940 } |
941 | 941 |
942 | 942 |
943 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 943 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
944 HValue* value = instr->value(); | 944 HValue* value = instr->value(); |
945 if (value->EmitAtUses()) { | 945 if (value->EmitAtUses()) { |
946 ASSERT(value->IsConstant()); | 946 ASSERT(value->IsConstant()); |
947 ASSERT(!value->representation().IsDouble()); | 947 ASSERT(!value->representation().IsDouble()); |
948 HBasicBlock* successor = HConstant::cast(value)->ToBoolean() | 948 HBasicBlock* successor = HConstant::cast(value)->BooleanValue() |
949 ? instr->FirstSuccessor() | 949 ? instr->FirstSuccessor() |
950 : instr->SecondSuccessor(); | 950 : instr->SecondSuccessor(); |
951 return new(zone()) LGoto(successor->block_id()); | 951 return new(zone()) LGoto(successor->block_id()); |
952 } | 952 } |
953 | 953 |
954 LBranch* result = new(zone()) LBranch(UseRegister(value)); | 954 LBranch* result = new(zone()) LBranch(UseRegister(value)); |
955 // Tagged values that are not known smis or booleans require a | 955 // Tagged values that are not known smis or booleans require a |
956 // deoptimization environment. | 956 // deoptimization environment. |
957 Representation rep = value->representation(); | 957 Representation rep = value->representation(); |
958 HType type = value->type(); | 958 HType type = value->type(); |
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2446 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2447 LOperand* object = UseRegister(instr->object()); | 2447 LOperand* object = UseRegister(instr->object()); |
2448 LOperand* index = UseTempRegister(instr->index()); | 2448 LOperand* index = UseTempRegister(instr->index()); |
2449 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2449 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2450 } | 2450 } |
2451 | 2451 |
2452 | 2452 |
2453 } } // namespace v8::internal | 2453 } } // namespace v8::internal |
2454 | 2454 |
2455 #endif // V8_TARGET_ARCH_X64 | 2455 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |