Skip to content

Conversation

@martin-henz
Copy link
Member

No description provided.

Copy link
Collaborator

@TobiasWrigstad TobiasWrigstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions in the comments.
I am happy to do the edits afterwards. You're already going above and beyond here.

} else if (target !== "val" && linkage === "return") {
error(target, "return linkage, target not val -- compile");
} else {}
const return_undefined = make_label("return_undefined");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice rewrite! Happy to get rid of the empty else. I'll see if the same trick can be applied elsewhere (think there is one empty else elsewhere).

Only one minor negative: this will cause labels to be computed even when they are not used, which will lead to gaps in the sequences of label numbers. But very minor thing.

& \texttt{restore(}\textit{reg}_1\texttt{)} & \texttt{restore(}\textit{reg}_2\texttt{)} & \textit{seq}_1 \\
& \textit{seq}_2 & \textit{seq}_2 & \texttt{restore(}\textit{reg}_1\texttt{)} \\
& & & \texttt{restore(}\textit{reg}_2\texttt{)} \\
\textit{seq}_1 & \texttt{save(}\textit{reg}_1\texttt{),} & \texttt{save(}\textit{reg}_2\texttt{),} & \texttt{save(}\textit{reg}_2\texttt{),} \\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not too much with both the | and the comma after?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, a bit strange then not to use comma consistently (not after $seq_1$).

</SCHEME>
<JAVASCRIPT>
component applications whose function expression is a name,
components applications whose function expression is a name,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really grammatically correct? Do we pluralise both words?

avoids compiling the
<QUOTE>dead code</QUOTE> after the return statement that can
never be executed. Not compiling dead<FOOTNOTE>Our compiler does not detect all dead code. For example,
never be executed. Not compiling dead code<FOOTNOTE>Our compiler does not detect all dead code. For example,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You OK with the use of "code" here? I thought about it after our recent email conversation. "Dead code" can be Googled.

We could call them "dead instructions".

list("argl"),
list(assign("argl", list(op("pair"),
reg("val"), reg("argl"))))));
const code_for_next_arg =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with this reformat for now -- but (I'm just echoing Julie here) we will have quite a bit of horizontal space so vertical space is a more scarce resource. Again, expecting to have to revisit all formatting of code when typesetting the book.

@martin-henz
Copy link
Member Author

martin-henz commented Jan 24, 2021 via email

@TobiasWrigstad
Copy link
Collaborator

TobiasWrigstad commented Jan 25, 2021

You are mistaken. SICP has the same construction and is correct. I had to read it a couple of times to understand the meaning. Try it. Hint: make a pause between the two words.

Indeed. Finally got it. :)

@TobiasWrigstad TobiasWrigstad merged commit 8a09dfb into master Jan 25, 2021
@TobiasWrigstad TobiasWrigstad deleted the 55details branch January 25, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants