Example #1
0
 public static StackValue ConcatString(StackValue op1, StackValue op2, ProtoCore.Runtime.RuntimeMemory rmem)
 {
     StackValue[] v1 = (AddressType.String == op1.optype) ? rmem.GetArrayElements(op1) : new StackValue[] { op1 };
     StackValue[] v2 = (AddressType.String == op2.optype) ? rmem.GetArrayElements(op2) : new StackValue[] { op2 };
     StackValue tmp = rmem.BuildArray(v1.Concat(v2).ToArray());
     return StackUtils.BuildString(tmp.opdata);
 }
Example #2
0
 public static StackValue ConcatString(StackValue op1, StackValue op2, ProtoCore.Runtime.RuntimeMemory rmem)
 {
     StackValue[] v1 = op1.IsString ? rmem.GetArrayElements(op1) : new StackValue[] { op1 };
     StackValue[] v2 = op2.IsString ? rmem.GetArrayElements(op2) : new StackValue[] { op2 };
     StackValue tmp = rmem.BuildArray(v1.Concat(v2).ToArray());
     return StackValue.BuildString(tmp.opdata);
 }
Example #3
0
        // TODO: Implement this to recurse through expressions in watch window and running expression interpreter for each of their sub-types - pratapa
        internal static void GetStringValue(Obj obj, ProtoCore.DSASM.Mirror.ExecutionMirror mirror)
        {
            switch (obj.DsasmValue.optype)
            {
                case AddressType.ArrayPointer:
                    {
                        List<Obj> ol = mirror.GetArrayElements(obj);

                        foreach (Obj o in ol)
                        {
                            GetStringValue(o, mirror);
                        }
                        return;
                    }
                case AddressType.Pointer:
                    {
                        Dictionary<string, Obj> os = mirror.GetProperties(obj);
                        for (int i = 0; i < os.Count; ++i)
                        {

                        }
                        return;
                    }
                default:
                    return;
            }
        }