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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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->IsCompareJSObjectEq()) { |
1104 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); | 1104 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); |
1105 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), | 1105 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), |
1106 UseRegisterAtStart(compare->right())); | 1106 UseRegisterAtStart(compare->right())); |
1107 } else if (v->IsCompareSymbolEq()) { | 1107 } else if (v->IsCompareSymbolEq()) { |
1108 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v); | 1108 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v); |
1109 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()), | 1109 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()), |
1110 UseRegisterAtStart(compare->right())); | 1110 UseRegisterAtStart(compare->right())); |
| 1111 } else if (v->IsCompareConstantEq()) { |
| 1112 HCompareConstantEq* compare = HCompareConstantEq::cast(v); |
| 1113 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value())); |
1111 } else if (v->IsTypeofIs()) { | 1114 } else if (v->IsTypeofIs()) { |
1112 HTypeofIs* typeof_is = HTypeofIs::cast(v); | 1115 HTypeofIs* typeof_is = HTypeofIs::cast(v); |
1113 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); | 1116 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); |
1114 } else if (v->IsIsConstructCall()) { | 1117 } else if (v->IsIsConstructCall()) { |
1115 return new LIsConstructCallAndBranch(TempRegister()); | 1118 return new LIsConstructCallAndBranch(TempRegister()); |
1116 } else if (v->IsConstant()) { | 1119 } else if (v->IsConstant()) { |
1117 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() | 1120 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() |
1118 ? instr->FirstSuccessor() | 1121 ? instr->FirstSuccessor() |
1119 : instr->SecondSuccessor(); | 1122 : instr->SecondSuccessor(); |
1120 return new LGoto(successor->block_id()); | 1123 return new LGoto(successor->block_id()); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 | 1515 |
1513 LInstruction* LChunkBuilder::DoCompareSymbolEq( | 1516 LInstruction* LChunkBuilder::DoCompareSymbolEq( |
1514 HCompareSymbolEq* instr) { | 1517 HCompareSymbolEq* instr) { |
1515 LOperand* left = UseRegisterAtStart(instr->left()); | 1518 LOperand* left = UseRegisterAtStart(instr->left()); |
1516 LOperand* right = UseRegisterAtStart(instr->right()); | 1519 LOperand* right = UseRegisterAtStart(instr->right()); |
1517 LCmpSymbolEq* result = new LCmpSymbolEq(left, right); | 1520 LCmpSymbolEq* result = new LCmpSymbolEq(left, right); |
1518 return DefineAsRegister(result); | 1521 return DefineAsRegister(result); |
1519 } | 1522 } |
1520 | 1523 |
1521 | 1524 |
| 1525 LInstruction* LChunkBuilder::DoCompareConstantEq( |
| 1526 HCompareConstantEq* instr) { |
| 1527 LOperand* left = UseRegisterAtStart(instr->value()); |
| 1528 return DefineAsRegister(new LCmpConstantEq(left)); |
| 1529 } |
| 1530 |
| 1531 |
1522 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { | 1532 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { |
1523 ASSERT(instr->value()->representation().IsTagged()); | 1533 ASSERT(instr->value()->representation().IsTagged()); |
1524 LOperand* value = UseRegisterAtStart(instr->value()); | 1534 LOperand* value = UseRegisterAtStart(instr->value()); |
1525 | 1535 |
1526 return DefineAsRegister(new LIsNull(value)); | 1536 return DefineAsRegister(new LIsNull(value)); |
1527 } | 1537 } |
1528 | 1538 |
1529 | 1539 |
1530 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { | 1540 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { |
1531 ASSERT(instr->value()->representation().IsTagged()); | 1541 ASSERT(instr->value()->representation().IsTagged()); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 } | 1604 } |
1595 | 1605 |
1596 | 1606 |
1597 LInstruction* LChunkBuilder::DoExternalArrayLength( | 1607 LInstruction* LChunkBuilder::DoExternalArrayLength( |
1598 HExternalArrayLength* instr) { | 1608 HExternalArrayLength* instr) { |
1599 LOperand* array = UseRegisterAtStart(instr->value()); | 1609 LOperand* array = UseRegisterAtStart(instr->value()); |
1600 return DefineAsRegister(new LExternalArrayLength(array)); | 1610 return DefineAsRegister(new LExternalArrayLength(array)); |
1601 } | 1611 } |
1602 | 1612 |
1603 | 1613 |
| 1614 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { |
| 1615 LOperand* object = UseRegisterAtStart(instr->value()); |
| 1616 return DefineAsRegister(new LElementsKind(object)); |
| 1617 } |
| 1618 |
| 1619 |
1604 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | 1620 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
1605 LOperand* object = UseRegister(instr->value()); | 1621 LOperand* object = UseRegister(instr->value()); |
1606 LValueOf* result = new LValueOf(object); | 1622 LValueOf* result = new LValueOf(object); |
1607 return AssignEnvironment(DefineSameAsFirst(result)); | 1623 return AssignEnvironment(DefineSameAsFirst(result)); |
1608 } | 1624 } |
1609 | 1625 |
1610 | 1626 |
1611 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1627 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
1612 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), | 1628 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), |
1613 Use(instr->length()))); | 1629 Use(instr->length()))); |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2222 LOperand* key = UseOrConstantAtStart(instr->key()); | 2238 LOperand* key = UseOrConstantAtStart(instr->key()); |
2223 LOperand* object = UseOrConstantAtStart(instr->object()); | 2239 LOperand* object = UseOrConstantAtStart(instr->object()); |
2224 LIn* result = new LIn(key, object); | 2240 LIn* result = new LIn(key, object); |
2225 return MarkAsCall(DefineFixed(result, rax), instr); | 2241 return MarkAsCall(DefineFixed(result, rax), instr); |
2226 } | 2242 } |
2227 | 2243 |
2228 | 2244 |
2229 } } // namespace v8::internal | 2245 } } // namespace v8::internal |
2230 | 2246 |
2231 #endif // V8_TARGET_ARCH_X64 | 2247 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |