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

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

Issue 8872060: Reland 10216 - 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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) { 1580 void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
1581 HandleScope scope; 1581 HandleScope scope;
1582 Handle<Code> rewritten; 1582 Handle<Code> rewritten;
1583 State previous_state = GetState(); 1583 State previous_state = GetState();
1584 State state = TargetState(previous_state, false, x, y); 1584 State state = TargetState(previous_state, false, x, y);
1585 if (state == GENERIC) { 1585 if (state == GENERIC) {
1586 CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS, r1, r0); 1586 CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS, r1, r0);
1587 rewritten = stub.GetCode(); 1587 rewritten = stub.GetCode();
1588 } else { 1588 } else {
1589 ICCompareStub stub(op_, state); 1589 ICCompareStub stub(op_, state);
1590 if (state == KNOWN_OBJECTS) {
1591 stub.set_known_map(Handle<Map>(Handle<JSObject>::cast(x)->map()));
1592 }
1590 rewritten = stub.GetCode(); 1593 rewritten = stub.GetCode();
1591 } 1594 }
1592 set_target(*rewritten); 1595 set_target(*rewritten);
1593 1596
1594 #ifdef DEBUG 1597 #ifdef DEBUG
1595 if (FLAG_trace_ic) { 1598 if (FLAG_trace_ic) {
1596 PrintF("[CompareIC (%s->%s)#%s]\n", 1599 PrintF("[CompareIC (%s->%s)#%s]\n",
1597 GetStateName(previous_state), 1600 GetStateName(previous_state),
1598 GetStateName(state), 1601 GetStateName(state),
1599 Token::Name(op_)); 1602 Token::Name(op_));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 Register reg = Assembler::GetRn(instr_at_patch); 1673 Register reg = Assembler::GetRn(instr_at_patch);
1671 patcher.masm()->tst(reg, Operand(kSmiTagMask)); 1674 patcher.masm()->tst(reg, Operand(kSmiTagMask));
1672 patcher.EmitCondition(eq); 1675 patcher.EmitCondition(eq);
1673 } 1676 }
1674 } 1677 }
1675 1678
1676 1679
1677 } } // namespace v8::internal 1680 } } // namespace v8::internal
1678 1681
1679 #endif // V8_TARGET_ARCH_ARM 1682 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698