Typos is NestedCall blurb?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Typos is NestedCall blurb?

yangmillstheory
Hi Mark,

This is the Sys.main() section of NestedCall.html, from the latest update you posted here. Are the italicized bits typos?

Sys.init() allocates 5 local variables. It sets local 1, local 2 and local 3. local 0 and local 4 are intentionally not set.
THIS and THAT are changed so that context save and restore can be tested.

Sys.main() calls Sys.add12(123) and stores the return value in temp 0. This tests call to and return from a function with arguments.

After Sys.add12() returns, Sys.main() sums local 0 through local 4 and returns the result. This tests that the local segment was properly allocated on the stack and that the local variables were not overwritten by the call to Sys.main(). It also tests that local 0 and local 4 were properly initialized to 0.
I'm wondering if the corrections map in order as follows:

Sys.init() -> Sys.main()
Sys.main() -> Sys.add12()

Thanks for writing these extra tests and explanations!
Reply | Threaded
Open this post in threaded view
|

Re: Typos is NestedCall blurb?

cadet1620
Administrator
yangmillstheory wrote
I'm wondering if the corrections map in order as follows:

Sys.init() -> Sys.main()
Sys.main() -> Sys.add12()

Thanks for writing these extra tests and explanations!
Indeed they do. Thanks for catching that.

I'll need to update the document.

--Mark