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

Unified Diff: src/compiler/js-graph.cc

Issue 929123002: Move DeadControl into the JSGraph so that it can be reused. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/compiler/js-graph.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-graph.cc
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc
index 6fa7de159f070df4a1d05c0a1bac6e33e3e98cf9..649b0d68d1097c289603e206f34f10a623be2f2a 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -191,6 +191,15 @@ Node* JSGraph::Float64Constant(double value) {
}
+Node* JSGraph::ExternalConstant(ExternalReference reference) {
+ Node** loc = cache_.FindExternalConstant(reference);
+ if (*loc == NULL) {
+ *loc = graph()->NewNode(common()->ExternalConstant(reference));
+ }
+ return *loc;
+}
+
+
Node* JSGraph::EmptyFrameState() {
if (!empty_frame_state_.is_set()) {
Node* values = graph()->NewNode(common()->StateValues(0));
@@ -204,12 +213,12 @@ Node* JSGraph::EmptyFrameState() {
}
-Node* JSGraph::ExternalConstant(ExternalReference reference) {
- Node** loc = cache_.FindExternalConstant(reference);
- if (*loc == NULL) {
- *loc = graph()->NewNode(common()->ExternalConstant(reference));
+Node* JSGraph::DeadControl() {
+ if (!dead_control_.is_set()) {
+ Node* dead_node = graph()->NewNode(common()->Dead());
+ dead_control_.set(dead_node);
}
- return *loc;
+ return dead_control_.get();
}
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698