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

Unified Diff: src/ia32/lithium-ia32.cc

Issue 6207007: Use hydrogen accessor in a few more places to save space in the lithium IR. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: ported to ARM Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.cc
===================================================================
--- src/ia32/lithium-ia32.cc (revision 6282)
+++ src/ia32/lithium-ia32.cc (working copy)
@@ -957,22 +957,23 @@
Token::Value op = compare->token();
HValue* left = compare->left();
HValue* right = compare->right();
- if (left->representation().IsInteger32()) {
+ Representation r = compare->GetInputRepresentation();
+ if (r.IsInteger32()) {
+ ASSERT(left->representation().IsInteger32());
ASSERT(right->representation().IsInteger32());
- return new LCmpIDAndBranch(op,
- UseRegisterAtStart(left),
+
+ return new LCmpIDAndBranch(UseRegisterAtStart(left),
UseOrConstantAtStart(right),
first_id,
- second_id,
- false);
- } else if (left->representation().IsDouble()) {
+ second_id);
+ } else if (r.IsDouble()) {
+ ASSERT(left->representation().IsDouble());
ASSERT(right->representation().IsDouble());
- return new LCmpIDAndBranch(op,
- UseRegisterAtStart(left),
+
+ return new LCmpIDAndBranch(UseRegisterAtStart(left),
UseRegisterAtStart(right),
first_id,
- second_id,
- true);
+ second_id);
} else {
ASSERT(left->representation().IsTagged());
ASSERT(right->representation().IsTagged());
@@ -1013,7 +1014,6 @@
// We only need a temp register for non-strict compare.
LOperand* temp = compare->is_strict() ? NULL : TempRegister();
return new LIsNullAndBranch(UseRegisterAtStart(compare->value()),
- compare->is_strict(),
temp,
first_id,
second_id);
@@ -1379,17 +1379,22 @@
LInstruction* LChunkBuilder::DoCompare(HCompare* instr) {
Token::Value op = instr->token();
- if (instr->left()->representation().IsInteger32()) {
+ Representation r = instr->GetInputRepresentation();
+ if (r.IsInteger32()) {
+ ASSERT(instr->left()->representation().IsInteger32());
ASSERT(instr->right()->representation().IsInteger32());
LOperand* left = UseRegisterAtStart(instr->left());
LOperand* right = UseOrConstantAtStart(instr->right());
- return DefineAsRegister(new LCmpID(op, left, right, false));
- } else if (instr->left()->representation().IsDouble()) {
+ return DefineAsRegister(new LCmpID(left, right));
+ } else if (r.IsDouble()) {
+ ASSERT(instr->left()->representation().IsDouble());
ASSERT(instr->right()->representation().IsDouble());
LOperand* left = UseRegisterAtStart(instr->left());
LOperand* right = UseRegisterAtStart(instr->right());
- return DefineAsRegister(new LCmpID(op, left, right, true));
+ return DefineAsRegister(new LCmpID(left, right));
} else {
+ ASSERT(instr->left()->representation().IsTagged());
+ ASSERT(instr->right()->representation().IsTagged());
bool reversed = (op == Token::GT || op == Token::LTE);
LOperand* left = UseFixed(instr->left(), reversed ? eax : edx);
LOperand* right = UseFixed(instr->right(), reversed ? edx : eax);
@@ -1412,8 +1417,7 @@
ASSERT(instr->value()->representation().IsTagged());
LOperand* value = UseRegisterAtStart(instr->value());
- return DefineAsRegister(new LIsNull(value,
- instr->is_strict()));
+ return DefineAsRegister(new LIsNull(value));
}
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698