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

Side by Side Diff: src/ia32/ic-ia32.cc

Issue 8520006: Optimize the equality check case of ICCompare stubs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
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 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 HandleScope scope; 1618 HandleScope scope;
1619 Handle<Code> rewritten; 1619 Handle<Code> rewritten;
1620 State previous_state = GetState(); 1620 State previous_state = GetState();
1621 1621
1622 State state = TargetState(previous_state, HasInlinedSmiCode(address()), x, y); 1622 State state = TargetState(previous_state, HasInlinedSmiCode(address()), x, y);
1623 if (state == GENERIC) { 1623 if (state == GENERIC) {
1624 CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS); 1624 CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS);
1625 rewritten = stub.GetCode(); 1625 rewritten = stub.GetCode();
1626 } else { 1626 } else {
1627 ICCompareStub stub(op_, state); 1627 ICCompareStub stub(op_, state);
1628 rewritten = stub.GetCode(); 1628 if (state == KNOWN_OBJECTS) {
1629 stub.set_known_map(Handle<JSObject>::cast(x)->map());
1630 rewritten = stub.GetCode(true);
Kevin Millikin (Chromium) 2011/11/10 19:08:42 Nicer to have a virtual "UseSpecialCache" function
Rico 2011/11/11 08:49:11 Done.
1631 } else {
1632 rewritten = stub.GetCode();
1633 }
1634
1635
1629 } 1636 }
1630 set_target(*rewritten); 1637 set_target(*rewritten);
1631 1638
1632 #ifdef DEBUG 1639 #ifdef DEBUG
1633 if (FLAG_trace_ic) { 1640 if (FLAG_trace_ic) {
1634 PrintF("[CompareIC (%s->%s)#%s]\n", 1641 PrintF("[CompareIC (%s->%s)#%s]\n",
1635 GetStateName(previous_state), 1642 GetStateName(previous_state),
1636 GetStateName(state), 1643 GetStateName(state),
1637 Token::Name(op_)); 1644 Token::Name(op_));
1638 } 1645 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1681 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1675 ? not_zero 1682 ? not_zero
1676 : zero; 1683 : zero;
1677 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1684 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1678 } 1685 }
1679 1686
1680 1687
1681 } } // namespace v8::internal 1688 } } // namespace v8::internal
1682 1689
1683 #endif // V8_TARGET_ARCH_IA32 1690 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698