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 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4283 __ CallStub(&stub); | 4283 __ CallStub(&stub); |
4284 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4284 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
4285 __ test(eax, eax); | 4285 __ test(eax, eax); |
4286 // The stub returns 0 for true. | 4286 // The stub returns 0 for true. |
4287 Split(zero, if_true, if_false, fall_through); | 4287 Split(zero, if_true, if_false, fall_through); |
4288 break; | 4288 break; |
4289 } | 4289 } |
4290 | 4290 |
4291 default: { | 4291 default: { |
4292 VisitForAccumulatorValue(expr->right()); | 4292 VisitForAccumulatorValue(expr->right()); |
4293 Condition cc = no_condition; | 4293 Condition cc = CompareIC::ComputeCondition(op); |
4294 switch (op) { | |
4295 case Token::EQ_STRICT: | |
4296 case Token::EQ: | |
4297 cc = equal; | |
4298 break; | |
4299 case Token::LT: | |
4300 cc = less; | |
4301 break; | |
4302 case Token::GT: | |
4303 cc = greater; | |
4304 break; | |
4305 case Token::LTE: | |
4306 cc = less_equal; | |
4307 break; | |
4308 case Token::GTE: | |
4309 cc = greater_equal; | |
4310 break; | |
4311 case Token::IN: | |
4312 case Token::INSTANCEOF: | |
4313 default: | |
4314 UNREACHABLE(); | |
4315 } | |
4316 __ pop(edx); | 4294 __ pop(edx); |
4317 | 4295 |
4318 bool inline_smi_code = ShouldInlineSmiCase(op); | 4296 bool inline_smi_code = ShouldInlineSmiCase(op); |
4319 JumpPatchSite patch_site(masm_); | 4297 JumpPatchSite patch_site(masm_); |
4320 if (inline_smi_code) { | 4298 if (inline_smi_code) { |
4321 Label slow_case; | 4299 Label slow_case; |
4322 __ mov(ecx, edx); | 4300 __ mov(ecx, edx); |
4323 __ or_(ecx, eax); | 4301 __ or_(ecx, eax); |
4324 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); | 4302 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); |
4325 __ cmp(edx, eax); | 4303 __ cmp(edx, eax); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4519 *stack_depth = 0; | 4497 *stack_depth = 0; |
4520 *context_length = 0; | 4498 *context_length = 0; |
4521 return previous_; | 4499 return previous_; |
4522 } | 4500 } |
4523 | 4501 |
4524 #undef __ | 4502 #undef __ |
4525 | 4503 |
4526 } } // namespace v8::internal | 4504 } } // namespace v8::internal |
4527 | 4505 |
4528 #endif // V8_TARGET_ARCH_IA32 | 4506 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |