UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

26 lines (24 loc) 813 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetCacheHelper = void 0; const constants_1 = require("../../constants"); const Helper_1 = require("../Helper"); class GetCacheHelper extends Helper_1.Helper { constructor() { super(...arguments); this.needsGlobal = true; } emitGlobal(sb, node, _options) { sb.emitPushInt(node, constants_1.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: constants_1.GlobalProperty.Cache })); } } exports.GetCacheHelper = GetCacheHelper; //# sourceMappingURL=GetCacheHelper.js.map