예제 #1
0
파일: Places.cs 프로젝트: iolevel/peachpie
        public void EmitStorePrepare(CodeGenerator cg, InstanceCacheHolder instanceOpt = null)
        {
            if (_lazyStoreCallSite == null)
                _lazyStoreCallSite = cg.Factory.StartCallSite("set_" + this.NameValueOpt);

            // callsite.Target callsite
            _lazyStoreCallSite.EmitLoadTarget(cg.Builder);
            _lazyStoreCallSite.Place.EmitLoad(cg.Builder);

            // instance
            InstanceCacheHolder.EmitInstance(instanceOpt, cg, Instance);

            // NameExpression in case of indirect call
            if (!_name.IsDirect)
            {
                cg.EmitConvert(_name.NameExpression, cg.CoreTypes.String);
            }
        }
예제 #2
0
파일: Places.cs 프로젝트: iolevel/peachpie
        public void EmitStorePrepare(CodeGenerator cg, InstanceCacheHolder instanceOpt = null)
        {
            if (_lazyStoreCallSite == null)
                _lazyStoreCallSite = cg.Factory.StartCallSite("set_" + this.NameValueOpt);

            // callsite.Target callsite
            _lazyStoreCallSite.EmitLoadTarget(cg.Builder);
            _lazyStoreCallSite.Place.EmitLoad(cg.Builder);

            _type.EmitLoadTypeInfo(cg);
        }
예제 #3
0
파일: Places.cs 프로젝트: iolevel/peachpie
        public void EmitLoadPrepare(CodeGenerator cg, InstanceCacheHolder instanceOpt = null)
        {
            if (_lazyLoadCallSite == null)
                _lazyLoadCallSite = cg.Factory.StartCallSite("get_" + this.NameValueOpt);

            // callsite.Target callsite
            _lazyLoadCallSite.EmitLoadTarget(cg.Builder);
            _lazyLoadCallSite.Place.EmitLoad(cg.Builder);

            // instance
            InstanceCacheHolder.EmitInstance(instanceOpt, cg, Instance);
        }