-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[be][tests] Remove all hir-tests (cleanup for ObjectShape stack)
--- +10 −1,698 lines [[insert impacc macro]] The ObjectShape stacks (#1350, #1358) used these tests to record changes in inferred types (and associated ObjectShapes), reference effects, and mutable ranges. Now that those PRs have landed, we can delete these tests. They are somewhat fragile (changing anytime HIR / printHIR is changed) and easily cause rebase/merge conflicts.
- Loading branch information
Showing
38 changed files
with
318 additions
and
823 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...ts__/fixtures/compiler/ssa-renaming-ternary-destruction-with-mutation.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
const _ = props.cond | ||
? (({ x } = { x: {} }), ([x] = [[]]), x.push(props.foo)) | ||
: null; | ||
console.log(_); | ||
mut(x); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(2); | ||
const c_0 = $[0] !== props; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
const _ = props.cond ? (([x] = [[]]), x.push(props.foo)) : null; | ||
|
||
console.log(_); | ||
mut(x); | ||
$[0] = props; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
46 changes: 46 additions & 0 deletions
46
...rget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
const _ = props.cond | ||
? (({ x } = { x: {} }), ([x] = [[]]), x.push(props.foo)) | ||
: null; | ||
console.log(_); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(4); | ||
const c_0 = $[0] !== props.bar; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
$[0] = props.bar; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
const c_2 = $[2] !== props; | ||
if (c_2) { | ||
const _ = props.cond ? (([x] = [[]]), x.push(props.foo)) : null; | ||
|
||
console.log(_); | ||
$[2] = props; | ||
$[3] = x; | ||
} else { | ||
x = $[3]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
...et/src/__tests__/fixtures/compiler/ssa-renaming-ternary-with-mutation.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
const _ = props.cond ? ((x = {}), (x = []), x.push(props.foo)) : null; | ||
console.log(_); | ||
mut(x); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(2); | ||
const c_0 = $[0] !== props; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
const _ = props.cond ? ((x = []), x.push(props.foo)) : null; | ||
console.log(_); | ||
mut(x); | ||
$[0] = props; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
43 changes: 43 additions & 0 deletions
43
compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
const _ = props.cond ? ((x = {}), (x = []), x.push(props.foo)) : null; | ||
console.log(_); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(4); | ||
const c_0 = $[0] !== props.bar; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
$[0] = props.bar; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
const c_2 = $[2] !== props; | ||
if (c_2) { | ||
const _ = props.cond ? ((x = []), x.push(props.foo)) : null; | ||
console.log(_); | ||
$[2] = props; | ||
$[3] = x; | ||
} else { | ||
x = $[3]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
...__/fixtures/compiler/ssa-renaming-unconditional-ternary-with-mutation.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
const _ = props.cond | ||
? ((x = {}), (x = []), x.push(props.foo)) | ||
: ((x = []), (x = []), x.push(props.bar)); | ||
console.log(_); | ||
mut(x); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(2); | ||
const c_0 = $[0] !== props; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
const _ = props.cond | ||
? ((x = []), x.push(props.foo)) | ||
: ((x = []), x.push(props.bar)); | ||
console.log(_); | ||
mut(x); | ||
$[0] = props; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
47 changes: 47 additions & 0 deletions
47
...et/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
const _ = props.cond | ||
? ((x = {}), (x = []), x.push(props.foo)) | ||
: ((x = []), (x = []), x.push(props.bar)); | ||
console.log(_); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(4); | ||
const c_0 = $[0] !== props.bar; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
$[0] = props.bar; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
const c_2 = $[2] !== props; | ||
if (c_2) { | ||
const _ = props.cond | ||
? ((x = []), x.push(props.foo)) | ||
: ((x = []), x.push(props.bar)); | ||
console.log(_); | ||
$[2] = props; | ||
$[3] = x; | ||
} else { | ||
x = $[3]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
51 changes: 51 additions & 0 deletions
51
.../__tests__/fixtures/compiler/ssa-renaming-unconditional-with-mutation.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
## Input | ||
|
||
```javascript | ||
function foo(props) { | ||
let x = []; | ||
x.push(props.bar); | ||
if (props.cond) { | ||
x = {}; | ||
x = []; | ||
x.push(props.foo); | ||
} else { | ||
x = []; | ||
x = []; | ||
x.push(props.bar); | ||
} | ||
mut(x); | ||
return x; | ||
} | ||
|
||
``` | ||
|
||
## Code | ||
|
||
```javascript | ||
function foo(props) { | ||
const $ = React.unstable_useMemoCache(2); | ||
const c_0 = $[0] !== props; | ||
let x; | ||
if (c_0) { | ||
x = []; | ||
x.push(props.bar); | ||
if (props.cond) { | ||
x = []; | ||
x.push(props.foo); | ||
} else { | ||
x = []; | ||
x.push(props.bar); | ||
} | ||
|
||
mut(x); | ||
$[0] = props; | ||
$[1] = x; | ||
} else { | ||
x = $[1]; | ||
} | ||
return x; | ||
} | ||
|
||
``` | ||
File renamed without changes.
47 changes: 0 additions & 47 deletions
47
compiler/forget/src/__tests__/fixtures/hir/array-at-closure.expect.md
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
compiler/forget/src/__tests__/fixtures/hir/array-at-closure.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.