On Sat, Apr 21, 2018 at 2:58 AM, Thomson Tan <
lil...@gmail.com> wrote:
> The ARM64 backend could convert Smi to Operand by assigning tagged Smi to
> immediate filed in Operand class, as below code snippet. Then the immediate
> field is tagged Smi value, would it cause problem when encoding this
> operand?
>
> // src\arm64\assember-arm64-inl.h
> template<>
> struct ImmediateInitializer<Smi*> {
> static const bool kIsIntType = false;
> static inline RelocInfo::Mode rmode_for(Smi* t) { return RelocInfo::NONE;
> }
> static inline int64_t immediate_for(Smi* t) {;
> return reinterpret_cast<int64_t>(t);
> }
> };
No, If I understand your question correctly.
Smis are not heap objects and don't need additional bookkeeping.
That's unlike embedded object pointers, those need to be made visible
to the garbage collector.