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

Side by Side Diff: src/arm/lithium-arm.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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 UseRegisterAtStart(compare->value())); 1096 UseRegisterAtStart(compare->value()));
1097 } else if (v->IsIsNull()) { 1097 } else if (v->IsIsNull()) {
1098 HIsNull* compare = HIsNull::cast(v); 1098 HIsNull* compare = HIsNull::cast(v);
1099 ASSERT(compare->value()->representation().IsTagged()); 1099 ASSERT(compare->value()->representation().IsTagged());
1100 return new LIsNullAndBranch(UseRegisterAtStart(compare->value())); 1100 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()));
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* temp = TempRegister(); 1104 LOperand* temp = TempRegister();
1105 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp); 1105 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
1106 } else if (v->IsCompareJSObjectEq()) { 1106 } else if (v->IsCompareObjectEq()) {
1107 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1107 HCompareObjectEq* compare = HCompareObjectEq::cast(v);
1108 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1108 return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1109 UseRegisterAtStart(compare->right()));
1110 } else if (v->IsCompareSymbolEq()) {
1111 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
1112 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
1113 UseRegisterAtStart(compare->right())); 1109 UseRegisterAtStart(compare->right()));
1114 } else if (v->IsCompareConstantEq()) { 1110 } else if (v->IsCompareConstantEq()) {
1115 HCompareConstantEq* compare = HCompareConstantEq::cast(v); 1111 HCompareConstantEq* compare = HCompareConstantEq::cast(v);
1116 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value())); 1112 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value()));
1117 } else if (v->IsTypeofIs()) { 1113 } else if (v->IsTypeofIs()) {
1118 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1114 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1119 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1115 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1120 } else if (v->IsIsConstructCall()) { 1116 } else if (v->IsIsConstructCall()) {
1121 return new LIsConstructCallAndBranch(TempRegister()); 1117 return new LIsConstructCallAndBranch(TempRegister());
1122 } else if (v->IsConstant()) { 1118 } else if (v->IsConstant()) {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 ASSERT(instr->right()->representation().IsTagged()); 1493 ASSERT(instr->right()->representation().IsTagged());
1498 bool reversed = (op == Token::GT || op == Token::LTE); 1494 bool reversed = (op == Token::GT || op == Token::LTE);
1499 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1); 1495 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
1500 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0); 1496 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
1501 LCmpT* result = new LCmpT(left, right); 1497 LCmpT* result = new LCmpT(left, right);
1502 return MarkAsCall(DefineFixed(result, r0), instr); 1498 return MarkAsCall(DefineFixed(result, r0), instr);
1503 } 1499 }
1504 } 1500 }
1505 1501
1506 1502
1507 LInstruction* LChunkBuilder::DoCompareJSObjectEq( 1503 LInstruction* LChunkBuilder::DoCompareObjectEq(HCompareObjectEq* instr) {
1508 HCompareJSObjectEq* instr) {
1509 LOperand* left = UseRegisterAtStart(instr->left()); 1504 LOperand* left = UseRegisterAtStart(instr->left());
1510 LOperand* right = UseRegisterAtStart(instr->right()); 1505 LOperand* right = UseRegisterAtStart(instr->right());
1511 LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right); 1506 LCmpObjectEq* result = new LCmpObjectEq(left, right);
1512 return DefineAsRegister(result);
1513 }
1514
1515
1516 LInstruction* LChunkBuilder::DoCompareSymbolEq(
1517 HCompareSymbolEq* instr) {
1518 LOperand* left = UseRegisterAtStart(instr->left());
1519 LOperand* right = UseRegisterAtStart(instr->right());
1520 LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
1521 return DefineAsRegister(result); 1507 return DefineAsRegister(result);
1522 } 1508 }
1523 1509
1524 1510
1525 LInstruction* LChunkBuilder::DoCompareConstantEq( 1511 LInstruction* LChunkBuilder::DoCompareConstantEq(
1526 HCompareConstantEq* instr) { 1512 HCompareConstantEq* instr) {
1527 LOperand* left = UseRegisterAtStart(instr->value()); 1513 LOperand* left = UseRegisterAtStart(instr->value());
1528 return DefineAsRegister(new LCmpConstantEq(left)); 1514 return DefineAsRegister(new LCmpConstantEq(left));
1529 } 1515 }
1530 1516
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 2230
2245 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2231 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2246 LOperand* key = UseRegisterAtStart(instr->key()); 2232 LOperand* key = UseRegisterAtStart(instr->key());
2247 LOperand* object = UseRegisterAtStart(instr->object()); 2233 LOperand* object = UseRegisterAtStart(instr->object());
2248 LIn* result = new LIn(key, object); 2234 LIn* result = new LIn(key, object);
2249 return MarkAsCall(DefineFixed(result, r0), instr); 2235 return MarkAsCall(DefineFixed(result, r0), instr);
2250 } 2236 }
2251 2237
2252 2238
2253 } } // namespace v8::internal 2239 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698