prepare-object ( obj -- ptr )

Vocabulary
bootstrap.image.private

Inputs
objan object
Outputs
ptran object
DefinitionMethods
USING: arrays bootstrap.image.private ;
M: array prepare-object [ emit-array ] cache-eq-object ;

USING: bootstrap.image.private math ;
M: bignum prepare-object
[ bignum [ emit-bignum ] emit-object ] cache-eql-object ;

USING: bootstrap.image.private byte-arrays kernel layouts
sequences ;
M: byte-array prepare-object
[
byte-array [
dup length emit-fixnum bootstrap-cell 4 =
[ 0 emit 0 emit ] when pad-bytes emit-bytes
] emit-object
] cache-eq-object ;

USING: bootstrap.image.private kernel layouts ;
M: f prepare-object drop \ f type-number ;

USING: accessors bootstrap.image.private layouts ;
M: fake-bignum prepare-object n>> tag-fixnum ;

USING: bootstrap.image.private kernel layouts math math.order ;
M: fixnum prepare-object
dup bootstrap-most-negative-fixnum
bootstrap-most-positive-fixnum between?
[ tag-fixnum ] [ >bignum prepare-object ] if ;

USING: bootstrap.image.private math ;
M: float prepare-object
[ float [ 8 (align-here) double>bits emit-64 ] emit-object ]
cache-eql-object ;

USING: accessors bootstrap.image.private quotations ;
M: quotation prepare-object
[
array>> prepare-object quotation [
emit f prepare-object emit f prepare-object emit
0 emit
] emit-object
] cache-eql-object ;

USING: bootstrap.image.private strings ;
M: string prepare-object [ emit-string ] cache-eql-object ;

USING: accessors bootstrap.image.private hashtables.private
kernel sequences words ;
M: tombstone prepare-object
state>> "+tombstone+" "+empty+" ?
"hashtables.private" lookup-word def>> first
[ emit-tuple ] cache-eql-object ;

USING: bootstrap.image.private kernel math sequences ;
M: tuple-layout-array prepare-object
[ [ dup integer? [ <fake-bignum> ] when ] map emit-array ]
cache-eql-object ;

USING: bootstrap.image.private kernel ;
M: tuple prepare-object emit-tuple ;

USING: bootstrap.image.private words ;
M: word prepare-object ;

USING: accessors bootstrap.image.private kernel ;
M: wrapper prepare-object
[ wrapped>> prepare-object wrapper [ emit ] emit-object ]
cache-eql-object ;