@samitouri / QOS-React-2 / commits / 852301828b

Remove reactive_ir crate

Joe Savona committed Apr 2, 2024 at 21:03 UTC 852301828b505c3e8489fc7faa6d2f60ce921758
5 files changed -95
compiler/Cargo.lock
-7
@@ -698,13 +698,6 @@ dependencies = [
698 "thiserror",
699 ]
700
701 -[[package]]
702 -name = "react_reactive_ir"
703 -version = "0.1.0"
704 -dependencies = [
705 - "react_hir",
706 -]
707 -
701 [[package]]
702 name = "react_semantic_analysis"
703 version = "0.1.0"
compiler/Cargo.toml
-1
@@ -21,7 +21,6 @@ react_fixtures = { path = "crates/react_fixtures" }
21 react_hermes_parser = { path = "crates/react_hermes_parser" }
22 react_hir = { path = "crates/react_hir" }
23 react_optimization = { path = "crates/react_optimization" }
24 -react_reactive_ir = { path = "crates/react_reactive_ir" }
24 react_semantic_analysis = { path = "crates/react_semantic_analysis" }
25 react_ssa = { path = "crates/react_ssa" }
26 react_utils = { path = "crates/react_utils" }
compiler/crates/react_reactive_ir/Cargo.toml deleted
-16
@@ -1,16 +0,0 @@
1 -[package]
2 -name = "react_reactive_ir"
3 -version = "0.1.0"
4 -publish = false
5 -authors.workspace = true
6 -description.workspace = true
7 -edition.workspace = true
8 -homepage.workspace = true
9 -keywords.workspace = true
10 -license.workspace = true
11 -repository.workspace = true
12 -
13 -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
14 -
15 -[dependencies]
16 -react_hir = { workspace = true }
\ No newline at end of file
compiler/crates/react_reactive_ir/README.md deleted
-6
@@ -1,6 +0,0 @@
1 -# react_reactive_ir
2 -
3 -The Reactive IR is an intermediate representation used to encode reactivity information, used for later stages of analysis focused on memoization/reactivity.
4 -
5 -Unlike HIR's "flat" control-flow-graph style representation, Reactive IR is tree-shaped. Blocks can contain HIR instructions as well as additional nested
6 -statements (used for all expressions that have control-flow semantics), and terminals such as if or for have blocks rather than pointing to them indirectly by block id.
compiler/crates/react_reactive_ir/src/lib.rs deleted
-65
@@ -1,65 +0,0 @@
1 -use react_hir::{IdentifierOperand, Instruction, InstructionId, ReactiveScope};
2 -
3 -#[derive(Debug)]
4 -pub struct ReactiveFunction {
5 - pub id: Option<String>,
6 - pub body: Block,
7 - pub params: Vec<IdentifierOperand>,
8 - pub is_async: bool,
9 - pub is_generator: bool,
10 -}
11 -
12 -#[derive(Debug)]
13 -pub struct Block {
14 - pub statements: Vec<ReactiveStatement>,
15 -}
16 -
17 -#[derive(Debug)]
18 -pub enum ReactiveStatement {
19 - Instruction(Instruction),
20 - ControlFlow(ControlFlow),
21 - ReactiveBlock(ReactiveBlock),
22 -}
23 -
24 -#[derive(Debug)]
25 -pub struct ReactiveBlock {
26 - pub scope: ReactiveScope,
27 - pub block: Block,
28 -}
29 -
30 -#[derive(Debug)]
31 -pub struct ControlFlow {
32 - pub id: InstructionId,
33 - pub value: ControlFlowValue,
34 -}
35 -
36 -#[derive(Debug)]
37 -pub enum ControlFlowValue {
38 - // Logical(LogicalInstruction),
39 - // Sequence(SequenceInstruction),
40 - // Ternary(TernaryInstruction),
41 - // Optional(OptionalInstruction),
42 - // Break(BreakInstruction),
43 - // Continue(ContinueInstruction),
44 - Return(ReturnInstruction),
45 - // Throw(ThrowInstruction),
46 - // Switch(SwitchInstruction),
47 - // DoWhile(DoWhileInstruction),
48 - // While(WhileInstruction),
49 - // For(ForInstruction),
50 - // ForOf(ForOfInstruction),
51 - If(IfInstruction),
52 - // Label(LabelInstruction),
53 -}
54 -
55 -#[derive(Debug)]
56 -pub struct ReturnInstruction {
57 - pub value: IdentifierOperand,
58 -}
59 -
60 -#[derive(Debug)]
61 -pub struct IfInstruction {
62 - pub test: IdentifierOperand,
63 - pub consequent: Block,
64 - pub alternate: Option<Block>,
65 -}