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

Side by Side Diff: src/ic.cc

Issue 15806005: fix the compare nil ic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months 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
« no previous file with comments | « src/ic.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 CompareIC ic(isolate, static_cast<Token::Value>(args.smi_at(2))); 2885 CompareIC ic(isolate, static_cast<Token::Value>(args.smi_at(2)));
2886 ic.UpdateCaches(args.at<Object>(0), args.at<Object>(1)); 2886 ic.UpdateCaches(args.at<Object>(0), args.at<Object>(1));
2887 return ic.target(); 2887 return ic.target();
2888 } 2888 }
2889 2889
2890 2890
2891 void CompareNilIC::Clear(Address address, Code* target) { 2891 void CompareNilIC::Clear(Address address, Code* target) {
2892 if (target->ic_state() == UNINITIALIZED) return; 2892 if (target->ic_state() == UNINITIALIZED) return;
2893 Code::ExtraICState state = target->extended_extra_ic_state(); 2893 Code::ExtraICState state = target->extended_extra_ic_state();
2894 2894
2895 CompareNilICStub stub(state, CompareNilICStub::CODE_STUB_IS_MISS); 2895 CompareNilICStub stub(state, HydrogenCodeStub::UNINITIALIZED);
2896 stub.ClearTypes(); 2896 stub.ClearTypes();
2897 2897
2898 Code* code = NULL; 2898 Code* code = NULL;
2899 CHECK(stub.FindCodeInCache(&code, target->GetIsolate())); 2899 CHECK(stub.FindCodeInCache(&code, target->GetIsolate()));
2900 2900
2901 SetTargetAtAddress(address, code); 2901 SetTargetAtAddress(address, code);
2902 } 2902 }
2903 2903
2904 2904
2905 MaybeObject* CompareNilIC::DoCompareNilSlow(EqualityKind kind, 2905 MaybeObject* CompareNilIC::DoCompareNilSlow(EqualityKind kind,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 #undef ADDR 3002 #undef ADDR
3003 }; 3003 };
3004 3004
3005 3005
3006 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3006 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3007 return IC_utilities[id]; 3007 return IC_utilities[id];
3008 } 3008 }
3009 3009
3010 3010
3011 } } // namespace v8::internal 3011 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698