private void RestorePlaces(EmissionContext emissionContext) { ScriptContextPlace = emissionContext.ScriptContextPlace; SelfPlace = emissionContext.SelfPlace; il = emissionContext.IL; }
private EmissionContext SetupStubPlaces(PhpType/*!*/ type, bool stubIsStatic) { EmissionContext context = new EmissionContext(ScriptContextPlace, SelfPlace, il); ScriptContextPlace = new LazyLoadSCPlace(); if (stubIsStatic) { SelfPlace = LiteralPlace.Null; } else { if (type.ProxyFieldInfo != null) { // the real this is not a DObject SelfPlace = new Place(IndexedPlace.ThisArg, type.ProxyFieldInfo); } else { // the real this is a DObject SelfPlace = IndexedPlace.ThisArg; } } return context; }