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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x87/full-codegen-x87.cc ('k') | src/x87/lithium-x87.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_X87 7 #if V8_TARGET_ARCH_X87
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 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 default: 2773 default:
2774 UNREACHABLE(); 2774 UNREACHABLE();
2775 return no_condition; 2775 return no_condition;
2776 } 2776 }
2777 } 2777 }
2778 2778
2779 2779
2780 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2780 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2781 Token::Value op = instr->op(); 2781 Token::Value op = instr->op();
2782 2782
2783 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2783 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code();
2784 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2784 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2785 2785
2786 Condition condition = ComputeCompareCondition(op); 2786 Condition condition = ComputeCompareCondition(op);
2787 __ test(eax, Operand(eax)); 2787 __ test(eax, Operand(eax));
2788 2788
2789 EmitBranch(instr, condition); 2789 EmitBranch(instr, condition);
2790 } 2790 }
2791 2791
2792 2792
2793 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2793 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 3045 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
3046 3046
3047 // Put the result value into the eax slot and restore all registers. 3047 // Put the result value into the eax slot and restore all registers.
3048 __ StoreToSafepointRegisterSlot(eax, eax); 3048 __ StoreToSafepointRegisterSlot(eax, eax);
3049 } 3049 }
3050 3050
3051 3051
3052 void LCodeGen::DoCmpT(LCmpT* instr) { 3052 void LCodeGen::DoCmpT(LCmpT* instr) {
3053 Token::Value op = instr->op(); 3053 Token::Value op = instr->op();
3054 3054
3055 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 3055 Handle<Code> ic =
3056 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code();
3056 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3057 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3057 3058
3058 Condition condition = ComputeCompareCondition(op); 3059 Condition condition = ComputeCompareCondition(op);
3059 Label true_value, done; 3060 Label true_value, done;
3060 __ test(eax, Operand(eax)); 3061 __ test(eax, Operand(eax));
3061 __ j(condition, &true_value, Label::kNear); 3062 __ j(condition, &true_value, Label::kNear);
3062 __ mov(ToRegister(instr->result()), factory()->false_value()); 3063 __ mov(ToRegister(instr->result()), factory()->false_value());
3063 __ jmp(&done, Label::kNear); 3064 __ jmp(&done, Label::kNear);
3064 __ bind(&true_value); 3065 __ bind(&true_value);
3065 __ mov(ToRegister(instr->result()), factory()->true_value()); 3066 __ mov(ToRegister(instr->result()), factory()->true_value());
(...skipping 3318 matching lines...) Expand 10 before | Expand all | Expand 10 after
6384 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6385 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6385 RecordSafepoint(Safepoint::kNoLazyDeopt); 6386 RecordSafepoint(Safepoint::kNoLazyDeopt);
6386 } 6387 }
6387 6388
6388 6389
6389 #undef __ 6390 #undef __
6390 6391
6391 } } // namespace v8::internal 6392 } } // namespace v8::internal
6392 6393
6393 #endif // V8_TARGET_ARCH_X87 6394 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698