OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0), | 1107 new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0), |
1108 UseFixed(instance_of->right(), r1)); | 1108 UseFixed(instance_of->right(), r1)); |
1109 return MarkAsCall(result, instr); | 1109 return MarkAsCall(result, instr); |
1110 } else if (v->IsTypeofIs()) { | 1110 } else if (v->IsTypeofIs()) { |
1111 HTypeofIs* typeof_is = HTypeofIs::cast(v); | 1111 HTypeofIs* typeof_is = HTypeofIs::cast(v); |
1112 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); | 1112 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); |
1113 } else if (v->IsIsConstructCall()) { | 1113 } else if (v->IsIsConstructCall()) { |
1114 return new LIsConstructCallAndBranch(TempRegister()); | 1114 return new LIsConstructCallAndBranch(TempRegister()); |
1115 } else { | 1115 } else { |
1116 if (v->IsConstant()) { | 1116 if (v->IsConstant()) { |
1117 if (HConstant::cast(v)->handle()->IsTrue()) { | 1117 if (HConstant::cast(v)->ToBoolean()) { |
1118 return new LGoto(instr->FirstSuccessor()->block_id()); | 1118 return new LGoto(instr->FirstSuccessor()->block_id()); |
1119 } else if (HConstant::cast(v)->handle()->IsFalse()) { | 1119 } else { |
1120 return new LGoto(instr->SecondSuccessor()->block_id()); | 1120 return new LGoto(instr->SecondSuccessor()->block_id()); |
1121 } | 1121 } |
1122 } | 1122 } |
1123 Abort("Undefined compare before branch"); | 1123 Abort("Undefined compare before branch"); |
1124 return NULL; | 1124 return NULL; |
1125 } | 1125 } |
1126 } | 1126 } |
1127 return new LBranch(UseRegisterAtStart(v)); | 1127 return new LBranch(UseRegisterAtStart(v)); |
1128 } | 1128 } |
1129 | 1129 |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2111 | 2111 |
2112 | 2112 |
2113 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2113 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2114 HEnvironment* outer = current_block_->last_environment()->outer(); | 2114 HEnvironment* outer = current_block_->last_environment()->outer(); |
2115 current_block_->UpdateEnvironment(outer); | 2115 current_block_->UpdateEnvironment(outer); |
2116 return NULL; | 2116 return NULL; |
2117 } | 2117 } |
2118 | 2118 |
2119 | 2119 |
2120 } } // namespace v8::internal | 2120 } } // namespace v8::internal |
OLD | NEW |