| 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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 | 1022 |
| 1023 if (hydrogen_env->frame_type() == JS_FUNCTION) { | 1023 if (hydrogen_env->frame_type() == JS_FUNCTION) { |
| 1024 *argument_index_accumulator = argument_index; | 1024 *argument_index_accumulator = argument_index; |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 return result; | 1027 return result; |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 | 1030 |
| 1031 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 1031 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 1032 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); | 1032 return new(zone()) LGoto(instr->FirstSuccessor()); |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 | 1035 |
| 1036 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 1036 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 1037 HValue* value = instr->value(); | 1037 HValue* value = instr->value(); |
| 1038 if (value->EmitAtUses()) { | 1038 if (value->EmitAtUses()) { |
| 1039 ASSERT(value->IsConstant()); | 1039 ASSERT(value->IsConstant()); |
| 1040 ASSERT(!value->representation().IsDouble()); | 1040 ASSERT(!value->representation().IsDouble()); |
| 1041 HBasicBlock* successor = HConstant::cast(value)->BooleanValue() | 1041 HBasicBlock* successor = HConstant::cast(value)->BooleanValue() |
| 1042 ? instr->FirstSuccessor() | 1042 ? instr->FirstSuccessor() |
| 1043 : instr->SecondSuccessor(); | 1043 : instr->SecondSuccessor(); |
| 1044 return new(zone()) LGoto(successor->block_id()); | 1044 return new(zone()) LGoto(successor); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 ToBooleanStub::Types expected = instr->expected_input_types(); | 1047 ToBooleanStub::Types expected = instr->expected_input_types(); |
| 1048 | 1048 |
| 1049 // Tagged values that are not known smis or booleans require a | 1049 // Tagged values that are not known smis or booleans require a |
| 1050 // deoptimization environment. If the instruction is generic no | 1050 // deoptimization environment. If the instruction is generic no |
| 1051 // environment is needed since all cases are handled. | 1051 // environment is needed since all cases are handled. |
| 1052 Representation rep = value->representation(); | 1052 Representation rep = value->representation(); |
| 1053 HType type = value->type(); | 1053 HType type = value->type(); |
| 1054 if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) { | 1054 if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) { |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2723 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2723 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2724 LOperand* object = UseRegister(instr->object()); | 2724 LOperand* object = UseRegister(instr->object()); |
| 2725 LOperand* index = UseTempRegister(instr->index()); | 2725 LOperand* index = UseTempRegister(instr->index()); |
| 2726 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2726 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2727 } | 2727 } |
| 2728 | 2728 |
| 2729 | 2729 |
| 2730 } } // namespace v8::internal | 2730 } } // namespace v8::internal |
| 2731 | 2731 |
| 2732 #endif // V8_TARGET_ARCH_IA32 | 2732 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |