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

Unified Diff: test/cctest/test-compare-nil-ic-stub.cc

Issue 16361015: Migrate Compare ICs to new type rep (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/typing.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compare-nil-ic-stub.cc
diff --git a/test/cctest/test-compare-nil-ic-stub.cc b/test/cctest/test-compare-nil-ic-stub.cc
index affb8bd63778dc1f4dbf9e55b48643d1d1515b16..258ab012c7c882f3d677cc22880b3a93125ec915 100644
--- a/test/cctest/test-compare-nil-ic-stub.cc
+++ b/test/cctest/test-compare-nil-ic-stub.cc
@@ -34,26 +34,26 @@
using namespace v8::internal;
-#define Types CompareNilICStub::Types
+typedef CompareNilICStub::State State;
-TEST(TypeConstructors) {
- Types types;
- types.Add(CompareNilICStub::MONOMORPHIC_MAP);
- Types types2(types);
- CHECK_EQ(types.ToIntegral(), types2.ToIntegral());
+TEST(StateConstructors) {
+ State state;
+ state.Add(CompareNilICStub::MONOMORPHIC_MAP);
+ State state2(state);
+ CHECK_EQ(state.ToIntegral(), state2.ToIntegral());
}
TEST(ExternalICStateParsing) {
- Types types;
- types.Add(CompareNilICStub::UNDEFINED);
- CompareNilICStub stub(kUndefinedValue, types);
+ State state;
+ state.Add(CompareNilICStub::UNDEFINED);
+ CompareNilICStub stub(kUndefinedValue, state);
CompareNilICStub stub2(stub.GetExtraICState());
CHECK_EQ(stub.GetNilValue(), stub2.GetNilValue());
- CHECK_EQ(stub.GetTypes().ToIntegral(), stub2.GetTypes().ToIntegral());
+ CHECK_EQ(stub.GetState().ToIntegral(), stub2.GetState().ToIntegral());
}
-TEST(SettingTypes) {
- Types state;
+TEST(SettingState) {
+ State state;
CHECK(state.IsEmpty());
state.Add(CompareNilICStub::NULL_TYPE);
CHECK(!state.IsEmpty());
@@ -66,20 +66,22 @@ TEST(SettingTypes) {
CHECK(!state.Contains(CompareNilICStub::UNDETECTABLE));
}
-TEST(ClearTypes) {
- Types state;
+TEST(ClearState) {
+ State state;
state.Add(CompareNilICStub::NULL_TYPE);
state.RemoveAll();
CHECK(state.IsEmpty());
}
-TEST(FullCompare) {
- Types state;
- CHECK(Types::FullCompare() != state);
+TEST(Generic) {
+ State state;
+ CHECK(State::Generic() != state);
state.Add(CompareNilICStub::UNDEFINED);
- CHECK(state != Types::FullCompare());
+ CHECK(state != State::Generic());
state.Add(CompareNilICStub::NULL_TYPE);
- CHECK(state != Types::FullCompare());
+ CHECK(state != State::Generic());
state.Add(CompareNilICStub::UNDETECTABLE);
- CHECK(state == Types::FullCompare());
+ CHECK(state != State::Generic());
+ state.Add(CompareNilICStub::GENERIC);
+ CHECK(state == State::Generic());
}
« no previous file with comments | « src/typing.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698