public static void UpdateMapProfileForWrite(DObject obj, mjr.CodeGen.Profiler profiler, int profileIndex, int fieldId, PropertyMap oldMap) { if (profiler != null) { if (obj.Map == oldMap) { PropertyDescriptor pd = obj.GetPropertyDescriptorByFieldId(fieldId); // obj.GetPropertyDescriptor // Trace.WriteLine("YYY"); profiler.GetOrAddMapNodeProfile(profileIndex).UpdateNodeProfile(oldMap, pd); } } }
public static void UpdateGuardProfile(ValueTypes type, mjr.CodeGen.Profiler profiler, int profileIndex) { if (profiler != null) { profiler.GetOrAddGuardNodeProfile(profileIndex).UpdateNodeProfile(type); } }
public static PropertyDescriptor UpdateMapProfile(PropertyDescriptor pd, mjr.CodeGen.Profiler profiler, int profileIndex, PropertyMap map) { if (profiler != null) { profiler.GetOrAddMapNodeProfile(profileIndex).UpdateNodeProfile(map, pd); } return pd; }
void DoAll(mjr.JSFunctionMetadata func, ProgramConfiguration config) { if (config.DumpIRGraph) { func.Analyze(); IRGraphWriter.Execute(func); } else if (config.OnlyJit) { func.JitSpeculatively(ref mdr.DFunctionSignature.EmptySignature); } else if (config.OnlyAnalyze) { func.Analyze(); } else if (config.OnlyParse) { // Already parsed everything during load. } else if (config.OnlyLex) { // Already lexed everything during load. } foreach (var f in func.SubFunctions) DoAll(f, config); }