Esempio n. 1
0
        public static StackValue BuildString(string str, Heap heap)
        {
            var svchars = new List <StackValue>();

            foreach (char ch in str)
            {
                svchars.Add(BuildChar(ch));
            }

            lock (heap.cslock)
            {
                int size = str.Length;
                int ptr  = heap.Allocate(size);

                for (int i = 0; i < size; ++i)
                {
                    heap.Heaplist[ptr].Stack[i] = BuildChar(str[i]);
                }

                return(BuildString(ptr));
            }
        }
Esempio n. 2
0
        public static StackValue BuildString(string str, Heap heap)
        {
            var svchars = new List<StackValue>();

            foreach (char ch in str)
            {
                svchars.Add(ProtoCore.DSASM.StackUtils.BuildChar(ch));
            }

            lock (heap.cslock)
            {
                int size = str.Length;

                int ptr = heap.Allocate(size);

                for (int i = 0; i < size; ++i)
                {
                    heap.Heaplist[ptr].Stack[i] = BuildChar(str[i]);
                }

                return StackUtils.BuildString(ptr);
            }
        }