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

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

Issue 7000021: Support symbol comparison in crankshaft. (Closed)
Patch Set: Review fixes Created 9 years, 7 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
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), 1100 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()),
1101 temp); 1101 temp);
1102 } else if (v->IsIsObject()) { 1102 } else if (v->IsIsObject()) {
1103 HIsObject* compare = HIsObject::cast(v); 1103 HIsObject* compare = HIsObject::cast(v);
1104 ASSERT(compare->value()->representation().IsTagged()); 1104 ASSERT(compare->value()->representation().IsTagged());
1105 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value())); 1105 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()));
1106 } else if (v->IsCompareJSObjectEq()) { 1106 } else if (v->IsCompareJSObjectEq()) {
1107 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1107 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1108 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1108 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1109 UseRegisterAtStart(compare->right())); 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()));
1110 } else if (v->IsInstanceOf()) { 1114 } else if (v->IsInstanceOf()) {
1111 HInstanceOf* instance_of = HInstanceOf::cast(v); 1115 HInstanceOf* instance_of = HInstanceOf::cast(v);
1112 LInstanceOfAndBranch* result = 1116 LInstanceOfAndBranch* result =
1113 new LInstanceOfAndBranch(UseFixed(instance_of->left(), rax), 1117 new LInstanceOfAndBranch(UseFixed(instance_of->left(), rax),
1114 UseFixed(instance_of->right(), rdx)); 1118 UseFixed(instance_of->right(), rdx));
1115 return MarkAsCall(result, instr); 1119 return MarkAsCall(result, instr);
1116 } else if (v->IsTypeofIs()) { 1120 } else if (v->IsTypeofIs()) {
1117 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1121 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1118 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1122 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1119 } else if (v->IsIsConstructCall()) { 1123 } else if (v->IsIsConstructCall()) {
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 1511
1508 LInstruction* LChunkBuilder::DoCompareJSObjectEq( 1512 LInstruction* LChunkBuilder::DoCompareJSObjectEq(
1509 HCompareJSObjectEq* instr) { 1513 HCompareJSObjectEq* instr) {
1510 LOperand* left = UseRegisterAtStart(instr->left()); 1514 LOperand* left = UseRegisterAtStart(instr->left());
1511 LOperand* right = UseRegisterAtStart(instr->right()); 1515 LOperand* right = UseRegisterAtStart(instr->right());
1512 LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right); 1516 LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right);
1513 return DefineAsRegister(result); 1517 return DefineAsRegister(result);
1514 } 1518 }
1515 1519
1516 1520
1521 LInstruction* LChunkBuilder::DoCompareSymbolEq(
1522 HCompareSymbolEq* instr) {
1523 LOperand* left = UseRegisterAtStart(instr->left());
1524 LOperand* right = UseRegisterAtStart(instr->right());
1525 LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
1526 return DefineAsRegister(result);
1527 }
1528
1529
1517 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { 1530 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
1518 ASSERT(instr->value()->representation().IsTagged()); 1531 ASSERT(instr->value()->representation().IsTagged());
1519 LOperand* value = UseRegisterAtStart(instr->value()); 1532 LOperand* value = UseRegisterAtStart(instr->value());
1520 1533
1521 return DefineAsRegister(new LIsNull(value)); 1534 return DefineAsRegister(new LIsNull(value));
1522 } 1535 }
1523 1536
1524 1537
1525 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1538 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1526 ASSERT(instr->value()->representation().IsTagged()); 1539 ASSERT(instr->value()->representation().IsTagged());
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 LOperand* key = UseOrConstantAtStart(instr->key()); 2156 LOperand* key = UseOrConstantAtStart(instr->key());
2144 LOperand* object = UseOrConstantAtStart(instr->object()); 2157 LOperand* object = UseOrConstantAtStart(instr->object());
2145 LIn* result = new LIn(key, object); 2158 LIn* result = new LIn(key, object);
2146 return MarkAsCall(DefineFixed(result, rax), instr); 2159 return MarkAsCall(DefineFixed(result, rax), instr);
2147 } 2160 }
2148 2161
2149 2162
2150 } } // namespace v8::internal 2163 } } // namespace v8::internal
2151 2164
2152 #endif // V8_TARGET_ARCH_X64 2165 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698