Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 382d61f

Browse files
WIP inlining calls not supported yet
1 parent 07675f6 commit 382d61f

File tree

1 file changed

+5
-1
lines changed
  • seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/nodes

1 file changed

+5
-1
lines changed

‎seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/nodes/CallEndNode.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public class CallEndNode extends CFGNode implements MultiNode {
1818
private boolean _folding;
1919
public final TypeRPC _rpc;
2020

21+
public static final boolean ALLOW_INLINING_CALLS = false; // FIXME this is pending
22+
2123
public CallEndNode(CallNode call) { super(new Node[]{call}); _rpc = TypeRPC.constant(_nid); }
2224
public CallEndNode(CallEndNode cend) { super(cend); _rpc = cend._rpc; }
2325

@@ -63,7 +65,9 @@ public Node idealize() {
6365

6466
// Trivial inlining: call site calls a single function; single function
6567
// is only called by this call site.
66-
if( !_folding && nIns()==2 && in(0) instanceof CallNode call ) {
68+
// EZ Lang - we do not support inlining calls yet
69+
// EZ Lang - possibly requires updating the type dict to say inlined function is dead
70+
if( ALLOW_INLINING_CALLS && !_folding && nIns()==2 && in(0) instanceof CallNode call ) {
6771
Node fptr = call.fptr();
6872
if( fptr.nOuts() == 1 && // Only user is this call
6973
fptr instanceof ConstantNode && // We have an immediate call

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /