| 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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 HandleScope scope; | 1634 HandleScope scope; |
| 1635 Handle<Code> rewritten; | 1635 Handle<Code> rewritten; |
| 1636 State previous_state = GetState(); | 1636 State previous_state = GetState(); |
| 1637 | 1637 |
| 1638 State state = TargetState(previous_state, HasInlinedSmiCode(address()), x, y); | 1638 State state = TargetState(previous_state, HasInlinedSmiCode(address()), x, y); |
| 1639 if (state == GENERIC) { | 1639 if (state == GENERIC) { |
| 1640 CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS); | 1640 CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS); |
| 1641 rewritten = stub.GetCode(); | 1641 rewritten = stub.GetCode(); |
| 1642 } else { | 1642 } else { |
| 1643 ICCompareStub stub(op_, state); | 1643 ICCompareStub stub(op_, state); |
| 1644 if (state == KNOWN_OBJECTS) { |
| 1645 stub.set_known_map(Handle<Map>(Handle<JSObject>::cast(x)->map())); |
| 1646 } |
| 1644 rewritten = stub.GetCode(); | 1647 rewritten = stub.GetCode(); |
| 1645 } | 1648 } |
| 1646 set_target(*rewritten); | 1649 set_target(*rewritten); |
| 1647 | 1650 |
| 1648 #ifdef DEBUG | 1651 #ifdef DEBUG |
| 1649 if (FLAG_trace_ic) { | 1652 if (FLAG_trace_ic) { |
| 1650 PrintF("[CompareIC (%s->%s)#%s]\n", | 1653 PrintF("[CompareIC (%s->%s)#%s]\n", |
| 1651 GetStateName(previous_state), | 1654 GetStateName(previous_state), |
| 1652 GetStateName(state), | 1655 GetStateName(state), |
| 1653 Token::Name(op_)); | 1656 Token::Name(op_)); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1692 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1690 ? not_zero | 1693 ? not_zero |
| 1691 : zero; | 1694 : zero; |
| 1692 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1695 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1693 } | 1696 } |
| 1694 | 1697 |
| 1695 | 1698 |
| 1696 } } // namespace v8::internal | 1699 } } // namespace v8::internal |
| 1697 | 1700 |
| 1698 #endif // V8_TARGET_ARCH_X64 | 1701 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |