UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

22 lines (20 loc) 635 B
import { GlobalProperty } from '../../constants'; import { Helper } from '../Helper'; export class GetCacheHelper extends Helper { constructor() { super(...arguments); this.needsGlobal = true; } emitGlobal(sb, node, _options) { sb.emitPushInt(node, GlobalProperty.Cache); sb.emitOp(node, 'NEWMAP'); sb.emitOp(node, 'SETITEM'); } emit(sb, node, options) { if (!options.pushValue) { return; } sb.emitHelper(node, options, sb.helpers.getGlobalProperty({ property: GlobalProperty.Cache })); } } //# sourceMappingURL=GetCacheHelper.js.map