die "Type too large: $type\n" if $type >= (1 << $self->{type_bits});
die "Addr too large: $addr\n" if $addr >= (1 << $self->{addr_bits});
my $result = ($type << $self->{addr_bits}) + $addr;
+
unless ($location) {
$self->{freeptr}++;
$location = $self->{freeptr}
my %self = (
symbols => ['', '', 'T'],
nsymbols => 3,
- symbol_map => {},
+ symbol_map => {T => 2},
);
bless \%self, $class;
}
[LIST => 0]
} elsif (scalarp $expr) {
$expr = uc $expr;
+ if ($expr eq 'NIL') {
+ return [LIST => 0]
+ }
if (!exists $self->{symbol_map}{$expr}) {
$self->{symbol_map}{$expr} = $self->{nsymbols};
$self->{nsymbols}++;