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

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

Issue 1092353002: [strong] Disallow implicit conversions for binary arithmetic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback 5 Created 5 years, 8 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
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 2328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 __ X87SetFPUCW(0x037F); 2339 __ X87SetFPUCW(0x037F);
2340 } 2340 }
2341 2341
2342 2342
2343 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2343 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2344 DCHECK(ToRegister(instr->context()).is(esi)); 2344 DCHECK(ToRegister(instr->context()).is(esi));
2345 DCHECK(ToRegister(instr->left()).is(edx)); 2345 DCHECK(ToRegister(instr->left()).is(edx));
2346 DCHECK(ToRegister(instr->right()).is(eax)); 2346 DCHECK(ToRegister(instr->right()).is(eax));
2347 DCHECK(ToRegister(instr->result()).is(eax)); 2347 DCHECK(ToRegister(instr->result()).is(eax));
2348 2348
2349 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code(); 2349 Handle<Code> code = CodeFactory::BinaryOpIC(
2350 isolate(), instr->op(), language_mode()).code();
2350 CallCode(code, RelocInfo::CODE_TARGET, instr); 2351 CallCode(code, RelocInfo::CODE_TARGET, instr);
2351 } 2352 }
2352 2353
2353 2354
2354 template<class InstrType> 2355 template<class InstrType>
2355 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { 2356 void LCodeGen::EmitBranch(InstrType instr, Condition cc) {
2356 int left_block = instr->TrueDestination(chunk_); 2357 int left_block = instr->TrueDestination(chunk_);
2357 int right_block = instr->FalseDestination(chunk_); 2358 int right_block = instr->FalseDestination(chunk_);
2358 2359
2359 int next_block = GetNextEmittedBlock(); 2360 int next_block = GetNextEmittedBlock();
(...skipping 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after
6346 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6347 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6347 RecordSafepoint(Safepoint::kNoLazyDeopt); 6348 RecordSafepoint(Safepoint::kNoLazyDeopt);
6348 } 6349 }
6349 6350
6350 6351
6351 #undef __ 6352 #undef __
6352 6353
6353 } } // namespace v8::internal 6354 } } // namespace v8::internal
6354 6355
6355 #endif // V8_TARGET_ARCH_X87 6356 #endif // V8_TARGET_ARCH_X87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698