| OLD | NEW |
| 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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 } else if (v->IsIsNull()) { | 1093 } else if (v->IsIsNull()) { |
| 1094 HIsNull* compare = HIsNull::cast(v); | 1094 HIsNull* compare = HIsNull::cast(v); |
| 1095 ASSERT(compare->value()->representation().IsTagged()); | 1095 ASSERT(compare->value()->representation().IsTagged()); |
| 1096 // We only need a temp register for non-strict compare. | 1096 // We only need a temp register for non-strict compare. |
| 1097 LOperand* temp = compare->is_strict() ? NULL : TempRegister(); | 1097 LOperand* temp = compare->is_strict() ? NULL : TempRegister(); |
| 1098 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp); | 1098 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp); |
| 1099 } else if (v->IsIsObject()) { | 1099 } else if (v->IsIsObject()) { |
| 1100 HIsObject* compare = HIsObject::cast(v); | 1100 HIsObject* compare = HIsObject::cast(v); |
| 1101 ASSERT(compare->value()->representation().IsTagged()); | 1101 ASSERT(compare->value()->representation().IsTagged()); |
| 1102 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value())); | 1102 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value())); |
| 1103 } else if (v->IsCompareJSObjectEq()) { | 1103 } else if (v->IsCompareObjectEq()) { |
| 1104 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); | 1104 HCompareObjectEq* compare = HCompareObjectEq::cast(v); |
| 1105 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), | 1105 return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()), |
| 1106 UseRegisterAtStart(compare->right())); | |
| 1107 } else if (v->IsCompareSymbolEq()) { | |
| 1108 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v); | |
| 1109 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()), | |
| 1110 UseRegisterAtStart(compare->right())); | 1106 UseRegisterAtStart(compare->right())); |
| 1111 } else if (v->IsCompareConstantEq()) { | 1107 } else if (v->IsCompareConstantEq()) { |
| 1112 HCompareConstantEq* compare = HCompareConstantEq::cast(v); | 1108 HCompareConstantEq* compare = HCompareConstantEq::cast(v); |
| 1113 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value())); | 1109 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value())); |
| 1114 } else if (v->IsTypeofIs()) { | 1110 } else if (v->IsTypeofIs()) { |
| 1115 HTypeofIs* typeof_is = HTypeofIs::cast(v); | 1111 HTypeofIs* typeof_is = HTypeofIs::cast(v); |
| 1116 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); | 1112 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); |
| 1117 } else if (v->IsIsConstructCall()) { | 1113 } else if (v->IsIsConstructCall()) { |
| 1118 return new LIsConstructCallAndBranch(TempRegister()); | 1114 return new LIsConstructCallAndBranch(TempRegister()); |
| 1119 } else if (v->IsConstant()) { | 1115 } else if (v->IsConstant()) { |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ? rax : rdx); | 1495 LOperand* left = UseFixed(instr->left(), reversed ? rax : rdx); |
| 1500 LOperand* right = UseFixed(instr->right(), reversed ? rdx : rax); | 1496 LOperand* right = UseFixed(instr->right(), reversed ? rdx : rax); |
| 1501 LCmpT* result = new LCmpT(left, right); | 1497 LCmpT* result = new LCmpT(left, right); |
| 1502 return MarkAsCall(DefineFixed(result, rax), instr); | 1498 return MarkAsCall(DefineFixed(result, rax), 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 LOperand* key = UseOrConstantAtStart(instr->key()); | 2224 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2239 LOperand* object = UseOrConstantAtStart(instr->object()); | 2225 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2240 LIn* result = new LIn(key, object); | 2226 LIn* result = new LIn(key, object); |
| 2241 return MarkAsCall(DefineFixed(result, rax), instr); | 2227 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2242 } | 2228 } |
| 2243 | 2229 |
| 2244 | 2230 |
| 2245 } } // namespace v8::internal | 2231 } } // namespace v8::internal |
| 2246 | 2232 |
| 2247 #endif // V8_TARGET_ARCH_X64 | 2233 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |