// Allocates slots for IL locals or IL arguments private void AllocateLocals(LambdaCompiler lc) { foreach (ParameterExpression v in GetVariables()) { if (Definitions[v] == VariableStorageKind.Local) { // // If v is in lc.Parameters, it is a parameter. // Otherwise, it is a local variable. // // Also, for inlined lambdas we'll create a local, which // is possibly a byref local if the parameter is byref. // Storage s; if (IsMethod && lc.Parameters.Contains(v)) { s = new ArgumentStorage(lc, v); } else { s = new LocalStorage(lc, v); } _locals.Add(v, s); } } }
private void AllocateLocals(LambdaCompiler lc) { foreach (ParameterExpression expression in this.GetVariables()) { if (((VariableStorageKind) this.Definitions[expression]) == VariableStorageKind.Local) { Storage storage; if (this.IsMethod && lc.Parameters.Contains(expression)) { storage = new ArgumentStorage(lc, expression); } else { storage = new LocalStorage(lc, expression); } this._locals.Add(expression, storage); } } }
private void AllocateLocals(LambdaCompiler lc) { foreach (ParameterExpression expression in this.GetVariables()) { if (((VariableStorageKind)this.Definitions[expression]) == VariableStorageKind.Local) { Storage storage; if (this.IsMethod && lc.Parameters.Contains(expression)) { storage = new ArgumentStorage(lc, expression); } else { storage = new LocalStorage(lc, expression); } this._locals.Add(expression, storage); } } }
// Allocates slots for IL locals or IL arguments private void AllocateLocals(LambdaCompiler lc) { foreach (ParameterExpression v in GetVariables()) { if (Definitions[v] == VariableStorageKind.Local) { Storage s; //If v is in lc.Parameters, it is a parameter. //Otherwise, it is a local variable. if (lc.Parameters.Contains(v)) { s = new ArgumentStorage(lc, v); } else { s = new LocalStorage(lc, v); } _locals.Add(v, s); } } }
public static void ReadLaunchArgs() { try { string key = _settings.key; string queueName = ExchangeNames.Launch + "_" + key; string exchangeName = ExchangeNames.Launch; IModel channel = GetChanel(); ExchangeDeclareIfNotExist(exchangeName, "direct", true); channel.QueueBind(queueName, exchangeName, key); EventingBasicConsumer consumer = new EventingBasicConsumer(channel); consumer.Received += (model, ea) => { LogManager.GetCurrentClassLogger().Info("vw.launch received message!"); var body = ea.Body; string message = Encoding.UTF8.GetString(body); #if UNITY_EDITOR SaveCache(message); #endif LaunchArguments launchArguments = message.JsonDeserialize <LaunchArguments>(); if (launchArguments.extraArgs != null) { Debug.Log("!!@@##" + launchArguments .extraArgs); //not sure where to instantiate local logger with LogManager.GetCurrentClassLogger() ArgumentStorage.ClearStorage(); ArgumentStorage.AddJsonArgsArray(launchArguments.extraArgs); } ProjectDataListener.Instance.LaunchArguments = launchArguments; }; channel.BasicConsume(queueName, true, consumer); } catch (Exception e) { CloseConnectionAndChanel(); #if UNITY_EDITOR LaunchArguments launchArguments = LoadFromCache(); if (launchArguments != null) { LogManager.GetCurrentClassLogger().Info("Loading previous vw.launch..."); ProjectDataListener.Instance.LaunchArguments = launchArguments; } else { LauncherErrorManager.Instance.ShowFatalErrorKey( ErrorHelper.GetErrorKeyByCode(Varwin.Errors.ErrorCode.RabbitNoArgsError), e.StackTrace); } #else LogManager.GetCurrentClassLogger().Fatal("vw.launch not found! StackTrace = " + e.StackTrace); LauncherErrorManager.Instance.ShowFatalErrorKey(ErrorHelper.GetErrorKeyByCode(Varwin.Errors.ErrorCode.RabbitNoArgsError), e.StackTrace); #endif } }