fix: Astrid.Query.andThen compose with map*
Reserve stack slots for andThen values and fill them in later. The old approach of a strict stack machine was wrong.
This commit is contained in:
parent
b6182376b6
commit
401aec67d0
5 changed files with 271 additions and 85 deletions
|
|
@ -210,11 +210,15 @@ pub(crate) fn exec(
|
|||
)
|
||||
.replace(
|
||||
"var $author$project$Astrid$Query$map2 = F3(\n\tfunction (f, a, b) {\n\t\treturn $author$project$Astrid$Query$Dummy;\n\t});",
|
||||
r#"var $author$project$Astrid$Query$map3 = _Query_map2;"#,
|
||||
r#"var $author$project$Astrid$Query$map2 = _Query_map2;"#,
|
||||
)
|
||||
.replace(
|
||||
"var $author$project$Astrid$Query$map = F2(\n\tfunction (f, a) {\n\t\treturn $author$project$Astrid$Query$Dummy;\n\t});",
|
||||
r#"var $author$project$Astrid$Query$map3 = _Query_map1;"#,
|
||||
r#"var $author$project$Astrid$Query$map = _Query_map1;"#,
|
||||
)
|
||||
.replace(
|
||||
"var $author$project$Astrid$Query$andThen = F2(\n\tfunction (f, q) {\n\t\treturn $author$project$Astrid$Query$Dummy;\n\t});",
|
||||
r#"var $author$project$Astrid$Query$andThen = _Query_andThen;"#,
|
||||
);
|
||||
|
||||
// final_script.replace("var $author$project$Astrid$Query$run = ", "JSON.stringify(x)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue