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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 | 1605 |
1606 | 1606 |
1607 void LCodeGen::DoCmpJSObjectEq(LCmpJSObjectEq* instr) { | 1607 void LCodeGen::DoCmpJSObjectEq(LCmpJSObjectEq* instr) { |
1608 Register left = ToRegister(instr->left()); | 1608 Register left = ToRegister(instr->left()); |
1609 Register right = ToRegister(instr->right()); | 1609 Register right = ToRegister(instr->right()); |
1610 Register result = ToRegister(instr->result()); | 1610 Register result = ToRegister(instr->result()); |
1611 | 1611 |
1612 __ cmp(left, Operand(right)); | 1612 __ cmp(left, Operand(right)); |
1613 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); | 1613 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); |
1614 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); | 1614 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); |
1615 Abort("DoCmpJSObjectEq untested."); | |
1616 } | 1615 } |
1617 | 1616 |
1618 | 1617 |
1619 void LCodeGen::DoCmpJSObjectEqAndBranch(LCmpJSObjectEqAndBranch* instr) { | 1618 void LCodeGen::DoCmpJSObjectEqAndBranch(LCmpJSObjectEqAndBranch* instr) { |
1620 Abort("DoCmpJSObjectEqAndBranch unimplemented."); | 1619 Register left = ToRegister(instr->left()); |
| 1620 Register right = ToRegister(instr->right()); |
| 1621 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 1622 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| 1623 |
| 1624 __ cmp(left, Operand(right)); |
| 1625 EmitBranch(true_block, false_block, eq); |
1621 } | 1626 } |
1622 | 1627 |
1623 | 1628 |
1624 void LCodeGen::DoIsNull(LIsNull* instr) { | 1629 void LCodeGen::DoIsNull(LIsNull* instr) { |
1625 Register reg = ToRegister(instr->input()); | 1630 Register reg = ToRegister(instr->input()); |
1626 Register result = ToRegister(instr->result()); | 1631 Register result = ToRegister(instr->result()); |
1627 | 1632 |
1628 __ LoadRoot(ip, Heap::kNullValueRootIndex); | 1633 __ LoadRoot(ip, Heap::kNullValueRootIndex); |
1629 __ cmp(reg, ip); | 1634 __ cmp(reg, ip); |
1630 if (instr->is_strict()) { | 1635 if (instr->is_strict()) { |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3215 | 3220 |
3216 | 3221 |
3217 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 3222 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
3218 Abort("DoOsrEntry unimplemented."); | 3223 Abort("DoOsrEntry unimplemented."); |
3219 } | 3224 } |
3220 | 3225 |
3221 | 3226 |
3222 #undef __ | 3227 #undef __ |
3223 | 3228 |
3224 } } // namespace v8::internal | 3229 } } // namespace v8::internal |
OLD | NEW |