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

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

Issue 1130283002: [strong] Disallow implicit conversions for comparison (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 7 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
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 default: 2495 default:
2496 UNREACHABLE(); 2496 UNREACHABLE();
2497 return no_condition; 2497 return no_condition;
2498 } 2498 }
2499 } 2499 }
2500 2500
2501 2501
2502 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2502 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2503 Token::Value op = instr->op(); 2503 Token::Value op = instr->op();
2504 2504
2505 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2505 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code();
2506 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2506 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2507 2507
2508 Condition condition = ComputeCompareCondition(op); 2508 Condition condition = ComputeCompareCondition(op);
2509 __ test(eax, Operand(eax)); 2509 __ test(eax, Operand(eax));
2510 2510
2511 EmitBranch(instr, condition); 2511 EmitBranch(instr, condition);
2512 } 2512 }
2513 2513
2514 2514
2515 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2515 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 2766 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
2767 2767
2768 // Put the result value into the eax slot and restore all registers. 2768 // Put the result value into the eax slot and restore all registers.
2769 __ StoreToSafepointRegisterSlot(eax, eax); 2769 __ StoreToSafepointRegisterSlot(eax, eax);
2770 } 2770 }
2771 2771
2772 2772
2773 void LCodeGen::DoCmpT(LCmpT* instr) { 2773 void LCodeGen::DoCmpT(LCmpT* instr) {
2774 Token::Value op = instr->op(); 2774 Token::Value op = instr->op();
2775 2775
2776 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2776 Handle<Code> ic =
2777 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code();
2777 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2778 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2778 2779
2779 Condition condition = ComputeCompareCondition(op); 2780 Condition condition = ComputeCompareCondition(op);
2780 Label true_value, done; 2781 Label true_value, done;
2781 __ test(eax, Operand(eax)); 2782 __ test(eax, Operand(eax));
2782 __ j(condition, &true_value, Label::kNear); 2783 __ j(condition, &true_value, Label::kNear);
2783 __ mov(ToRegister(instr->result()), factory()->false_value()); 2784 __ mov(ToRegister(instr->result()), factory()->false_value());
2784 __ jmp(&done, Label::kNear); 2785 __ jmp(&done, Label::kNear);
2785 __ bind(&true_value); 2786 __ bind(&true_value);
2786 __ mov(ToRegister(instr->result()), factory()->true_value()); 2787 __ mov(ToRegister(instr->result()), factory()->true_value());
(...skipping 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after
5775 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5776 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5776 RecordSafepoint(Safepoint::kNoLazyDeopt); 5777 RecordSafepoint(Safepoint::kNoLazyDeopt);
5777 } 5778 }
5778 5779
5779 5780
5780 #undef __ 5781 #undef __
5781 5782
5782 } } // namespace v8::internal 5783 } } // namespace v8::internal
5783 5784
5784 #endif // V8_TARGET_ARCH_IA32 5785 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698