Skip to content

Commit

Permalink
More comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendorff committed Sep 25, 2013
1 parent 458ab66 commit 11ad09f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions calculator-backends.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,14 @@ function compileToComplexFunction(code) {
return op("/", a, b);
}

// Reduce obj, which represents an operation on complex numbers, to a pair
// of expressions on floating-point numbers.
// **ast_to_ir(*obj*)** reduces *obj*, which represents an operation on
// complex numbers, to a sequence of operations on floating-point numbers.
//
// As a side effect, this populates the array `values` with IR objects.
// It adds IR nodes representing those operations to *values*.
//
// Returns an object `{im: int, re: int}` giving the index, in *values*, of
// the IR nodes representing the real part and the imaginary part of the
// answer.
//
function ast_to_ir(obj) {
switch (obj.type) {
Expand Down

0 comments on commit 11ad09f

Please sign in to comment.