formatting

This commit is contained in:
water 2020-09-14 17:02:25 -04:00
parent a74ed941ae
commit f972cdcab5
2 changed files with 2 additions and 4 deletions

View file

@ -277,7 +277,7 @@ Then, for each of the remaining arguments, we do:
```
which emits an IR to add the value to the sum. The `to_math_type` will emit any code needed to convert this to the correct numeric type (returns either a numeric constant or a `RegVal` containing the value).
A second important detail is that we create a new register which will hold the result. This may seem inefficient in cases, but a later compile pass will try to make this new register be the same register as `first_val` if possible, and will eliminate the `IR_RegSet`.
An important detail is that we create a new register which will hold the result. This may seem inefficient in cases, but a later compile pass will try to make this new register be the same register as `first_val` if possible, and will eliminate the `IR_RegSet`.
# Register Allocation

View file

@ -216,7 +216,7 @@ Val* Compiler::compile_function_or_method_call(const goos::Object& form, Env* en
head_as_lambda = dynamic_cast<LambdaVal*>(head);
}
if(!head_as_lambda) {
if (!head_as_lambda) {
head = head->to_gpr(env);
}
@ -227,8 +227,6 @@ Val* Compiler::compile_function_or_method_call(const goos::Object& form, Env* en
eval_args.push_back(intermediate->to_reg(env));
}
if (head_as_lambda) {
// inline the function!