Skip to content

Commit

Permalink
Simplify AST slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchisnall committed Aug 22, 2016
1 parent 17893c2 commit 3d62f73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ast.hh
Expand Up @@ -222,7 +222,7 @@ namespace AST
/**
* The operation to perform.
*/
pegmatite::ASTPtr<Op> op;
pegmatite::ASTChild<Op> op;
/**
* The target register. All operations in the cellatom language are
* read-modify-write.
Expand Down
2 changes: 1 addition & 1 deletion compiler.cc
Expand Up @@ -264,7 +264,7 @@ Value* Arithmetic::compile(Compiler::State &s)
Value *result;
// For most operations, we can just create a single IR instruction and then
// store the result. For min and max, we create a comparison and a select
switch (op->op)
switch (op.op)
{
case Op::Add:
result = B.CreateAdd(v, o);
Expand Down
2 changes: 1 addition & 1 deletion interpreter.cc
Expand Up @@ -113,7 +113,7 @@ uint16_t Arithmetic::interpret(Interpreter::State &s)
uint16_t v = value->interpret(s);
uint16_t o = target->interpret(s);
uint16_t result;
switch (op->op)
switch (op.op)
{
case Op::Add:
result = o+v;
Expand Down

0 comments on commit 3d62f73

Please sign in to comment.