Exemplo n.º 1
0
 public void Accept(ThreadNode node)
 {
 }
Exemplo n.º 2
0
 public void Accept(ThreadNode node)
 {
     var temp = method;
     method = new HassiumMethod();
     method.Name = "thread";
     node.Body.Visit(this);
     if (!module.ObjectPool.ContainsKey(method.GetHashCode()))
         module.ObjectPool.Add(method.GetHashCode(), method);
     temp.Emit(node.SourceLocation, InstructionType.BuildThread, method.GetHashCode());
     if (node.RunImmediately)
     {
         int hash = "start".GetHashCode();
         if (!module.ConstantPool.ContainsKey(hash))
             module.ConstantPool.Add(hash, "start");
         temp.Emit(node.SourceLocation, InstructionType.LoadAttribute, hash);
         temp.Emit(node.SourceLocation, InstructionType.Call);
     }
     method = temp;
 }