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

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 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 if (state == KNOWN_OBJECTS) {
1629 stub.set_known_map(Handle<Map>(Handle<JSObject>::cast(x)->map()));
1630 }
1628 rewritten = stub.GetCode(); 1631 rewritten = stub.GetCode();
1629 } 1632 }
1630 set_target(*rewritten); 1633 set_target(*rewritten);
1631 1634
1632 #ifdef DEBUG 1635 #ifdef DEBUG
1633 if (FLAG_trace_ic) { 1636 if (FLAG_trace_ic) {
1634 PrintF("[CompareIC (%s->%s)#%s]\n", 1637 PrintF("[CompareIC (%s->%s)#%s]\n",
1635 GetStateName(previous_state), 1638 GetStateName(previous_state),
1636 GetStateName(state), 1639 GetStateName(state),
1637 Token::Name(op_)); 1640 Token::Name(op_));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1677 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1675 ? not_zero 1678 ? not_zero
1676 : zero; 1679 : zero;
1677 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1680 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1678 } 1681 }
1679 1682
1680 1683
1681 } } // namespace v8::internal 1684 } } // namespace v8::internal
1682 1685
1683 #endif // V8_TARGET_ARCH_IA32 1686 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/heap.h ('K') | « src/ia32/code-stubs-ia32.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698