search for: assignexpress

Displaying 4 results from an estimated 4 matches for "assignexpress".

2011 Apr 22
3
[LLVMdev] copy instructions
...ht look like the following: Value *AddExpression::codeGen() { Value *l = left->codeGen(); Value *r = right->codeGen(); Value *result = new TempValue; // get unique temporary emit(result->str() + " add " + l->str() + ", " r-str()); return result; } Value *assignExpression::codeGen() { Value *rval = rvalue->codeGen(); Value *lval = new NameValue(ident); emit(lval->str() + " = " + rval->str()); // emit (silly) copy instruction return lval; } What I have suggested to my students is to omit the (non-existent) copy instruction and use th...
2011 Apr 23
2
[LLVMdev] copy instructions
...*AddExpression::codeGen() { >  Value *l = left->codeGen(); >  Value *r = right->codeGen(); >  Value *result = new TempValue;  // get unique temporary >  emit(result->str() + " add " + l->str() + ", " r-str()); >  return result; > } > > Value *assignExpression::codeGen() { >  Value *rval = rvalue->codeGen(); >  Value *lval = new NameValue(ident); >  emit(lval->str() + " = " + rval->str());    // emit (silly) copy instruction >  return lval; > } > > What I have suggested to my students is to omit the (non-existen...
2011 Apr 23
0
[LLVMdev] copy instructions
...*AddExpression::codeGen() { >  Value *l = left->codeGen(); >  Value *r = right->codeGen(); >  Value *result = new TempValue;  // get unique temporary >  emit(result->str() + " add " + l->str() + ", " r-str()); >  return result; > } > > Value *assignExpression::codeGen() { >  Value *rval = rvalue->codeGen(); >  Value *lval = new NameValue(ident); >  emit(lval->str() + " = " + rval->str());    // emit (silly) copy instruction >  return lval; > } > > What I have suggested to my students is to omit the (non-existen...
2011 Apr 23
0
[LLVMdev] copy instructions
...;>  Value *l = left->codeGen(); >>  Value *r = right->codeGen(); >>  Value *result = new TempValue;  // get unique temporary >>  emit(result->str() + " add " + l->str() + ", " r-str()); >>  return result; >> } >> >> Value *assignExpression::codeGen() { >>  Value *rval = rvalue->codeGen(); >>  Value *lval = new NameValue(ident); >>  emit(lval->str() + " = " + rval->str());    // emit (silly) copy >> instruction >>  return lval; >> } >> >> What I have suggested to my...