Class: Erlang::ETF::Fun

Inherits:
Object
  • Object
show all
Includes:
Term
Defined in:
lib/erlang/etf/fun.rb

Overview

1 4 N1 N2 N3 N4 N5
117 NumFree Pid Module Index Uniq Free vars ...

Pid

is a process identifier as in PID_EXT. It represents the process in which the fun was created.

Module

is an encoded as an atom, using ATOM_EXT, SMALL_ATOM_EXT or ATOM_CACHE_REF. This is the module that the fun is implemented in.

Index

is an integer encoded using SMALL_INTEGER_EXT or INTEGER_EXT. It is typically a small index into the module's fun table.

Uniq

is an integer encoded using SMALL_INTEGER_EXT or INTEGER_EXT. Uniq is the hash value of the parse for the fun.

Free vars

is NumFree number of terms, each one encoded according to its type.

(see FUN_EXT)

Constant Summary

Constants included from Term

Term::BERT_PREFIX, Term::BIN_LSB_PACK, Term::BIN_MSB_PACK

Instance Method Summary collapse

Methods included from Term

#==, #__erlang_evolve__, #__erlang_type__, #__ruby_evolve__, included

Constructor Details

#initialize(pid, mod, index, uniq, free_vars = []) ⇒ Fun

Returns a new instance of Fun.



72
73
74
75
76
77
78
# File 'lib/erlang/etf/fun.rb', line 72

def initialize(pid, mod, index, uniq, free_vars = [])
  self.pid       = pid
  self.mod       = mod
  self.index     = index
  self.uniq      = uniq
  self.free_vars = free_vars
end