Skip to content

Commit 23a0787

Browse files
Fixed merge conflict
2 parents 6b6935b + a0ca084 commit 23a0787

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

xml/chapter5/section4/subsection4.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ const eceval_operations =
290290
| number
291291
| expr(expr, expr, ...)
292292
binop ::= + | - | * | / | % | < | > | <= | >=
293-
| === | !== | && | ||
293+
| === | !== | && | ||
294294
unop ::= ! | -
295295
*/
296296

@@ -309,7 +309,7 @@ function is_self_evaluating(stmt) {
309309
// kind of statement/expression they are
310310

311311
function is_tagged_list(stmt, the_tag) {
312-
return is_pair(stmt) && head(stmt) === the_tag;
312+
return is_pair(stmt) && head(stmt) === the_tag;
313313
}
314314

315315
/* NAMES */
@@ -710,7 +710,7 @@ function extend_environment(names, vals, base_env) {
710710
),
711711
base_env
712712
);
713-
} else if (length(names) < length(vals)) {
713+
} else if (length(names) &lt; length(vals)) {
714714
error(
715715
"Too many arguments supplied: " +
716716
stringify(names) +
@@ -732,7 +732,7 @@ const the_empty_environment = null;
732732
// support both binary minus and unary minus
733733

734734
function minus(x, y) {
735-
if (is_number(x) && is_number(y)) {
735+
if (is_number(x) &amp;&amp; is_number(y)) {
736736
return x - y;
737737
} else {
738738
return -x;
@@ -752,10 +752,10 @@ const primitive_functions = list(
752752
list("%", (x, y) => x % y),
753753
list("===", (x, y) => x === y),
754754
list("!==", (x, y) => x !== y),
755-
list("<", (x, y) => x < y),
756-
list("<=", (x, y) => x <= y),
757-
list(">", (x, y) => x > y),
758-
list(">=", (x, y) => x >= y),
755+
list("&lt;", (x, y) => x &lt; y),
756+
list("&lt;=", (x, y) => x &lt;= y),
757+
list("&gt;", (x, y) => x &gt; y),
758+
list("&gt;=", (x, y) => x &gt;= y),
759759
list("!", (x) => !x)
760760
);
761761

@@ -1390,7 +1390,7 @@ function make_operation_exp(exp, machine, labels, operations) {
13901390
}
13911391

13921392
function is_operation_exp(exp) {
1393-
return is_pair(exp) && is_tagged_list(head(exp), "op");
1393+
return is_pair(exp) &amp;&amp; is_tagged_list(head(exp), "op");
13941394
}
13951395

13961396
function operation_exp_op(operation_exp) {
@@ -2068,7 +2068,7 @@ factorial(5);
20682068
<JAVASCRIPT>
20692069
function factorial(n) {
20702070
function iter(product, counter, max_count) {
2071-
return counter > max_count
2071+
return counter &gt; max_count
20722072
? product
20732073
: fact_iter(counter * product,
20742074
counter + 1,

xml/chapter5/section5/subsection3.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,15 +649,15 @@ function compile_procedure_call(target, linkage) {
649649
</SCHEME>
650650
<JAVASCRIPT>
651651
function compile_proc_appl(target, linkage) {
652-
if (target === "val" && linkage !== "return") {
652+
if (target === "val" &amp;&amp; linkage !== "return") {
653653
return make_instruction_sequence(
654654
list("proc"),
655655
all_regs,
656656
list(
657657
assign("continue", list(label(linkage))),
658658
assign("val", list(op("compiled_procedure_entry"), reg("proc"))),
659659
go_to(reg("val"))));
660-
} else if (target !== "val" && linkage !== "return") {
660+
} else if (target !== "val" &amp;&amp; linkage !== "return") {
661661
const proc_return = make_label("proc_return");
662662

663663
return make_instruction_sequence(
@@ -670,14 +670,14 @@ function compile_proc_appl(target, linkage) {
670670
proc_return,
671671
assign(target, list(reg("val"))),
672672
go_to(label(linkage))));
673-
} else if (target === "val" && linkage === "return") {
673+
} else if (target === "val" &amp;&amp; linkage === "return") {
674674
return make_instruction_sequence(
675675
list("proc", "continue"),
676676
all_regs,
677677
list(
678678
assign("val", list(op("compiled_procedure_entry"), reg("proc"))),
679679
go_to(reg("val"))));
680-
} else if (target !== "val" && linkage === "return") {
680+
} else if (target !== "val" &amp;&amp; linkage === "return") {
681681
error(target, "return linkage, target not val - - COMPILE");
682682
}
683683
}

xml/chapter5/section5/subsection4.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function preserving(regs, seq1, seq2) {
242242
} else {
243243
const first_reg = head(regs);
244244

245-
if (need_register(seq2, first_reg) && modifies_register(seq1, first_reg)) {
245+
if (need_register(seq2, first_reg) &amp;&amp; modifies_register(seq1, first_reg)) {
246246
return preserving(
247247
tail(regs),
248248
make_instruction_sequence(

xml/chapter5/section5/subsection5.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function factorial_alt(n) {
356356
<JAVASCRIPT>
357357
function factorial(n) {
358358
function iter(product, counter) {
359-
return counter > n
359+
return counter &gt; n
360360
? product
361361
: iter(product * counter, counter + 1);
362362
}

0 commit comments

Comments
 (0)