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

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

Issue 22184004: Desugar bitwise negation into XOR and kill all UnaryOp stuff. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
OLDNEW
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 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 LOperand* context = UseFixed(instr->context(), esi); 1407 LOperand* context = UseFixed(instr->context(), esi);
1408 LOperand* left = UseFixed(instr->left(), edx); 1408 LOperand* left = UseFixed(instr->left(), edx);
1409 LOperand* right = UseFixed(instr->right(), eax); 1409 LOperand* right = UseFixed(instr->right(), eax);
1410 LArithmeticT* result = 1410 LArithmeticT* result =
1411 new(zone()) LArithmeticT(instr->op(), context, left, right); 1411 new(zone()) LArithmeticT(instr->op(), context, left, right);
1412 return MarkAsCall(DefineFixed(result, eax), instr); 1412 return MarkAsCall(DefineFixed(result, eax), instr);
1413 } 1413 }
1414 } 1414 }
1415 1415
1416 1416
1417 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
1418 ASSERT(instr->value()->representation().IsInteger32());
1419 ASSERT(instr->representation().IsInteger32());
1420 if (instr->HasNoUses()) return NULL;
1421 LOperand* input = UseRegisterAtStart(instr->value());
1422 LBitNotI* result = new(zone()) LBitNotI(input);
1423 return DefineSameAsFirst(result);
1424 }
1425
1426
1427 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { 1417 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
1428 if (instr->representation().IsDouble()) { 1418 if (instr->representation().IsDouble()) {
1429 return DoArithmeticD(Token::DIV, instr); 1419 return DoArithmeticD(Token::DIV, instr);
1430 } else if (instr->representation().IsSmiOrInteger32()) { 1420 } else if (instr->representation().IsSmiOrInteger32()) {
1431 ASSERT(instr->left()->representation().Equals(instr->representation())); 1421 ASSERT(instr->left()->representation().Equals(instr->representation()));
1432 ASSERT(instr->right()->representation().Equals(instr->representation())); 1422 ASSERT(instr->right()->representation().Equals(instr->representation()));
1433 if (instr->HasPowerOf2Divisor()) { 1423 if (instr->HasPowerOf2Divisor()) {
1434 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); 1424 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero));
1435 LOperand* value = UseRegisterAtStart(instr->left()); 1425 LOperand* value = UseRegisterAtStart(instr->left());
1436 LDivI* div = 1426 LDivI* div =
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2715 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2726 LOperand* object = UseRegister(instr->object()); 2716 LOperand* object = UseRegister(instr->object());
2727 LOperand* index = UseTempRegister(instr->index()); 2717 LOperand* index = UseTempRegister(instr->index());
2728 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2718 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2729 } 2719 }
2730 2720
2731 2721
2732 } } // namespace v8::internal 2722 } } // namespace v8::internal
2733 2723
2734 #endif // V8_TARGET_ARCH_IA32 2724 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698