mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 21:40:09 +01:00
Store named constant values in the AST (#1011)
This enables us to stop using `Env` in the typechecker. As a byproduct, this commit also restructures the interpreter to handle run-time global initialization as part of ordinary execution, using the Action stack.
This commit is contained in:
+2
-2
@@ -13,7 +13,7 @@
|
||||
// CHECK: fn Print (format_str: String) {
|
||||
// CHECK: ********** type checking **********
|
||||
// CHECK: checking pattern (format_str: String)
|
||||
// CHECK: values: Print: fun<Print>
|
||||
// CHECK: constants: Main: fun<Main>, Print: fun<Print>
|
||||
// CHECK: ********** type checking complete **********
|
||||
// CHECK: fn Print (format_str: String) {
|
||||
// CHECK: ********** starting execution **********
|
||||
@@ -21,7 +21,7 @@
|
||||
// CHECK: ********** calling main function **********
|
||||
// CHECK: {
|
||||
// CHECK: stack:
|
||||
// CHECK: heap: fun<Print>, fun<Main>
|
||||
// CHECK: heap:
|
||||
// CHECK: }
|
||||
// CHECK: --- step exp Main() (<Main()>:0) --->
|
||||
// CHECK: result: 0
|
||||
|
||||
Reference in New Issue
Block a user