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

Unified Diff: src/compiler/control-builders.h

Issue 2140673007: [turbofan] Introduce explicit loop exits markers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 4 years, 5 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
Index: src/compiler/control-builders.h
diff --git a/src/compiler/control-builders.h b/src/compiler/control-builders.h
index 6ff00be59614378dd8be96943bbe77ba5e35479d..a59dcb699ae24267a842fdcb8b11a518515b8fd3 100644
--- a/src/compiler/control-builders.h
+++ b/src/compiler/control-builders.h
@@ -63,7 +63,8 @@ class LoopBuilder final : public ControlBuilder {
: ControlBuilder(builder),
loop_environment_(nullptr),
continue_environment_(nullptr),
- break_environment_(nullptr) {}
+ break_environment_(nullptr),
+ assigned_(nullptr) {}
// Primitive control commands.
void BeginLoop(BitVector* assigned, bool is_osr = false);
@@ -74,6 +75,10 @@ class LoopBuilder final : public ControlBuilder {
// Primitive support for break.
void Break() final;
+ // Loop exit support. Used to introduce explicit loop exit control
+ // node and variable markers.
+ void ExitLoop(Node** extra_value_to_rename = nullptr);
+
// Compound control commands for conditional break.
void BreakUnless(Node* condition);
void BreakWhen(Node* condition);
@@ -82,6 +87,7 @@ class LoopBuilder final : public ControlBuilder {
Environment* loop_environment_; // Environment of the loop header.
Environment* continue_environment_; // Environment after the loop body.
Environment* break_environment_; // Environment after the loop exits.
+ BitVector* assigned_; // Assigned values in the environment.
};

Powered by Google App Engine
This is Rietveld 408576698