Files
sdk/pkg/cfg/testcases/calls.dart.expect
Johnni Winther 02046380d1 [cfe][Contexts][InternalNodes] Add internal nodes for FunctionNode, FunctionExpression and FunctionDeclaration
This adds internal nodes for FunctionNode, FunctionExpression and FunctionDeclaration which require InternalVariable rather than Variable. This is in preparation for using the new variable model by default.

Change-Id: I3c29954bcaae555c20b37e6a3ba1e70d959f1559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506941
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-05-29 02:41:29 -07:00

358 lines
7.1 KiB
Plaintext

--- A.
B0 = EntryBlock()
v4 = Constant(null)
v1 = Parameter(this)
DirectCall Object.(v1)
Return(v4)
--- B.
B0 = EntryBlock()
v5 = Constant(42)
v9 = Constant(null)
v1 = Parameter(this)
v2 = Parameter(x)
DirectCall C.(v1, v2, v5)
DirectCall print(v2)
Return(v9)
--- B.superCalls
B0 = EntryBlock()
v9 = Constant(42)
v12 = Constant(null)
v1 = Parameter(this)
v2 = Parameter(arg)
DirectCall C.m1(v1, v2)
v8 = DirectCall getter C.m2(v1)
v10 = BinaryIntOp +(v8, v9)
DirectCall setter C.m3(v1, v10)
Return(v12)
--- B.m1
B0 = EntryBlock()
v4 = Constant(1)
v7 = Constant(null)
Parameter(this)
v2 = Parameter(a)
v5 = BinaryIntOp +(v2, v4)
DirectCall print(v5)
Return(v7)
--- getter B.m2
B0 = EntryBlock()
v4 = Constant(1)
v1 = Parameter(this)
v3 = InterfaceCall getter C.x(v1)
v5 = BinaryIntOp +(v3, v4)
Return(v5)
--- setter B.m3
B0 = EntryBlock()
v5 = Constant(1)
v8 = Constant(null)
v1 = Parameter(this)
v2 = Parameter(b)
v6 = BinaryIntOp +(v2, v5)
InterfaceCall setter C.y(v1, v6)
Return(v8)
--- C.
B0 = EntryBlock()
Constant(1)
v14 = Constant(null)
Constant(-1)
v1 = Parameter(this)
v2 = Parameter(x)
v3 = Parameter(y)
StoreInstanceField(C.x, v1, v2)
StoreInstanceField(C.y, v1, v3)
DirectCall Object.(v1)
Return(v14)
--- C.m1
B0 = EntryBlock()
v4 = Constant(2)
v7 = Constant(null)
Parameter(this)
v2 = Parameter(a)
v5 = BinaryIntOp +(v2, v4)
DirectCall print(v5)
Return(v7)
--- getter C.m2
B0 = EntryBlock()
v4 = Constant(2)
v1 = Parameter(this)
v3 = InterfaceCall getter C.x(v1)
v5 = BinaryIntOp +(v3, v4)
Return(v5)
--- setter C.m3
B0 = EntryBlock()
v5 = Constant(2)
v8 = Constant(null)
v1 = Parameter(this)
v2 = Parameter(b)
v6 = BinaryIntOp +(v2, v5)
InterfaceCall setter C.y(v1, v6)
Return(v8)
--- getter C.x
B0 = EntryBlock()
v1 = Parameter(this)
v3 = LoadInstanceField(C.x, v1)
Return(v3)
--- getter C.y
B0 = EntryBlock()
v1 = Parameter(this)
v3 = LoadInstanceField(C.y, v1)
Return(v3)
--- setter C.y
B0 = EntryBlock()
v6 = Constant(null)
v1 = Parameter(this)
v2 = Parameter(#value)
StoreInstanceField(C.y, v1, v2)
Return(v6)
--- D.
B0 = EntryBlock()
v4 = Constant(null)
v1 = Parameter(this)
DirectCall Object.(v1)
Return(v4)
--- M.m1
B0 = EntryBlock()
Parameter(this)
Unreachable()
--- getter M.m2
B0 = EntryBlock()
Parameter(this)
Unreachable()
--- setter M.m3
B0 = EntryBlock()
Parameter(this)
Parameter(value)
Unreachable()
--- M.abstractSuperCalls
B0 = EntryBlock()
Parameter(this)
Unreachable()
--- E.
B0 = EntryBlock()
v4 = Constant(null)
v1 = Parameter(this)
DirectCall Object.(v1)
Return(v4)
--- E.m1
B0 = EntryBlock()
v2 = Constant(null)
Parameter(this)
Return(v2)
--- getter E.m2
B0 = EntryBlock()
v2 = Constant(3)
Parameter(this)
Return(v2)
--- setter E.m3
B0 = EntryBlock()
v3 = Constant(null)
Parameter(this)
Parameter(value)
Return(v3)
--- F.
B0 = EntryBlock()
v4 = Constant(null)
v1 = Parameter(this)
DirectCall _F&E&M.(v1)
Return(v4)
--- _F&E&M.
B0 = EntryBlock()
v4 = Constant(null)
v1 = Parameter(this)
DirectCall E.(v1)
Return(v4)
--- _F&E&M.m1
B0 = EntryBlock()
v2 = Constant(null)
Parameter(this)
Return(v2)
--- getter _F&E&M.m2
B0 = EntryBlock()
v2 = Constant(2)
Parameter(this)
Return(v2)
--- setter _F&E&M.m3
B0 = EntryBlock()
v3 = Constant(null)
Parameter(this)
Parameter(value)
Return(v3)
--- _F&E&M.abstractSuperCalls
B0 = EntryBlock()
v8 = Constant(3)
v10 = Constant(null)
v1 = Parameter(this)
DirectCall E.m1(v1)
v5 = DirectCall getter E.m2(v1)
DirectCall print(v5)
DirectCall setter E.m3(v1, v8)
Return(v10)
--- instanceCalls
B0 = EntryBlock() dominates:(B20, B22, B19)
v17 = Constant(null)
v1 = Parameter(obj)
v2 = Parameter(obj2)
v3 = Parameter(a)
v4 = Parameter(b)
v5 = Parameter(c)
InterfaceCall A.foo1(v1, v3)
InterfaceCall A.foo1(v1, v3, v4)
v14 = InterfaceCall getter A.foo2(v1)
v18 = Comparison ==(v2, v17)
Branch(v18, true: B19, false: B20)
B19 = TargetBlock() idom:B0
Goto(B22)
B20 = TargetBlock() idom:B0 dominates:(B29, B31, B28)
v26 = TypeCast(v2, A, unchecked)
v27 = InterfaceCall Object.==(v1, v26)
Branch(v27, true: B28, false: B29)
B28 = TargetBlock() idom:B20
v36 = UnaryIntOp toDouble(v14)
v37 = BinaryDoubleOp +(v5, v36)
InterfaceCall setter A.foo3(v1, v37)
Goto(B31)
B29 = TargetBlock() idom:B20
Goto(B31)
B31 = JoinBlock(B29, B28) idom:B20
Goto(B22)
B22 = JoinBlock(B31, B19) idom:B0
v42 = InterfaceCall method-extractor A.foo1(v1)
DirectCall print(v42)
Return(v17)
--- staticCalls
B0 = EntryBlock() dominates:(B7, B9, B6)
v4 = Constant(0)
v12 = Constant(1)
v20 = Constant(null)
v22 = Constant(-1)
v1 = Parameter(a)
v2 = Parameter(b)
v5 = Comparison int >(v1, v4)
Branch(v5, true: B6, false: B7)
B6 = TargetBlock() idom:B0
v23 = BinaryIntOp +(v1, v22)
DirectCall staticCalls(v23, v2)
Goto(B9)
B7 = TargetBlock() idom:B0
Goto(B9)
B9 = JoinBlock(B7, B6) idom:B0
v17 = LoadStaticField(sField)
v18 = BinaryIntOp +(v17, v12)
StoreStaticField(sField, v18)
Return(v20)
--- dynamicCalls
B0 = EntryBlock()
v13 = Constant(1)
v16 = Constant(null)
v1 = Parameter(x)
v2 = Parameter(y)
v3 = Parameter(z)
DynamicCall foo1(v1, v2, v3)
v9 = DynamicCall get bar(v2)
v14 = DynamicCall +(v9, v13)
DynamicCall set baz(v3, v14)
Return(v16)
--- closureCalls
B0 = EntryBlock()
v4 = Constant(1)
v5 = Constant("a")
v7 = Constant(<int>)
v9 = Constant(2)
v10 = Constant("b")
v15 = Constant(42)
v19 = Constant(<String>)
v21 = Constant("abc")
v25 = Constant(null)
v1 = Parameter(func1)
v2 = Parameter(func2)
DynamicCall call(v1, v4, v5)
ClosureCall(v7, v2, v9, v10)
v12 = AllocateClosure()
DirectCall closure FunctionDeclaration(void func3(int x) => print(x);) at closureCalls(v12, v15)
v17 = AllocateClosure()
DirectCall closure FunctionDeclaration(void func4<T extends Object?>(T% x) => print(x);) at closureCalls(v19, v17, v21)
v23 = AllocateClosure()
DirectCall closure FunctionExpression(Null () {
print("hey");
}) at closureCalls(v23)
Return(v25)
--- closure FunctionDeclaration(void func3(int x) => print(x);) at closureCalls
B0 = EntryBlock()
Parameter(#closure)
v2 = Parameter(x)
v4 = DirectCall print(v2)
Return(v4)
--- closure FunctionDeclaration(void func4<T extends Object?>(T% x) => print(x);) at closureCalls
B0 = EntryBlock()
v1 = Parameter(#functionTypeParameters)
Parameter(#closure)
v3 = Parameter(x)
TypeParameters(v1)
v7 = DirectCall print(v3)
Return(v7)
--- closure FunctionExpression(Null () {
print("hey");
}) at closureCalls
B0 = EntryBlock()
v2 = Constant("hey")
v4 = Constant(null)
Parameter(#closure)
DirectCall print(v2)
Return(v4)
--- objectAllocation
B0 = EntryBlock()
v13 = Constant(null)
v1 = Parameter(a)
v2 = AllocateObject B()
DirectCall B.(v2, v1)
v8 = InterfaceCall getter C.y(v2)
v10 = InterfaceCall getter C.x(v2)
v11 = BinaryIntOp +(v8, v10)
InterfaceCall setter C.y(v2, v11)
Return(v13)
--- main
B0 = EntryBlock()
v1 = Constant(null)
Return(v1)
--- field-init sField
B0 = EntryBlock()
v1 = Constant(42)
Return(v1)