mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-26 16:37:30 +03:00
Regen expectations
This commit is contained in:
parent
74e358dde6
commit
5565150f30
@ -224,7 +224,7 @@ impl<'a> Compiler<'a> {
|
||||
self.parse_program()?;
|
||||
let (symbol_table, struct_graph, call_graph) = self.compiler_stages()?;
|
||||
|
||||
let bytecode = CodeGenerator::do_pass((&self.ast, &symbol_table.handler, &struct_graph, &call_graph))?;
|
||||
let bytecode = CodeGenerator::do_pass((&self.ast, &symbol_table, &struct_graph, &call_graph))?;
|
||||
|
||||
Ok((symbol_table, bytecode))
|
||||
}
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:7:16\n |\n 7 | return two(n);\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:11:16\n |\n 11 | return three(n) + four(n);\n | ^^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:11:27\n |\n 11 | return three(n) + four(n);\n | ^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:15:16\n |\n 15 | return one(n);\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:19:16\n |\n 19 | return one(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:23:16\n |\n 23 | return six(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:27:16\n |\n 27 | return seven(n) + eight(n);\n | ^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:27:27\n |\n 27 | return seven(n) + eight(n);\n | ^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:31:16\n |\n 31 | return five(n);\n | ^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:35:16\n |\n 35 | return five(n);\n | ^^^^^^^\nError [ETYC0372053]: Cyclic dependency between functions: `one` --> `two` --> `three` --> `one`\n"
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:7:16\n |\n 7 | return two(n);\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:11:16\n |\n 11 | return three(n) + four(n);\n | ^^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:11:27\n |\n 11 | return three(n) + four(n);\n | ^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:15:16\n |\n 15 | return one(n);\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:19:16\n |\n 19 | return one(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:23:16\n |\n 23 | return six(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:27:16\n |\n 27 | return seven(n) + eight(n);\n | ^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:27:27\n |\n 27 | return seven(n) + eight(n);\n | ^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:31:16\n |\n 31 | return five(n);\n | ^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:35:16\n |\n 35 | return five(n);\n | ^^^^^^^\nError [ETYC0372066]: Cyclic dependency between functions: `one` --> `two` --> `three` --> `one`\n"
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- output:
|
||||
- initial_input_ast: no input
|
||||
initial_ast: 4d3f6c6d7473e2d981f1b66cdc0aa6c8c838b0cd5119749f88dd78173d948429
|
||||
unrolled_ast: 4d3f6c6d7473e2d981f1b66cdc0aa6c8c838b0cd5119749f88dd78173d948429
|
||||
ssa_ast: fa0c588d9ee1505dd06a0b90526b09e62f4336d4ce9f2e7be420235cd93bc9ab
|
||||
flattened_ast: de929e7ddaf5ac129f46d064d2581b79cad2a4ff2d91243af77c07dd1d2d9146
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:5:16\n |\n 5 | return bar(n);\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:9:16\n |\n 9 | return foo(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:13:16\n |\n 13 | return bax(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:17:16\n |\n 17 | return baz(n);\n | ^^^^^^\nError [ETYC0372053]: Cyclic dependency between functions: `foo` --> `bar` --> `foo`\n"
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:5:16\n |\n 5 | return bar(n);\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:9:16\n |\n 9 | return foo(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:13:16\n |\n 13 | return bax(n);\n | ^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:17:16\n |\n 17 | return baz(n);\n | ^^^^^^\nError [ETYC0372066]: Cyclic dependency between functions: `foo` --> `bar` --> `foo`\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:8:20\n |\n 8 | return fib(n - 1u8) + fib(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:8:35\n |\n 8 | return fib(n - 1u8) + fib(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:16:20\n |\n 16 | return foo(n - 1u8) + foo(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:16:35\n |\n 16 | return foo(n - 1u8) + foo(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372053]: Cyclic dependency between functions: `fib` --> `fib`\n"
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:8:20\n |\n 8 | return fib(n - 1u8) + fib(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:8:35\n |\n 8 | return fib(n - 1u8) + fib(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:16:20\n |\n 16 | return foo(n - 1u8) + foo(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:16:35\n |\n 16 | return foo(n - 1u8) + foo(n - 2u8);\n | ^^^^^^^^^^^^\nError [ETYC0372066]: Cyclic dependency between functions: `fib` --> `fib`\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Failed to parse string. Remaining invalid string is: \"closure main:\n output true as boolean;\n\n\n\""
|
||||
- "Failed to parse string. Remaining invalid string is: \"closure main:\n output true as boolean;\n\""
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Failed to parse string. Parsing Error: VerboseError { errors: [(\"closure main:\\n input r0 as boolean;\\n input r1 as boolean;\\n\", Nom(Tag)), (\"\\n\\n\\nclosure main:\\n input r0 as boolean;\\n input r1 as boolean;\\n\", Nom(Alt)), (\"\\n\\n\\nclosure main:\\n input r0 as boolean;\\n input r1 as boolean;\\n\", Nom(Many1))] }"
|
Loading…
Reference in New Issue
Block a user