| 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 4082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4093 break; | 4093 break; |
| 4094 } | 4094 } |
| 4095 | 4095 |
| 4096 default: { | 4096 default: { |
| 4097 VisitForAccumulatorValue(expr->right()); | 4097 VisitForAccumulatorValue(expr->right()); |
| 4098 Condition cc = eq; | 4098 Condition cc = eq; |
| 4099 switch (op) { | 4099 switch (op) { |
| 4100 case Token::EQ_STRICT: | 4100 case Token::EQ_STRICT: |
| 4101 case Token::EQ: | 4101 case Token::EQ: |
| 4102 cc = eq; | 4102 cc = eq; |
| 4103 __ mov(a0, result_register()); | |
| 4104 __ pop(a1); | |
| 4105 break; | 4103 break; |
| 4106 case Token::LT: | 4104 case Token::LT: |
| 4107 cc = lt; | 4105 cc = lt; |
| 4108 __ mov(a0, result_register()); | |
| 4109 __ pop(a1); | |
| 4110 break; | 4106 break; |
| 4111 case Token::GT: | 4107 case Token::GT: |
| 4112 // Reverse left and right sides to obtain ECMA-262 conversion order. | 4108 cc = gt; |
| 4113 cc = lt; | |
| 4114 __ mov(a1, result_register()); | |
| 4115 __ pop(a0); | |
| 4116 break; | 4109 break; |
| 4117 case Token::LTE: | 4110 case Token::LTE: |
| 4118 // Reverse left and right sides to obtain ECMA-262 conversion order. | 4111 cc = le; |
| 4119 cc = ge; | |
| 4120 __ mov(a1, result_register()); | |
| 4121 __ pop(a0); | |
| 4122 break; | 4112 break; |
| 4123 case Token::GTE: | 4113 case Token::GTE: |
| 4124 cc = ge; | 4114 cc = ge; |
| 4125 __ mov(a0, result_register()); | |
| 4126 __ pop(a1); | |
| 4127 break; | 4115 break; |
| 4128 case Token::IN: | 4116 case Token::IN: |
| 4129 case Token::INSTANCEOF: | 4117 case Token::INSTANCEOF: |
| 4130 default: | 4118 default: |
| 4131 UNREACHABLE(); | 4119 UNREACHABLE(); |
| 4132 } | 4120 } |
| 4121 __ mov(a0, result_register()); |
| 4122 __ pop(a1); |
| 4133 | 4123 |
| 4134 bool inline_smi_code = ShouldInlineSmiCase(op); | 4124 bool inline_smi_code = ShouldInlineSmiCase(op); |
| 4135 JumpPatchSite patch_site(masm_); | 4125 JumpPatchSite patch_site(masm_); |
| 4136 if (inline_smi_code) { | 4126 if (inline_smi_code) { |
| 4137 Label slow_case; | 4127 Label slow_case; |
| 4138 __ Or(a2, a0, Operand(a1)); | 4128 __ Or(a2, a0, Operand(a1)); |
| 4139 patch_site.EmitJumpIfNotSmi(a2, &slow_case); | 4129 patch_site.EmitJumpIfNotSmi(a2, &slow_case); |
| 4140 Split(cc, a1, Operand(a0), if_true, if_false, NULL); | 4130 Split(cc, a1, Operand(a0), if_true, if_false, NULL); |
| 4141 __ bind(&slow_case); | 4131 __ bind(&slow_case); |
| 4142 } | 4132 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4297 *context_length = 0; | 4287 *context_length = 0; |
| 4298 return previous_; | 4288 return previous_; |
| 4299 } | 4289 } |
| 4300 | 4290 |
| 4301 | 4291 |
| 4302 #undef __ | 4292 #undef __ |
| 4303 | 4293 |
| 4304 } } // namespace v8::internal | 4294 } } // namespace v8::internal |
| 4305 | 4295 |
| 4306 #endif // V8_TARGET_ARCH_MIPS | 4296 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |