Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 8275035: Fix evaluation order of GT and LTE operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4129 matching lines...) Expand 10 before | Expand all | Expand 10 after
4140 break; 4140 break;
4141 } 4141 }
4142 4142
4143 default: { 4143 default: {
4144 VisitForAccumulatorValue(expr->right()); 4144 VisitForAccumulatorValue(expr->right());
4145 Condition cc = no_condition; 4145 Condition cc = no_condition;
4146 switch (op) { 4146 switch (op) {
4147 case Token::EQ_STRICT: 4147 case Token::EQ_STRICT:
4148 case Token::EQ: 4148 case Token::EQ:
4149 cc = equal; 4149 cc = equal;
4150 __ pop(edx);
4151 break; 4150 break;
4152 case Token::LT: 4151 case Token::LT:
4153 cc = less; 4152 cc = less;
4154 __ pop(edx);
4155 break; 4153 break;
4156 case Token::GT: 4154 case Token::GT:
4157 // Reverse left and right sizes to obtain ECMA-262 conversion order. 4155 cc = greater;
4158 cc = less;
4159 __ mov(edx, result_register());
4160 __ pop(eax);
4161 break; 4156 break;
4162 case Token::LTE: 4157 case Token::LTE:
4163 // Reverse left and right sizes to obtain ECMA-262 conversion order. 4158 cc = less_equal;
4164 cc = greater_equal;
4165 __ mov(edx, result_register());
4166 __ pop(eax);
4167 break; 4159 break;
4168 case Token::GTE: 4160 case Token::GTE:
4169 cc = greater_equal; 4161 cc = greater_equal;
4170 __ pop(edx);
4171 break; 4162 break;
4172 case Token::IN: 4163 case Token::IN:
4173 case Token::INSTANCEOF: 4164 case Token::INSTANCEOF:
4174 default: 4165 default:
4175 UNREACHABLE(); 4166 UNREACHABLE();
4176 } 4167 }
4168 __ pop(edx);
4177 decrement_stack_height(); 4169 decrement_stack_height();
4178 4170
4179 bool inline_smi_code = ShouldInlineSmiCase(op); 4171 bool inline_smi_code = ShouldInlineSmiCase(op);
4180 JumpPatchSite patch_site(masm_); 4172 JumpPatchSite patch_site(masm_);
4181 if (inline_smi_code) { 4173 if (inline_smi_code) {
4182 Label slow_case; 4174 Label slow_case;
4183 __ mov(ecx, edx); 4175 __ mov(ecx, edx);
4184 __ or_(ecx, eax); 4176 __ or_(ecx, eax);
4185 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); 4177 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear);
4186 __ cmp(edx, eax); 4178 __ cmp(edx, eax);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
4343 *context_length = 0; 4335 *context_length = 0;
4344 return previous_; 4336 return previous_;
4345 } 4337 }
4346 4338
4347 4339
4348 #undef __ 4340 #undef __
4349 4341
4350 } } // namespace v8::internal 4342 } } // namespace v8::internal
4351 4343
4352 #endif // V8_TARGET_ARCH_IA32 4344 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698