Beispiel #1
0
        private void InitSlotPtr(AbcCode code, VarPtr ptr)
        {
            GetActivation(code);
            if (AbcGenConfig.UseActivationTraits)
            {
                switch (ptr.Ptr.PtrKind)
                {
                case PointerKind.SlotPtr:
                    code.CreateSlotPtr(ptr.Ptr, _activationVar);
                    break;

                case PointerKind.PropertyPtr:
                    code.CreatePropertyPtr(ptr.Slot.Name, () => GetActivation(code));
                    break;

                case PointerKind.FuncPtr:
                    code.CreateFuncPtr(ptr.Slot);
                    break;
                }
            }
            else
            {
                code.Getlex(ptr.Ptr.SlotType);
                GetActivation(code);
                code.Construct(1);
            }
            code.SetSlot(ptr.Ptr);
        }