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

Unified Diff: test/cctest/types-fuzz.h

Issue 904863002: [turbofan] Separate representation type operations from the semantic types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 5 years, 10 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 | « test/cctest/test-types.cc ('k') | test/unittests/compiler/typer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/types-fuzz.h
diff --git a/test/cctest/types-fuzz.h b/test/cctest/types-fuzz.h
index 425011d4aec94a81cc6d4684de6baeb365c70ca4..6864cd2df167a5d2da1e14e6744f96a29af1adf2 100644
--- a/test/cctest/types-fuzz.h
+++ b/test/cctest/types-fuzz.h
@@ -28,6 +28,7 @@
#ifndef V8_TEST_CCTEST_TYPES_H_
#define V8_TEST_CCTEST_TYPES_H_
+#include "src/base/utils/random-number-generator.h"
#include "src/v8.h"
namespace v8 {
@@ -37,8 +38,8 @@ namespace internal {
template<class Type, class TypeHandle, class Region>
class Types {
public:
- Types(Region* region, Isolate* isolate)
- : region_(region), rng_(isolate->random_number_generator()) {
+ Types(Region* region, Isolate* isolate, v8::base::RandomNumberGenerator* rng)
+ : region_(region), rng_(rng) {
#define DECLARE_TYPE(name, value) \
name = Type::name(region); \
types.push_back(name);
@@ -132,6 +133,10 @@ class Types {
#define DECLARE_TYPE(name, value) TypeHandle name;
PROPER_BITSET_TYPE_LIST(DECLARE_TYPE)
#undef DECLARE_TYPE
+
+#define DECLARE_TYPE(name, value) TypeHandle Mask##name##ForTesting;
+ MASK_BITSET_TYPE_LIST(DECLARE_TYPE)
+#undef DECLARE_TYPE
TypeHandle SignedSmall;
TypeHandle UnsignedSmall;
@@ -212,10 +217,19 @@ class Types {
TypeHandle Union(TypeHandle t1, TypeHandle t2) {
return Type::Union(t1, t2, region_);
}
+
TypeHandle Intersect(TypeHandle t1, TypeHandle t2) {
return Type::Intersect(t1, t2, region_);
}
+ TypeHandle Representation(TypeHandle t) {
+ return Type::Representation(t, region_);
+ }
+
+ // TypeHandle Semantic(TypeHandle t) { return Intersect(t,
+ // MaskSemanticForTesting); }
+ TypeHandle Semantic(TypeHandle t) { return Type::Semantic(t, region_); }
+
template<class Type2, class TypeHandle2>
TypeHandle Convert(TypeHandle2 t) {
return Type::template Convert<Type2>(t, region_);
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/unittests/compiler/typer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698