Example #1
0
        public StackValue AllocateString(string str)
        {
            var chs   = str.Select(c => StackValue.BuildChar(c)).ToArray();
            int index = AllocateInternal(chs);

            return(StackValue.BuildString(index));
        }
Example #2
0
        public StackValue AllocateString(string str)
        {
            var chs         = str.Select(c => StackValue.BuildChar(c)).ToArray();
            int index       = AllocateInternal(chs);
            var heapElement = heapElements[index];

            heapElement.MetaData = new MetaData {
                type = (int)PrimitiveType.kTypeString
            };
            return(StackValue.BuildString(index));
        }