Skip to content

Commit

Permalink
Automate some lit test generation
Browse files Browse the repository at this point in the history
Summary:
Several of the Lit tests Hermes has effectively validate the compiler IR and/or bytecode exactly. Updating these tests requires manually comparing the compiler's output for change validation, then updating the lit tests themselves with parts of the new expected output.

This diff adds tooling for auto-generating the expectations for those tests. This accomplished by using a new script that processes the test files themselves, stripping the old expectations, and then adding the new ones (directly from the compiler output).

In order to facilitate updating the tests, a new lit substitution, ```%FileCheckOrRegen``` is introduced to hermes' lit tests. When these tests break, the new substitution should be updated to use the newly added ```utils/lit-expect-gen/generate.py``` script, and then the lit tests should be rerun (which causes them to be updated), and the updated tests should be manually inspected for the changes they introduce.

The fact that the expectations for these tests can be auto-generated does not mean the tests should be updated without proper code review. In fact, these tests exist to ensure a particular "shape" in the codegen, and thus changes need to be understood.

Reviewed By: fbmal7

Differential Revision: D38494469

fbshipit-source-id: a1659470bdb352f8d8a500d9d34495a8d3054296
  • Loading branch information
jpporto authored and facebook-github-bot committed Sep 8, 2022
1 parent b786236 commit 0307e25
Show file tree
Hide file tree
Showing 163 changed files with 13,548 additions and 9,308 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ if(HERMES_ENABLE_TEST_SUITE)
use_flowparser=${HERMES_USE_FLOWPARSER}
hbc_deltaprep=${HERMES_TOOLS_OUTPUT_DIR}/hbc-deltaprep
dependency_extractor=${HERMES_TOOLS_OUTPUT_DIR}/dependency-extractor
FileCheck=${HERMES_TOOLS_OUTPUT_DIR}//FileCheck
FileCheck=${HERMES_TOOLS_OUTPUT_DIR}/FileCheck
FileCheckOrRegen=${HERMES_TOOLS_OUTPUT_DIR}/FileCheck
hermes=${HERMES_TOOLS_OUTPUT_DIR}/hermes
hermesc=${HERMES_TOOLS_OUTPUT_DIR}/hermesc
hdb=${HERMES_TOOLS_OUTPUT_DIR}/hdb
Expand Down
157 changes: 91 additions & 66 deletions test/BCGen/HBC/arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,92 +5,117 @@
* LICENSE file in the root directory of this source tree.
*/

// RUN: %hermes -target=HBC -dump-ra -O %s | %FileCheck --match-full-lines %s
// RUN: %hermes -target=HBC -dump-ra -O %s | %FileCheckOrRegen --match-full-lines %s

//CHECK-LABEL:function count()
//CHECK-NEXT:frame = []
//CHECK-NEXT:%BB0:
//CHECK-NEXT: {{.*}} %0 = AllocStackInst $arguments
//CHECK-NEXT: {{.*}} %1 = HBCLoadConstInst undefined : undefined
//CHECK-NEXT: {{.*}} %2 = StoreStackInst %1 : undefined, %0
//CHECK-NEXT: {{.*}} %3 = HBCGetArgumentsLengthInst %0
//CHECK-NEXT: {{.*}} %4 = ReturnInst %3
//CHECK-NEXT:function_end
function count() {
return arguments.length;
}

//CHECK-LABEL:function select(x)
//CHECK-NEXT:frame = []
//CHECK-NEXT:%BB0:
//CHECK-NEXT: {{.*}} %0 = AllocStackInst $arguments
//CHECK-NEXT: {{.*}} %1 = HBCLoadConstInst undefined : undefined
//CHECK-NEXT: {{.*}} %2 = StoreStackInst %1 : undefined, %0
//CHECK-NEXT: {{.*}} %3 = HBCLoadParamInst 1 : number
//CHECK-NEXT: {{.*}} %4 = HBCLoadConstInst 1 : number
//CHECK-NEXT: {{.*}} %5 = BinaryOperatorInst '+', %3, %4 : number
//CHECK-NEXT: {{.*}} %6 = HBCGetArgumentsPropByValInst %5 : string|number, %0
//CHECK-NEXT: {{.*}} %7 = ReturnInst %6
//CHECK-NEXT:function_end
function select(x) {
return arguments[x+1];
}

//CHECK-LABEL:function build() : object
//CHECK-NEXT:frame = []
//CHECK-NEXT:%BB0:
//CHECK-NEXT: {{.*}} %0 = AllocStackInst $arguments
//CHECK-NEXT: {{.*}} %1 = HBCLoadConstInst undefined : undefined
//CHECK-NEXT: {{.*}} %2 = StoreStackInst %1 : undefined, %0
//CHECK-NEXT: {{.*}} %3 = HBCReifyArgumentsInst %0
//CHECK-NEXT: {{.*}} %4 = LoadStackInst %0
//CHECK-NEXT: {{.*}} %5 = ReturnInst %4
//CHECK-NEXT:function_end
function build() {
return arguments;
}


//CHECK-LABEL:function buffalobuffalo() : string|number
//CHECK-NEXT:frame = []
//CHECK-NEXT:%BB0:
//CHECK-NEXT: $Reg0 @0 [1...5) %0 = AllocStackInst $arguments
//CHECK-NEXT: $Reg1 @1 [2...3) %1 = HBCLoadConstInst undefined : undefined
//CHECK-NEXT: $Reg1 @2 [empty] %2 = StoreStackInst %1 : undefined, %0
//CHECK-NEXT: $Reg1 @3 [empty] %3 = HBCReifyArgumentsInst %0
//CHECK-NEXT: $Reg0 @4 [5...6) %4 = LoadStackInst %0
//CHECK-NEXT: $Reg0 @5 [6...7) %5 = BinaryOperatorInst '+', %4, %4
//CHECK-NEXT: $Reg0 @6 [empty] %6 = ReturnInst %5 : string|number
//CHECK-NEXT:function_end
function buffalobuffalo() {
if(arguments) {
return arguments + arguments;
}
return arguments;
}

//CHECK-LABEL:function check_phi_handling(x) : object
//CHECK-NEXT:frame = []
//CHECK-NEXT:%BB0:
//CHECK-NEXT: {{.*}} %0 = AllocStackInst $arguments
//CHECK-NEXT: {{.*}} %1 = HBCLoadConstInst undefined : undefined
//CHECK-NEXT: {{.*}} %2 = StoreStackInst %1 : undefined, %0
//CHECK-NEXT: {{.*}} %3 = HBCLoadParamInst 1 : number
//CHECK-NEXT: {{.*}} %4 = CondBranchInst %3, %BB1, %BB2
//CHECK-NEXT:%BB1:
//CHECK-NEXT: {{.*}} %5 = AllocArrayInst 1 : number, 1 : number
//CHECK-NEXT: {{.*}} %6 = MovInst %5 : object
//CHECK-NEXT: {{.*}} %7 = BranchInst %BB3
//CHECK-NEXT:%BB3:
//CHECK-NEXT: {{.*}} %8 = PhiInst %6 : object, %BB1, %13, %BB2
//CHECK-NEXT: {{.*}} %9 = MovInst %8 : object
//CHECK-NEXT: {{.*}} %10 = ReturnInst %9 : object
//CHECK-NEXT:%BB2:
//CHECK-NEXT: {{.*}} %11 = HBCReifyArgumentsInst %0
//CHECK-NEXT: {{.*}} %12 = LoadStackInst %0
//CHECK-NEXT: {{.*}} %13 = MovInst %12
//CHECK-NEXT: {{.*}} %14 = BranchInst %BB3
//CHECK-NEXT:function_end
function check_phi_handling(x) {
return x ? [1] : arguments;
}

// Auto-generated content below. Please do not modify manually.

// CHECK:function global() : undefined
// CHECK-NEXT:frame = [], globals = [count, select, build, buffalobuffalo, check_phi_handling]
// CHECK-NEXT:%BB0:
// CHECK-NEXT: $Reg0 @0 [1...11) %0 = HBCCreateEnvironmentInst
// CHECK-NEXT: $Reg2 @1 [2...4) %1 = HBCCreateFunctionInst %count(), %0
// CHECK-NEXT: $Reg1 @2 [3...12) %2 = HBCGetGlobalObjectInst
// CHECK-NEXT: $Reg2 @3 [empty] %3 = StorePropertyInst %1 : closure, %2 : object, "count" : string
// CHECK-NEXT: $Reg2 @4 [5...6) %4 = HBCCreateFunctionInst %select(), %0
// CHECK-NEXT: $Reg2 @5 [empty] %5 = StorePropertyInst %4 : closure, %2 : object, "select" : string
// CHECK-NEXT: $Reg2 @6 [7...8) %6 = HBCCreateFunctionInst %build() : object, %0
// CHECK-NEXT: $Reg2 @7 [empty] %7 = StorePropertyInst %6 : closure, %2 : object, "build" : string
// CHECK-NEXT: $Reg2 @8 [9...10) %8 = HBCCreateFunctionInst %buffalobuffalo() : string|number, %0
// CHECK-NEXT: $Reg2 @9 [empty] %9 = StorePropertyInst %8 : closure, %2 : object, "buffalobuffalo" : string
// CHECK-NEXT: $Reg0 @10 [11...12) %10 = HBCCreateFunctionInst %check_phi_handling() : object, %0
// CHECK-NEXT: $Reg0 @11 [empty] %11 = StorePropertyInst %10 : closure, %2 : object, "check_phi_handling" : string
// CHECK-NEXT: $Reg0 @12 [13...14) %12 = HBCLoadConstInst undefined : undefined
// CHECK-NEXT: $Reg0 @13 [empty] %13 = ReturnInst %12 : undefined
// CHECK-NEXT:function_end

// CHECK:function count()
// CHECK-NEXT:frame = []
// CHECK-NEXT:%BB0:
// CHECK-NEXT: $Reg0 @0 [1...4) %0 = AllocStackInst $arguments
// CHECK-NEXT: $Reg1 @1 [2...3) %1 = HBCLoadConstInst undefined : undefined
// CHECK-NEXT: $Reg1 @2 [empty] %2 = StoreStackInst %1 : undefined, %0
// CHECK-NEXT: $Reg0 @3 [4...5) %3 = HBCGetArgumentsLengthInst %0
// CHECK-NEXT: $Reg0 @4 [empty] %4 = ReturnInst %3
// CHECK-NEXT:function_end

// CHECK:function select(x)
// CHECK-NEXT:frame = []
// CHECK-NEXT:%BB0:
// CHECK-NEXT: $Reg1 @0 [1...7) %0 = AllocStackInst $arguments
// CHECK-NEXT: $Reg0 @1 [2...3) %1 = HBCLoadConstInst undefined : undefined
// CHECK-NEXT: $Reg0 @2 [empty] %2 = StoreStackInst %1 : undefined, %0
// CHECK-NEXT: $Reg2 @3 [4...6) %3 = HBCLoadParamInst 1 : number
// CHECK-NEXT: $Reg0 @4 [5...6) %4 = HBCLoadConstInst 1 : number
// CHECK-NEXT: $Reg0 @5 [6...7) %5 = BinaryOperatorInst '+', %3, %4 : number
// CHECK-NEXT: $Reg0 @6 [7...8) %6 = HBCGetArgumentsPropByValInst %5 : string|number, %0
// CHECK-NEXT: $Reg0 @7 [empty] %7 = ReturnInst %6
// CHECK-NEXT:function_end

// CHECK:function build() : object
// CHECK-NEXT:frame = []
// CHECK-NEXT:%BB0:
// CHECK-NEXT: $Reg0 @0 [1...5) %0 = AllocStackInst $arguments
// CHECK-NEXT: $Reg1 @1 [2...3) %1 = HBCLoadConstInst undefined : undefined
// CHECK-NEXT: $Reg1 @2 [empty] %2 = StoreStackInst %1 : undefined, %0
// CHECK-NEXT: $Reg1 @3 [empty] %3 = HBCReifyArgumentsInst %0
// CHECK-NEXT: $Reg0 @4 [5...6) %4 = LoadStackInst %0
// CHECK-NEXT: $Reg0 @5 [empty] %5 = ReturnInst %4
// CHECK-NEXT:function_end

// CHECK:function buffalobuffalo() : string|number
// CHECK-NEXT:frame = []
// CHECK-NEXT:%BB0:
// CHECK-NEXT: $Reg0 @0 [1...5) %0 = AllocStackInst $arguments
// CHECK-NEXT: $Reg1 @1 [2...3) %1 = HBCLoadConstInst undefined : undefined
// CHECK-NEXT: $Reg1 @2 [empty] %2 = StoreStackInst %1 : undefined, %0
// CHECK-NEXT: $Reg1 @3 [empty] %3 = HBCReifyArgumentsInst %0
// CHECK-NEXT: $Reg0 @4 [5...6) %4 = LoadStackInst %0
// CHECK-NEXT: $Reg0 @5 [6...7) %5 = BinaryOperatorInst '+', %4, %4
// CHECK-NEXT: $Reg0 @6 [empty] %6 = ReturnInst %5 : string|number
// CHECK-NEXT:function_end

// CHECK:function check_phi_handling(x) : object
// CHECK-NEXT:frame = []
// CHECK-NEXT:%BB0:
// CHECK-NEXT: $Reg0 @0 [1...7) %0 = AllocStackInst $arguments
// CHECK-NEXT: $Reg1 @1 [2...3) %1 = HBCLoadConstInst undefined : undefined
// CHECK-NEXT: $Reg1 @2 [empty] %2 = StoreStackInst %1 : undefined, %0
// CHECK-NEXT: $Reg1 @3 [4...5) %3 = HBCLoadParamInst 1 : number
// CHECK-NEXT: $Reg1 @4 [empty] %4 = CondBranchInst %3, %BB1, %BB2
// CHECK-NEXT:%BB1:
// CHECK-NEXT: $Reg1 @9 [10...11) %5 = AllocArrayInst 1 : number, 1 : number
// CHECK-NEXT: $Reg0 @10 [11...13) %6 = MovInst %5 : object
// CHECK-NEXT: $Reg1 @11 [empty] %7 = BranchInst %BB3
// CHECK-NEXT:%BB3:
// CHECK-NEXT: $Reg0 @12 [7...14) %8 = PhiInst %6 : object, %BB1, %13, %BB2
// CHECK-NEXT: $Reg0 @13 [7...15) %9 = MovInst %8 : object
// CHECK-NEXT: $Reg0 @14 [empty] %10 = ReturnInst %9 : object
// CHECK-NEXT:%BB2:
// CHECK-NEXT: $Reg1 @5 [empty] %11 = HBCReifyArgumentsInst %0
// CHECK-NEXT: $Reg0 @6 [7...8) %12 = LoadStackInst %0
// CHECK-NEXT: $Reg0 @7 [8...13) %13 = MovInst %12
// CHECK-NEXT: $Reg1 @8 [empty] %14 = BranchInst %BB3
// CHECK-NEXT:function_end
133 changes: 108 additions & 25 deletions test/BCGen/HBC/async-function.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,78 @@
* LICENSE file in the root directory of this source tree.
*/

// RUN: %hermesc -O0 -dump-bytecode %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-bytecode %s | %FileCheckOrRegen %s --match-full-lines

async function simpleReturn() {
return 1;
}

// CHECK-LABEL:NCFunction<simpleReturn>(1 params, 19 registers, 0 symbols):
// CHECK-NEXT:Offset in debug table: source 0x{{.*}}, lexical 0x0000
async function simpleAwait() {
var x = await 2;
return x;
}

var simpleAsyncFE = async function () {
var x = await 2;
return x;
}

// Auto-generated content below. Please do not modify manually.

// CHECK:Bytecode File Information:
// CHECK-NEXT: Bytecode version number: 89
// CHECK-NEXT: Source hash: 0000000000000000000000000000000000000000
// CHECK-NEXT: Function count: 10
// CHECK-NEXT: String count: 11
// CHECK-NEXT: BigInt count: 0
// CHECK-NEXT: String Kind Entry count: 2
// CHECK-NEXT: RegExp count: 0
// CHECK-NEXT: Segment ID: 0
// CHECK-NEXT: CommonJS module count: 0
// CHECK-NEXT: CommonJS module count (static): 0
// CHECK-NEXT: Function source count: 3
// CHECK-NEXT: Bytecode options:
// CHECK-NEXT: staticBuiltins: 0
// CHECK-NEXT: cjsModulesStaticallyResolved: 0

// CHECK:Global String Table:
// CHECK-NEXT:s0[ASCII, 0..-1]:
// CHECK-NEXT:s1[ASCII, 0..28]: ?anon_0_?anon_0_simpleAsyncFE
// CHECK-NEXT:s2[ASCII, 29..55]: ?anon_0_?anon_0_simpleAwait
// CHECK-NEXT:s3[ASCII, 56..83]: ?anon_0_?anon_0_simpleReturn
// CHECK-NEXT:s4[ASCII, 84..104]: ?anon_0_simpleAsyncFE
// CHECK-NEXT:s5[ASCII, 105..123]: ?anon_0_simpleAwait
// CHECK-NEXT:s6[ASCII, 124..143]: ?anon_0_simpleReturn
// CHECK-NEXT:s7[ASCII, 144..149]: global
// CHECK-NEXT:i8[ASCII, 150..162] #4CCB9499: simpleAsyncFE
// CHECK-NEXT:i9[ASCII, 163..173] #FD482E4F: simpleAwait
// CHECK-NEXT:i10[ASCII, 174..185] #EB416734: simpleReturn

// CHECK:Function Source Table:
// CHECK-NEXT: Function ID 3 -> s0
// CHECK-NEXT: Function ID 6 -> s0
// CHECK-NEXT: Function ID 9 -> s0

// CHECK:Function<global>(1 params, 9 registers, 0 symbols):
// CHECK-NEXT:Offset in debug table: source 0x0000, lexical 0x0000
// CHECK-NEXT: DeclareGlobalVar "simpleAsyncFE"
// CHECK-NEXT: DeclareGlobalVar "simpleReturn"
// CHECK-NEXT: DeclareGlobalVar "simpleAwait"
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: GetGlobalObject r1
// CHECK-NEXT: LoadConstUndefined r2
// CHECK-NEXT: CreateAsyncClosure r3, r0, NCFunction<simpleReturn>
// CHECK-NEXT: PutById r1, r3, 1, "simpleReturn"
// CHECK-NEXT: CreateAsyncClosure r4, r0, NCFunction<simpleAwait>
// CHECK-NEXT: PutById r1, r4, 2, "simpleAwait"
// CHECK-NEXT: Mov r5, r2
// CHECK-NEXT: CreateAsyncClosure r6, r0, NCFunction<simpleAsyncFE>
// CHECK-NEXT: PutById r1, r6, 3, "simpleAsyncFE"
// CHECK-NEXT: Mov r7, r5
// CHECK-NEXT: Ret r7

// CHECK:NCFunction<simpleReturn>(1 params, 19 registers, 0 symbols):
// CHECK-NEXT:Offset in debug table: source 0x000d, lexical 0x0000
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadThisNS r1
// CHECK-NEXT: LoadConstUndefined r2
Expand All @@ -28,12 +92,12 @@ async function simpleReturn() {
// CHECK-NEXT: Call r7, r5, 4
// CHECK-NEXT: Ret r7

// CHECK-LABEL:NCFunction<?anon_0_simpleReturn>(1 params, 3 registers, 0 symbols):
// CHECK:NCFunction<?anon_0_simpleReturn>(1 params, 3 registers, 0 symbols):
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: CreateGenerator r1, r0, Function<?anon_0_?anon_0_simpleReturn>
// CHECK-NEXT: Ret r1

// CHECK-LABEL:Function<?anon_0_?anon_0_simpleReturn>(1 params, 6 registers, 0 symbols):
// CHECK:Function<?anon_0_?anon_0_simpleReturn>(1 params, 6 registers, 0 symbols):
// CHECK-NEXT: StartGenerator
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadConstUInt8 r0, 1
Expand All @@ -47,13 +111,8 @@ async function simpleReturn() {
// CHECK-NEXT: CompleteGenerator
// CHECK-NEXT: Ret r3

async function simpleAwait() {
var x = await 2;
return x;
}

// CHECK-LABEL:NCFunction<simpleAwait>(1 params, 19 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x{{.*}}, lexical 0x0000
// CHECK:NCFunction<simpleAwait>(1 params, 19 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x0014, lexical 0x0000
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadThisNS r1
// CHECK-NEXT: LoadConstUndefined r2
Expand All @@ -70,15 +129,15 @@ async function simpleAwait() {
// CHECK-NEXT: Call r7, r5, 4
// CHECK-NEXT: Ret r7

// CHECK-LABEL:NCFunction<?anon_0_simpleAwait>(1 params, 4 registers, 1 symbols):
// CHECK:NCFunction<?anon_0_simpleAwait>(1 params, 4 registers, 1 symbols):
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadConstUndefined r1
// CHECK-NEXT: StoreNPToEnvironment r0, 0, r1
// CHECK-NEXT: CreateGenerator r2, r0, Function<?anon_0_?anon_0_simpleAwait>
// CHECK-NEXT: Ret r2

// CHECK-LABEL:Function<?anon_0_?anon_0_simpleAwait>(1 params, 8 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x{{.*}}, lexical 0x0000
// CHECK:Function<?anon_0_?anon_0_simpleAwait>(1 params, 8 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x001b, lexical 0x0000
// CHECK-NEXT: StartGenerator
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadConstUndefined r1
Expand All @@ -104,13 +163,8 @@ async function simpleAwait() {
// CHECK-NEXT: CompleteGenerator
// CHECK-NEXT: Ret r4

var simpleAsyncFE = async function () {
var x = await 2;
return x;
}

// CHECK-LABEL:NCFunction<simpleAsyncFE>(1 params, 19 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x{{.*}}, lexical 0x0000
// CHECK:NCFunction<simpleAsyncFE>(1 params, 19 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x0025, lexical 0x0000
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadThisNS r1
// CHECK-NEXT: LoadConstUndefined r2
Expand All @@ -127,15 +181,15 @@ var simpleAsyncFE = async function () {
// CHECK-NEXT: Call r7, r5, 4
// CHECK-NEXT: Ret r7

// CHECK-LABEL:NCFunction<?anon_0_simpleAsyncFE>(1 params, 4 registers, 1 symbols):
// CHECK:NCFunction<?anon_0_simpleAsyncFE>(1 params, 4 registers, 1 symbols):
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadConstUndefined r1
// CHECK-NEXT: StoreNPToEnvironment r0, 0, r1
// CHECK-NEXT: CreateGenerator r2, r0, Function<?anon_0_?anon_0_simpleAsyncFE>
// CHECK-NEXT: Ret r2

// CHECK-LABEL:Function<?anon_0_?anon_0_simpleAsyncFE>(1 params, 8 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x{{.*}}, lexical 0x0000
// CHECK:Function<?anon_0_?anon_0_simpleAsyncFE>(1 params, 8 registers, 1 symbols):
// CHECK-NEXT:Offset in debug table: source 0x002c, lexical 0x0000
// CHECK-NEXT: StartGenerator
// CHECK-NEXT: CreateEnvironment r0
// CHECK-NEXT: LoadConstUndefined r1
Expand All @@ -160,3 +214,32 @@ var simpleAsyncFE = async function () {
// CHECK-NEXT:L1:
// CHECK-NEXT: CompleteGenerator
// CHECK-NEXT: Ret r4

// CHECK:Debug filename table:
// CHECK-NEXT: 0: {{.*}}async-function.js

// CHECK:Debug file table:
// CHECK-NEXT: source table offset 0x0000: filename id 0

// CHECK:Debug source table:
// CHECK-NEXT: 0x0000 function idx 0, starts at line 10 col 1
// CHECK-NEXT: bc 26: line 10 col 1
// CHECK-NEXT: bc 37: line 10 col 1
// CHECK-NEXT: bc 51: line 19 col 19
// CHECK-NEXT: 0x000d function idx 1, starts at line 10 col 1
// CHECK-NEXT: bc 34: line 10 col 1
// CHECK-NEXT: 0x0014 function idx 4, starts at line 14 col 1
// CHECK-NEXT: bc 38: line 14 col 1
// CHECK-NEXT: 0x001b function idx 6, starts at line 14 col 1
// CHECK-NEXT: bc 21: line 15 col 11
// CHECK-NEXT: bc 25: line 15 col 11
// CHECK-NEXT: 0x0025 function idx 7, starts at line 19 col 21
// CHECK-NEXT: bc 38: line 19 col 21
// CHECK-NEXT: 0x002c function idx 9, starts at line 19 col 21
// CHECK-NEXT: bc 21: line 20 col 11
// CHECK-NEXT: bc 25: line 20 col 11
// CHECK-NEXT: 0x0036 end of debug source table

// CHECK:Debug lexical table:
// CHECK-NEXT: 0x0000 lexical parent: none, variable count: 0
// CHECK-NEXT: 0x0002 end of debug lexical table
Loading

0 comments on commit 0307e25

Please sign in to comment.