Add test for bailouts skipping compilation

This commit is contained in:
Sathya Gunasekaran
2023-11-09 12:00:37 +00:00
parent 69eb9ccccc
commit bd3661020e
4 changed files with 101 additions and 0 deletions
@@ -0,0 +1,39 @@
## Input
```javascript
// @gating @panicThreshold(NONE) @compilationMode(annotation)
let someGlobal = "joe";
function Component() {
"use forget";
someGlobal = "wat";
return null;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
};
```
## Code
```javascript
// @gating @panicThreshold(NONE) @compilationMode(annotation)
let someGlobal = "joe";
function Component() {
"use forget";
someGlobal = "wat";
return null;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
};
```
@@ -0,0 +1,13 @@
// @gating @panicThreshold(NONE) @compilationMode(annotation)
let someGlobal = "joe";
function Component() {
"use forget";
someGlobal = "wat";
return null;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
};
@@ -0,0 +1,37 @@
## Input
```javascript
// @gating @panicThreshold(NONE) @compilationMode(infer)
let someGlobal = "joe";
function Component() {
someGlobal = "wat";
return <div>{someGlobal}</div>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
};
```
## Code
```javascript
// @gating @panicThreshold(NONE) @compilationMode(infer)
let someGlobal = "joe";
function Component() {
someGlobal = "wat";
return <div>{someGlobal}</div>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
};
```
@@ -0,0 +1,12 @@
// @gating @panicThreshold(NONE) @compilationMode(infer)
let someGlobal = "joe";
function Component() {
someGlobal = "wat";
return <div>{someGlobal}</div>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
};