swift icon indicating copy to clipboard operation
swift copied to clipboard

Update instances generating process in the compiled target

Open jxwuyi opened this issue 7 years ago • 0 comments

Now in the compiled target, all the string names of the instances will be stored in a vector with name "__vecstr_instance_XXXXX"

For example, BLOG: type City; distinct City C[2]; C++ target has the following: const vector __vecstr_instance_PrepLevel = {"C[0]", "C[1]"};

However, the distinct statement can declare a large number of instances. Printing all the different string names in the C++ target makes the C++ file super large and slows down the compilation process a lot.

So, ideally, we need to use a for loop to create all these string names.

jxwuyi avatar Nov 03 '16 01:11 jxwuyi