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

Unified Diff: test/unittests/compiler/load-elimination-unittest.cc

Issue 1857133003: [turbofan] Restrict types in load elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 8 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/mjsunit/regress/regress-599412.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/load-elimination-unittest.cc
diff --git a/test/unittests/compiler/load-elimination-unittest.cc b/test/unittests/compiler/load-elimination-unittest.cc
index 3ad11cf43fd924a5d6f514bc5503f7184fc626b4..38bb151dbaaa6480154ecc063c60380e0072e017 100644
--- a/test/unittests/compiler/load-elimination-unittest.cc
+++ b/test/unittests/compiler/load-elimination-unittest.cc
@@ -12,30 +12,33 @@ namespace v8 {
namespace internal {
namespace compiler {
-class LoadEliminationTest : public GraphTest {
+class LoadEliminationTest : public TypedGraphTest {
public:
- LoadEliminationTest() : GraphTest(3), simplified_(zone()) {}
+ LoadEliminationTest()
+ : TypedGraphTest(3), common_(zone()), simplified_(zone()) {}
~LoadEliminationTest() override {}
protected:
Reduction Reduce(Node* node) {
// TODO(titzer): mock the GraphReducer here for better unit testing.
GraphReducer graph_reducer(zone(), graph());
- LoadElimination reducer(&graph_reducer);
+ LoadElimination reducer(&graph_reducer, graph(), common());
return reducer.Reduce(node);
}
SimplifiedOperatorBuilder* simplified() { return &simplified_; }
+ CommonOperatorBuilder* common() { return &common_; }
private:
+ CommonOperatorBuilder common_;
SimplifiedOperatorBuilder simplified_;
};
TEST_F(LoadEliminationTest, LoadFieldWithStoreField) {
- Node* object1 = Parameter(0);
- Node* object2 = Parameter(1);
- Node* value = Parameter(2);
+ Node* object1 = Parameter(Type::Any(), 0);
+ Node* object2 = Parameter(Type::Any(), 1);
+ Node* value = Parameter(Type::Any(), 2);
Node* effect = graph()->start();
Node* control = graph()->start();
« no previous file with comments | « test/mjsunit/regress/regress-599412.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698