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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-ia32.h ('k') | src/type-info.h » ('j') | 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 1106
1107 LOperand* temp1 = TempRegister(); 1107 LOperand* temp1 = TempRegister();
1108 LOperand* temp2 = TempRegister(); 1108 LOperand* temp2 = TempRegister();
1109 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), 1109 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
1110 temp1, 1110 temp1,
1111 temp2); 1111 temp2);
1112 } else if (v->IsCompareJSObjectEq()) { 1112 } else if (v->IsCompareJSObjectEq()) {
1113 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1113 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1114 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1114 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1115 UseRegisterAtStart(compare->right())); 1115 UseRegisterAtStart(compare->right()));
1116 } else if (v->IsCompareSymbolEq()) {
1117 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
1118 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
1119 UseRegisterAtStart(compare->right()));
1116 } else if (v->IsInstanceOf()) { 1120 } else if (v->IsInstanceOf()) {
1117 HInstanceOf* instance_of = HInstanceOf::cast(v); 1121 HInstanceOf* instance_of = HInstanceOf::cast(v);
1118 LOperand* left = UseFixed(instance_of->left(), InstanceofStub::left()); 1122 LOperand* left = UseFixed(instance_of->left(), InstanceofStub::left());
1119 LOperand* right = UseFixed(instance_of->right(), InstanceofStub::right()); 1123 LOperand* right = UseFixed(instance_of->right(), InstanceofStub::right());
1120 LOperand* context = UseFixed(instance_of->context(), esi); 1124 LOperand* context = UseFixed(instance_of->context(), esi);
1121 LInstanceOfAndBranch* result = 1125 LInstanceOfAndBranch* result =
1122 new LInstanceOfAndBranch(context, left, right); 1126 new LInstanceOfAndBranch(context, left, right);
1123 return MarkAsCall(result, instr); 1127 return MarkAsCall(result, instr);
1124 } else if (v->IsTypeofIs()) { 1128 } else if (v->IsTypeofIs()) {
1125 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1129 HTypeofIs* typeof_is = HTypeofIs::cast(v);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 1537
1534 LInstruction* LChunkBuilder::DoCompareJSObjectEq( 1538 LInstruction* LChunkBuilder::DoCompareJSObjectEq(
1535 HCompareJSObjectEq* instr) { 1539 HCompareJSObjectEq* instr) {
1536 LOperand* left = UseRegisterAtStart(instr->left()); 1540 LOperand* left = UseRegisterAtStart(instr->left());
1537 LOperand* right = UseRegisterAtStart(instr->right()); 1541 LOperand* right = UseRegisterAtStart(instr->right());
1538 LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right); 1542 LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right);
1539 return DefineAsRegister(result); 1543 return DefineAsRegister(result);
1540 } 1544 }
1541 1545
1542 1546
1547 LInstruction* LChunkBuilder::DoCompareSymbolEq(
1548 HCompareSymbolEq* instr) {
1549 LOperand* left = UseRegisterAtStart(instr->left());
1550 LOperand* right = UseRegisterAtStart(instr->right());
1551 LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
1552 return DefineAsRegister(result);
1553 }
1554
1555
1543 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { 1556 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
1544 ASSERT(instr->value()->representation().IsTagged()); 1557 ASSERT(instr->value()->representation().IsTagged());
1545 LOperand* value = UseRegisterAtStart(instr->value()); 1558 LOperand* value = UseRegisterAtStart(instr->value());
1546 1559
1547 return DefineAsRegister(new LIsNull(value)); 1560 return DefineAsRegister(new LIsNull(value));
1548 } 1561 }
1549 1562
1550 1563
1551 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1564 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1552 ASSERT(instr->value()->representation().IsTagged()); 1565 ASSERT(instr->value()->representation().IsTagged());
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 LOperand* key = UseOrConstantAtStart(instr->key()); 2224 LOperand* key = UseOrConstantAtStart(instr->key());
2212 LOperand* object = UseOrConstantAtStart(instr->object()); 2225 LOperand* object = UseOrConstantAtStart(instr->object());
2213 LIn* result = new LIn(key, object); 2226 LIn* result = new LIn(key, object);
2214 return MarkAsCall(DefineFixed(result, eax), instr); 2227 return MarkAsCall(DefineFixed(result, eax), instr);
2215 } 2228 }
2216 2229
2217 2230
2218 } } // namespace v8::internal 2231 } } // namespace v8::internal
2219 2232
2220 #endif // V8_TARGET_ARCH_IA32 2233 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698