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

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

Issue 7206040: Remove redundant hydrogen- and lithium instruction for symbol comparison. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 LOperand* temp = compare->is_strict() ? NULL : TempRegister(); 1099 LOperand* temp = compare->is_strict() ? NULL : TempRegister();
1100 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp); 1100 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp);
1101 } else if (v->IsIsObject()) { 1101 } else if (v->IsIsObject()) {
1102 HIsObject* compare = HIsObject::cast(v); 1102 HIsObject* compare = HIsObject::cast(v);
1103 ASSERT(compare->value()->representation().IsTagged()); 1103 ASSERT(compare->value()->representation().IsTagged());
1104 LOperand* temp1 = TempRegister(); 1104 LOperand* temp1 = TempRegister();
1105 LOperand* temp2 = TempRegister(); 1105 LOperand* temp2 = TempRegister();
1106 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), 1106 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
1107 temp1, 1107 temp1,
1108 temp2); 1108 temp2);
1109 } else if (v->IsCompareJSObjectEq()) { 1109 } else if (v->IsCompareObjectEq()) {
1110 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1110 HCompareObjectEq* compare = HCompareObjectEq::cast(v);
1111 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1111 return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1112 UseRegisterAtStart(compare->right()));
1113 } else if (v->IsCompareSymbolEq()) {
1114 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
1115 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
1116 UseRegisterAtStart(compare->right())); 1112 UseRegisterAtStart(compare->right()));
1117 } else if (v->IsCompareConstantEq()) { 1113 } else if (v->IsCompareConstantEq()) {
1118 HCompareConstantEq* compare = HCompareConstantEq::cast(v); 1114 HCompareConstantEq* compare = HCompareConstantEq::cast(v);
1119 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value())); 1115 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value()));
1120 } else if (v->IsTypeofIs()) { 1116 } else if (v->IsTypeofIs()) {
1121 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1117 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1122 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1118 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1123 } else if (v->IsIsConstructCall()) { 1119 } else if (v->IsIsConstructCall()) {
1124 return new LIsConstructCallAndBranch(TempRegister()); 1120 return new LIsConstructCallAndBranch(TempRegister());
1125 } else if (v->IsConstant()) { 1121 } else if (v->IsConstant()) {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 ASSERT(instr->right()->representation().IsTagged()); 1517 ASSERT(instr->right()->representation().IsTagged());
1522 bool reversed = (op == Token::GT || op == Token::LTE); 1518 bool reversed = (op == Token::GT || op == Token::LTE);
1523 LOperand* left = UseFixed(instr->left(), reversed ? eax : edx); 1519 LOperand* left = UseFixed(instr->left(), reversed ? eax : edx);
1524 LOperand* right = UseFixed(instr->right(), reversed ? edx : eax); 1520 LOperand* right = UseFixed(instr->right(), reversed ? edx : eax);
1525 LCmpT* result = new LCmpT(left, right); 1521 LCmpT* result = new LCmpT(left, right);
1526 return MarkAsCall(DefineFixed(result, eax), instr); 1522 return MarkAsCall(DefineFixed(result, eax), instr);
1527 } 1523 }
1528 } 1524 }
1529 1525
1530 1526
1531 LInstruction* LChunkBuilder::DoCompareJSObjectEq( 1527 LInstruction* LChunkBuilder::DoCompareObjectEq(HCompareObjectEq* instr) {
1532 HCompareJSObjectEq* instr) {
1533 LOperand* left = UseRegisterAtStart(instr->left()); 1528 LOperand* left = UseRegisterAtStart(instr->left());
1534 LOperand* right = UseRegisterAtStart(instr->right()); 1529 LOperand* right = UseRegisterAtStart(instr->right());
1535 LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right); 1530 LCmpObjectEq* result = new LCmpObjectEq(left, right);
1536 return DefineAsRegister(result);
1537 }
1538
1539
1540 LInstruction* LChunkBuilder::DoCompareSymbolEq(
1541 HCompareSymbolEq* instr) {
1542 LOperand* left = UseRegisterAtStart(instr->left());
1543 LOperand* right = UseRegisterAtStart(instr->right());
1544 LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
1545 return DefineAsRegister(result); 1531 return DefineAsRegister(result);
1546 } 1532 }
1547 1533
1548 1534
1549 LInstruction* LChunkBuilder::DoCompareConstantEq( 1535 LInstruction* LChunkBuilder::DoCompareConstantEq(
1550 HCompareConstantEq* instr) { 1536 HCompareConstantEq* instr) {
1551 LOperand* left = UseRegisterAtStart(instr->value()); 1537 LOperand* left = UseRegisterAtStart(instr->value());
1552 return DefineAsRegister(new LCmpConstantEq(left)); 1538 return DefineAsRegister(new LCmpConstantEq(left));
1553 } 1539 }
1554 1540
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 LOperand* key = UseOrConstantAtStart(instr->key()); 2283 LOperand* key = UseOrConstantAtStart(instr->key());
2298 LOperand* object = UseOrConstantAtStart(instr->object()); 2284 LOperand* object = UseOrConstantAtStart(instr->object());
2299 LIn* result = new LIn(key, object); 2285 LIn* result = new LIn(key, object);
2300 return MarkAsCall(DefineFixed(result, eax), instr); 2286 return MarkAsCall(DefineFixed(result, eax), instr);
2301 } 2287 }
2302 2288
2303 2289
2304 } } // namespace v8::internal 2290 } } // namespace v8::internal
2305 2291
2306 #endif // V8_TARGET_ARCH_IA32 2292 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/hydrogen.cc ('K') | « src/ia32/lithium-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698