| 938 | streamFunctionBody.Add(56 + (1 << 16)); |
| 939 | } |
| 940 | int EncodeString(List<unsigned int> & stream, String S) |
| 941 | { |
| 942 | auto encoder = CoreLib::IO::Encoding::UTF8; |
| 943 | List<char> bytes; |
| 944 | encoder->GetBytes(bytes, S); |
| 945 | int padding = (4 - (bytes.Count() & 3)) & 3; |
| 946 | for (int i = 0; i < padding; i++) |
| 947 | bytes.Add(0); |
| 948 | int oldSize = stream.Count(); |
| 949 | stream.SetSize(oldSize + (bytes.Count() >> 2)); |
| 950 | memcpy(stream.Buffer() + oldSize, bytes.Buffer(), bytes.Count()); |
| 951 | if (padding==0) |
| 952 | stream.Add(0); |
| 953 | return stream.Count() - oldSize; |
| 954 | } |
| 955 | void OpEntryPoint(const ExecutionModel currentExecutionModel, const int entryID, const List<int> &interfaceIDs) |
| 956 | { |
| 957 | sbTextHeader << LR"(OpEntryPoint )"; |