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

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

Issue 2218703003: [turbofan] Add support for copy-on-write element stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix off-by-one loop iteration count. Created 4 years, 4 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/interface-descriptors.h ('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 f56e5c3898f11803d9b67e0d93ec2e7058d5b156..ada99b5a7f8b6761e0221eb6c7a12e54737a9e26 100644
--- a/test/unittests/compiler/load-elimination-unittest.cc
+++ b/test/unittests/compiler/load-elimination-unittest.cc
@@ -4,6 +4,7 @@
#include "src/compiler/load-elimination.h"
#include "src/compiler/access-builder.h"
+#include "src/compiler/js-graph.h"
#include "src/compiler/node.h"
#include "src/compiler/simplified-operator.h"
#include "test/unittests/compiler/graph-reducer-unittest.h"
@@ -20,14 +21,20 @@ namespace compiler {
class LoadEliminationTest : public TypedGraphTest {
public:
- LoadEliminationTest() : TypedGraphTest(3), simplified_(zone()) {}
+ LoadEliminationTest()
+ : TypedGraphTest(3),
+ simplified_(zone()),
+ jsgraph_(isolate(), graph(), common(), nullptr, simplified(), nullptr) {
+ }
~LoadEliminationTest() override {}
protected:
+ JSGraph* jsgraph() { return &jsgraph_; }
SimplifiedOperatorBuilder* simplified() { return &simplified_; }
private:
SimplifiedOperatorBuilder simplified_;
+ JSGraph jsgraph_;
};
TEST_F(LoadEliminationTest, LoadElementAndLoadElement) {
@@ -39,7 +46,7 @@ TEST_F(LoadEliminationTest, LoadElementAndLoadElement) {
MachineType::AnyTagged(), kNoWriteBarrier};
StrictMock<MockAdvancedReducerEditor> editor;
- LoadElimination load_elimination(&editor, zone());
+ LoadElimination load_elimination(&editor, jsgraph(), zone());
load_elimination.Reduce(graph()->start());
@@ -65,7 +72,7 @@ TEST_F(LoadEliminationTest, StoreElementAndLoadElement) {
MachineType::AnyTagged(), kNoWriteBarrier};
StrictMock<MockAdvancedReducerEditor> editor;
- LoadElimination load_elimination(&editor, zone());
+ LoadElimination load_elimination(&editor, jsgraph(), zone());
load_elimination.Reduce(graph()->start());
@@ -92,7 +99,7 @@ TEST_F(LoadEliminationTest, StoreElementAndStoreFieldAndLoadElement) {
MachineType::AnyTagged(), kNoWriteBarrier};
StrictMock<MockAdvancedReducerEditor> editor;
- LoadElimination load_elimination(&editor, zone());
+ LoadElimination load_elimination(&editor, jsgraph(), zone());
load_elimination.Reduce(graph()->start());
@@ -126,7 +133,7 @@ TEST_F(LoadEliminationTest, LoadFieldAndLoadField) {
kNoWriteBarrier};
StrictMock<MockAdvancedReducerEditor> editor;
- LoadElimination load_elimination(&editor, zone());
+ LoadElimination load_elimination(&editor, jsgraph(), zone());
load_elimination.Reduce(graph()->start());
@@ -155,7 +162,7 @@ TEST_F(LoadEliminationTest, StoreFieldAndLoadField) {
kNoWriteBarrier};
StrictMock<MockAdvancedReducerEditor> editor;
- LoadElimination load_elimination(&editor, zone());
+ LoadElimination load_elimination(&editor, jsgraph(), zone());
load_elimination.Reduce(graph()->start());
@@ -185,7 +192,7 @@ TEST_F(LoadEliminationTest, StoreFieldAndStoreElementAndLoadField) {
kNoWriteBarrier};
StrictMock<MockAdvancedReducerEditor> editor;
- LoadElimination load_elimination(&editor, zone());
+ LoadElimination load_elimination(&editor, jsgraph(), zone());
load_elimination.Reduce(graph()->start());
« no previous file with comments | « src/interface-descriptors.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698