private IrOp loadDefine(IrOp op) { IrField field = op.argToField(); // in the end a Log definition becomes a // normal static field if (field.type.isLog()) { op.opcode = SCode.LoadConstStatic; return op; } // array literals use an internal bytecode which actually // gets written as LoadBuf (to maintain compatibility with // older SVMs); we stash the literal instance on the op itself if (field.type.isArray()) { op.opcode = SCode.LoadArrayLiteral; op.resolvedArg = field.define(); return op; } return CodeAsm.loadLiteral(field.define); }
private IrOp sizeOf(IrOp op) { int size = op.argToType().sizeof(); return CodeAsm.loadIntOp(size); }