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 4053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4064 break; | 4064 break; |
4065 } | 4065 } |
4066 | 4066 |
4067 default: { | 4067 default: { |
4068 VisitForAccumulatorValue(expr->right()); | 4068 VisitForAccumulatorValue(expr->right()); |
4069 Condition cond = eq; | 4069 Condition cond = eq; |
4070 switch (op) { | 4070 switch (op) { |
4071 case Token::EQ_STRICT: | 4071 case Token::EQ_STRICT: |
4072 case Token::EQ: | 4072 case Token::EQ: |
4073 cond = eq; | 4073 cond = eq; |
4074 __ pop(r1); | |
4075 break; | 4074 break; |
4076 case Token::LT: | 4075 case Token::LT: |
4077 cond = lt; | 4076 cond = lt; |
4078 __ pop(r1); | |
4079 break; | 4077 break; |
4080 case Token::GT: | 4078 case Token::GT: |
4081 // Reverse left and right sides to obtain ECMA-262 conversion order. | 4079 cond = gt; |
4082 cond = lt; | |
4083 __ mov(r1, result_register()); | |
4084 __ pop(r0); | |
4085 break; | 4080 break; |
4086 case Token::LTE: | 4081 case Token::LTE: |
4087 // Reverse left and right sides to obtain ECMA-262 conversion order. | 4082 cond = le; |
4088 cond = ge; | |
4089 __ mov(r1, result_register()); | |
4090 __ pop(r0); | |
4091 break; | 4083 break; |
4092 case Token::GTE: | 4084 case Token::GTE: |
4093 cond = ge; | 4085 cond = ge; |
4094 __ pop(r1); | |
4095 break; | 4086 break; |
4096 case Token::IN: | 4087 case Token::IN: |
4097 case Token::INSTANCEOF: | 4088 case Token::INSTANCEOF: |
4098 default: | 4089 default: |
4099 UNREACHABLE(); | 4090 UNREACHABLE(); |
4100 } | 4091 } |
| 4092 __ pop(r1); |
4101 | 4093 |
4102 bool inline_smi_code = ShouldInlineSmiCase(op); | 4094 bool inline_smi_code = ShouldInlineSmiCase(op); |
4103 JumpPatchSite patch_site(masm_); | 4095 JumpPatchSite patch_site(masm_); |
4104 if (inline_smi_code) { | 4096 if (inline_smi_code) { |
4105 Label slow_case; | 4097 Label slow_case; |
4106 __ orr(r2, r0, Operand(r1)); | 4098 __ orr(r2, r0, Operand(r1)); |
4107 patch_site.EmitJumpIfNotSmi(r2, &slow_case); | 4099 patch_site.EmitJumpIfNotSmi(r2, &slow_case); |
4108 __ cmp(r1, r0); | 4100 __ cmp(r1, r0); |
4109 Split(cond, if_true, if_false, NULL); | 4101 Split(cond, if_true, if_false, NULL); |
4110 __ bind(&slow_case); | 4102 __ bind(&slow_case); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4268 *context_length = 0; | 4260 *context_length = 0; |
4269 return previous_; | 4261 return previous_; |
4270 } | 4262 } |
4271 | 4263 |
4272 | 4264 |
4273 #undef __ | 4265 #undef __ |
4274 | 4266 |
4275 } } // namespace v8::internal | 4267 } } // namespace v8::internal |
4276 | 4268 |
4277 #endif // V8_TARGET_ARCH_ARM | 4269 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |