aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/Relooper.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-14 15:20:21 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-14 15:58:06 -0700
commit5c723d474e475707fe994e18d4e59269ce1c1981 (patch)
tree91a96f85caeed43afd8e8064cbf65ed8c2f57a3c /lib/Target/JSBackend/Relooper.h
parent3ce045ce8e1892b75f887459dae1911c20f52b76 (diff)
update relooper; 1.13.21.13.2
Diffstat (limited to 'lib/Target/JSBackend/Relooper.h')
-rw-r--r--lib/Target/JSBackend/Relooper.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/JSBackend/Relooper.h b/lib/Target/JSBackend/Relooper.h
index 85adf359c2..152bae0e6e 100644
--- a/lib/Target/JSBackend/Relooper.h
+++ b/lib/Target/JSBackend/Relooper.h
@@ -24,9 +24,11 @@ struct Shape;
// Info about a branching from one block to another
struct Branch {
enum FlowType {
- Direct = 0, // We will directly reach the right location through other means, no need for continue or break
+ Direct = 0, // We will directly reach the right location through other means, no need for continue or break
Break = 1,
- Continue = 2
+ Continue = 2,
+ Nested = 3 // This code is directly reached, but we must be careful to ensure it is nested in an if - it is not reached
+ // unconditionally, other code paths exist alongside it that we need to make sure do not intertwine
};
Shape *Ancestor; // If not NULL, this shape is the relevant one for purposes of getting to the target block. We break or continue on it
Branch::FlowType Type; // If Ancestor is not NULL, this says whether to break or continue
@@ -59,7 +61,7 @@ struct Block {
Shape *Parent; // The shape we are directly inside
int Id; // A unique identifier, defined when added to relooper. Note that this uniquely identifies a *logical* block - if we split it, the two instances have the same content *and* the same Id
const char *Code; // The string representation of the code in this block. Owning pointer (we copy the input)
- const char *BranchVar; // If we have more than one branch out, the variable whose value determines where we go
+ const char *BranchVar; // A variable whose value determines where we go; if this is not NULL, emit a switch on that variable
bool IsCheckedMultipleEntry; // If true, we are a multiple entry, so reaching us requires setting the label variable
Block(const char *CodeInit, const char *BranchVarInit);