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

Side by Side Diff: src/arm/lithium-arm.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: Rebased. Feedback. 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 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 ASSERT(instr->right()->representation().IsTagged()); 1318 ASSERT(instr->right()->representation().IsTagged());
1319 1319
1320 LOperand* left = UseFixed(instr->left(), r1); 1320 LOperand* left = UseFixed(instr->left(), r1);
1321 LOperand* right = UseFixed(instr->right(), r0); 1321 LOperand* right = UseFixed(instr->right(), r0);
1322 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); 1322 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right);
1323 return MarkAsCall(DefineFixed(result, r0), instr); 1323 return MarkAsCall(DefineFixed(result, r0), instr);
1324 } 1324 }
1325 } 1325 }
1326 1326
1327 1327
1328 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
1329 ASSERT(instr->value()->representation().IsInteger32());
1330 ASSERT(instr->representation().IsInteger32());
1331 if (instr->HasNoUses()) return NULL;
1332 LOperand* value = UseRegisterAtStart(instr->value());
1333 return DefineAsRegister(new(zone()) LBitNotI(value));
1334 }
1335
1336
1337 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { 1328 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
1338 if (instr->representation().IsDouble()) { 1329 if (instr->representation().IsDouble()) {
1339 return DoArithmeticD(Token::DIV, instr); 1330 return DoArithmeticD(Token::DIV, instr);
1340 } else if (instr->representation().IsSmiOrInteger32()) { 1331 } else if (instr->representation().IsSmiOrInteger32()) {
1341 ASSERT(instr->left()->representation().Equals(instr->representation())); 1332 ASSERT(instr->left()->representation().Equals(instr->representation()));
1342 ASSERT(instr->right()->representation().Equals(instr->representation())); 1333 ASSERT(instr->right()->representation().Equals(instr->representation()));
1343 if (instr->HasPowerOf2Divisor()) { 1334 if (instr->HasPowerOf2Divisor()) {
1344 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); 1335 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero));
1345 LOperand* value = UseRegisterAtStart(instr->left()); 1336 LOperand* value = UseRegisterAtStart(instr->left());
1346 LDivI* div = 1337 LDivI* div =
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 2581
2591 2582
2592 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2583 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2593 LOperand* object = UseRegister(instr->object()); 2584 LOperand* object = UseRegister(instr->object());
2594 LOperand* index = UseRegister(instr->index()); 2585 LOperand* index = UseRegister(instr->index());
2595 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2586 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2596 } 2587 }
2597 2588
2598 2589
2599 } } // namespace v8::internal 2590 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698