        return (chunk as? DataChunk)?.pushedData
    }

    public func execute(with context: ScriptExecutionContext) throws {
        for chunk in chunks {
            if let opChunk = chunk as? OpcodeChunk {
                try opChunk.opCode.execute(context)
            } else if let dataChunk = chunk as? DataChunk {
                if context.shouldExecute {
                    try context.pushToStack(dataChunk.pushedData)
                }
            } else {
                throw ScriptMachineError.error("Unknown chunk")
            }
        }