Skip to content

Commit 5081485

Browse files
committed
Inline internal unpackers.
This commit inlines over structured unpacker hierarchy to reduce virtcall and code size. This commit also improves offset management for "stripped" Stream.
1 parent 593c598 commit 5081485

61 files changed

Lines changed: 28715 additions & 14876 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/MsgPack.Silverlight.5/MsgPack.Silverlight.5.csproj

Lines changed: 27 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@
101101
<Compile Include="..\MsgPack\ByteArrayUnpacker.cs">
102102
<Link>ByteArrayUnpacker.cs</Link>
103103
</Compile>
104-
<Compile Include="..\MsgPack\ByteArrayUnpackerReader.cs">
105-
<Link>ByteArrayUnpackerReader.cs</Link>
106-
</Compile>
107-
<Compile Include="..\MsgPack\ByteArrayUnpackerReader.TypedRead.cs">
108-
<Link>ByteArrayUnpackerReader.TypedRead.cs</Link>
109-
</Compile>
110104
<Compile Include="..\MsgPack\ByteBufferAllocator.cs">
111105
<Link>ByteBufferAllocator.cs</Link>
112106
</Compile>
@@ -119,18 +113,6 @@
119113
<Compile Include="..\MsgPack\CollectionType.cs">
120114
<Link>CollectionType.cs</Link>
121115
</Compile>
122-
<Compile Include="..\MsgPack\DefaultByteArrayUnpacker.cs">
123-
<Link>DefaultByteArrayUnpacker.cs</Link>
124-
</Compile>
125-
<Compile Include="..\MsgPack\DefaultByteArrayUnpacker.Unpacking.cs">
126-
<Link>DefaultByteArrayUnpacker.Unpacking.cs</Link>
127-
</Compile>
128-
<Compile Include="..\MsgPack\DefaultStreamUnpacker.cs">
129-
<Link>DefaultStreamUnpacker.cs</Link>
130-
</Compile>
131-
<Compile Include="..\MsgPack\DefaultStreamUnpacker.Unpacking.cs">
132-
<Link>DefaultStreamUnpacker.Unpacking.cs</Link>
133-
</Compile>
134116
<Compile Include="..\MsgPack\DictionaryDebuggerProxy`2.cs">
135117
<Link>DictionaryDebuggerProxy`2.cs</Link>
136118
</Compile>
@@ -155,12 +137,21 @@
155137
<Compile Include="..\MsgPack\IAsyncUnpackable.cs">
156138
<Link>IAsyncUnpackable.cs</Link>
157139
</Compile>
140+
<Compile Include="..\MsgPack\Int32OffsetValue`1.cs">
141+
<Link>Int32OffsetValue`1.cs</Link>
142+
</Compile>
143+
<Compile Include="..\MsgPack\Int64OffsetValue`1.cs">
144+
<Link>Int64OffsetValue`1.cs</Link>
145+
</Compile>
158146
<Compile Include="..\MsgPack\InvalidMessagePackStreamException.cs">
159147
<Link>InvalidMessagePackStreamException.cs</Link>
160148
</Compile>
161149
<Compile Include="..\MsgPack\IPackable.cs">
162150
<Link>IPackable.cs</Link>
163151
</Compile>
152+
<Compile Include="..\MsgPack\IRootUnpacker.cs">
153+
<Link>IRootUnpacker.cs</Link>
154+
</Compile>
164155
<Compile Include="..\MsgPack\IUnpackable.cs">
165156
<Link>IUnpackable.cs</Link>
166157
</Compile>
@@ -179,6 +170,12 @@
179170
<Compile Include="..\MsgPack\MessagePackByteArrayPacker.Pack.cs">
180171
<Link>MessagePackByteArrayPacker.Pack.cs</Link>
181172
</Compile>
173+
<Compile Include="..\MsgPack\MessagePackByteArrayUnpacker.cs">
174+
<Link>MessagePackByteArrayUnpacker.cs</Link>
175+
</Compile>
176+
<Compile Include="..\MsgPack\MessagePackByteArrayUnpacker.Unpack.cs">
177+
<Link>MessagePackByteArrayUnpacker.Unpack.cs</Link>
178+
</Compile>
182179
<Compile Include="..\MsgPack\MessagePackCode.cs">
183180
<Link>MessagePackCode.cs</Link>
184181
</Compile>
@@ -221,26 +218,14 @@
221218
<Compile Include="..\MsgPack\MessagePackStreamPacker.Pack.cs">
222219
<Link>MessagePackStreamPacker.Pack.cs</Link>
223220
</Compile>
224-
<Compile Include="..\MsgPack\MessagePackString.cs">
225-
<Link>MessagePackString.cs</Link>
221+
<Compile Include="..\MsgPack\MessagePackStreamUnpacker.cs">
222+
<Link>MessagePackStreamUnpacker.cs</Link>
226223
</Compile>
227-
<Compile Include="..\MsgPack\MessagePackUnpacker.cs">
228-
<Link>MessagePackUnpacker.cs</Link>
224+
<Compile Include="..\MsgPack\MessagePackStreamUnpacker.Unpack.cs">
225+
<Link>MessagePackStreamUnpacker.Unpack.cs</Link>
229226
</Compile>
230-
<Compile Include="..\MsgPack\MessagePackUnpacker.Read.cs">
231-
<Link>MessagePackUnpacker.Read.cs</Link>
232-
</Compile>
233-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.cs">
234-
<Link>MessagePackUnpacker`1.cs</Link>
235-
</Compile>
236-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.Read.cs">
237-
<Link>MessagePackUnpacker`1.Read.cs</Link>
238-
</Compile>
239-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.Skipping.cs">
240-
<Link>MessagePackUnpacker`1.Skipping.cs</Link>
241-
</Compile>
242-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.Unpacking.cs">
243-
<Link>MessagePackUnpacker`1.Unpacking.cs</Link>
227+
<Compile Include="..\MsgPack\MessagePackString.cs">
228+
<Link>MessagePackString.cs</Link>
244229
</Compile>
245230
<Compile Include="..\MsgPack\MessageTypeException.cs">
246231
<Link>MessageTypeException.cs</Link>
@@ -272,6 +257,12 @@
272257
<Compile Include="..\MsgPack\PreserveAttribute.cs">
273258
<Link>PreserveAttribute.cs</Link>
274259
</Compile>
260+
<Compile Include="..\MsgPack\ReadValueResult.cs">
261+
<Link>ReadValueResult.cs</Link>
262+
</Compile>
263+
<Compile Include="..\MsgPack\ReadValueResults.cs">
264+
<Link>ReadValueResults.cs</Link>
265+
</Compile>
275266
<Compile Include="..\MsgPack\ReflectionAbstractions.cs">
276267
<Link>ReflectionAbstractions.cs</Link>
277268
</Compile>
@@ -782,12 +773,6 @@
782773
<Compile Include="..\MsgPack\SingleArrayBufferAllocator.cs">
783774
<Link>SingleArrayBufferAllocator.cs</Link>
784775
</Compile>
785-
<Compile Include="..\MsgPack\StreamUnpackerReader.cs">
786-
<Link>StreamUnpackerReader.cs</Link>
787-
</Compile>
788-
<Compile Include="..\MsgPack\StreamUnpackerReader.TypedRead.cs">
789-
<Link>StreamUnpackerReader.TypedRead.cs</Link>
790-
</Compile>
791776
<Compile Include="..\MsgPack\StringEscape.cs">
792777
<Link>StringEscape.cs</Link>
793778
</Compile>
@@ -815,12 +800,6 @@
815800
<Compile Include="..\MsgPack\UnpackerOptions.cs">
816801
<Link>UnpackerOptions.cs</Link>
817802
</Compile>
818-
<Compile Include="..\MsgPack\UnpackerReader.cs">
819-
<Link>UnpackerReader.cs</Link>
820-
</Compile>
821-
<Compile Include="..\MsgPack\UnpackerReader.TypedRead.cs">
822-
<Link>UnpackerReader.TypedRead.cs</Link>
823-
</Compile>
824803
<Compile Include="..\MsgPack\UnpackerValidationLevel.cs">
825804
<Link>UnpackerValidationLevel.cs</Link>
826805
</Compile>

src/MsgPack.Silverlight.WindowsPhone/MsgPack.Silverlight.WindowsPhone.csproj

Lines changed: 27 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,6 @@
140140
<Compile Include="..\MsgPack\ByteArrayUnpacker.cs">
141141
<Link>ByteArrayUnpacker.cs</Link>
142142
</Compile>
143-
<Compile Include="..\MsgPack\ByteArrayUnpackerReader.cs">
144-
<Link>ByteArrayUnpackerReader.cs</Link>
145-
</Compile>
146-
<Compile Include="..\MsgPack\ByteArrayUnpackerReader.TypedRead.cs">
147-
<Link>ByteArrayUnpackerReader.TypedRead.cs</Link>
148-
</Compile>
149143
<Compile Include="..\MsgPack\ByteBufferAllocator.cs">
150144
<Link>ByteBufferAllocator.cs</Link>
151145
</Compile>
@@ -158,18 +152,6 @@
158152
<Compile Include="..\MsgPack\CollectionType.cs">
159153
<Link>CollectionType.cs</Link>
160154
</Compile>
161-
<Compile Include="..\MsgPack\DefaultByteArrayUnpacker.cs">
162-
<Link>DefaultByteArrayUnpacker.cs</Link>
163-
</Compile>
164-
<Compile Include="..\MsgPack\DefaultByteArrayUnpacker.Unpacking.cs">
165-
<Link>DefaultByteArrayUnpacker.Unpacking.cs</Link>
166-
</Compile>
167-
<Compile Include="..\MsgPack\DefaultStreamUnpacker.cs">
168-
<Link>DefaultStreamUnpacker.cs</Link>
169-
</Compile>
170-
<Compile Include="..\MsgPack\DefaultStreamUnpacker.Unpacking.cs">
171-
<Link>DefaultStreamUnpacker.Unpacking.cs</Link>
172-
</Compile>
173155
<Compile Include="..\MsgPack\DictionaryDebuggerProxy`2.cs">
174156
<Link>DictionaryDebuggerProxy`2.cs</Link>
175157
</Compile>
@@ -194,12 +176,21 @@
194176
<Compile Include="..\MsgPack\IAsyncUnpackable.cs">
195177
<Link>IAsyncUnpackable.cs</Link>
196178
</Compile>
179+
<Compile Include="..\MsgPack\Int32OffsetValue`1.cs">
180+
<Link>Int32OffsetValue`1.cs</Link>
181+
</Compile>
182+
<Compile Include="..\MsgPack\Int64OffsetValue`1.cs">
183+
<Link>Int64OffsetValue`1.cs</Link>
184+
</Compile>
197185
<Compile Include="..\MsgPack\InvalidMessagePackStreamException.cs">
198186
<Link>InvalidMessagePackStreamException.cs</Link>
199187
</Compile>
200188
<Compile Include="..\MsgPack\IPackable.cs">
201189
<Link>IPackable.cs</Link>
202190
</Compile>
191+
<Compile Include="..\MsgPack\IRootUnpacker.cs">
192+
<Link>IRootUnpacker.cs</Link>
193+
</Compile>
203194
<Compile Include="..\MsgPack\IUnpackable.cs">
204195
<Link>IUnpackable.cs</Link>
205196
</Compile>
@@ -218,6 +209,12 @@
218209
<Compile Include="..\MsgPack\MessagePackByteArrayPacker.Pack.cs">
219210
<Link>MessagePackByteArrayPacker.Pack.cs</Link>
220211
</Compile>
212+
<Compile Include="..\MsgPack\MessagePackByteArrayUnpacker.cs">
213+
<Link>MessagePackByteArrayUnpacker.cs</Link>
214+
</Compile>
215+
<Compile Include="..\MsgPack\MessagePackByteArrayUnpacker.Unpack.cs">
216+
<Link>MessagePackByteArrayUnpacker.Unpack.cs</Link>
217+
</Compile>
221218
<Compile Include="..\MsgPack\MessagePackCode.cs">
222219
<Link>MessagePackCode.cs</Link>
223220
</Compile>
@@ -260,26 +257,14 @@
260257
<Compile Include="..\MsgPack\MessagePackStreamPacker.Pack.cs">
261258
<Link>MessagePackStreamPacker.Pack.cs</Link>
262259
</Compile>
263-
<Compile Include="..\MsgPack\MessagePackString.cs">
264-
<Link>MessagePackString.cs</Link>
260+
<Compile Include="..\MsgPack\MessagePackStreamUnpacker.cs">
261+
<Link>MessagePackStreamUnpacker.cs</Link>
265262
</Compile>
266-
<Compile Include="..\MsgPack\MessagePackUnpacker.cs">
267-
<Link>MessagePackUnpacker.cs</Link>
263+
<Compile Include="..\MsgPack\MessagePackStreamUnpacker.Unpack.cs">
264+
<Link>MessagePackStreamUnpacker.Unpack.cs</Link>
268265
</Compile>
269-
<Compile Include="..\MsgPack\MessagePackUnpacker.Read.cs">
270-
<Link>MessagePackUnpacker.Read.cs</Link>
271-
</Compile>
272-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.cs">
273-
<Link>MessagePackUnpacker`1.cs</Link>
274-
</Compile>
275-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.Read.cs">
276-
<Link>MessagePackUnpacker`1.Read.cs</Link>
277-
</Compile>
278-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.Skipping.cs">
279-
<Link>MessagePackUnpacker`1.Skipping.cs</Link>
280-
</Compile>
281-
<Compile Include="..\MsgPack\MessagePackUnpacker`1.Unpacking.cs">
282-
<Link>MessagePackUnpacker`1.Unpacking.cs</Link>
266+
<Compile Include="..\MsgPack\MessagePackString.cs">
267+
<Link>MessagePackString.cs</Link>
283268
</Compile>
284269
<Compile Include="..\MsgPack\MessageTypeException.cs">
285270
<Link>MessageTypeException.cs</Link>
@@ -311,6 +296,12 @@
311296
<Compile Include="..\MsgPack\PreserveAttribute.cs">
312297
<Link>PreserveAttribute.cs</Link>
313298
</Compile>
299+
<Compile Include="..\MsgPack\ReadValueResult.cs">
300+
<Link>ReadValueResult.cs</Link>
301+
</Compile>
302+
<Compile Include="..\MsgPack\ReadValueResults.cs">
303+
<Link>ReadValueResults.cs</Link>
304+
</Compile>
314305
<Compile Include="..\MsgPack\ReflectionAbstractions.cs">
315306
<Link>ReflectionAbstractions.cs</Link>
316307
</Compile>
@@ -830,12 +821,6 @@
830821
<Compile Include="..\MsgPack\SingleArrayBufferAllocator.cs">
831822
<Link>SingleArrayBufferAllocator.cs</Link>
832823
</Compile>
833-
<Compile Include="..\MsgPack\StreamUnpackerReader.cs">
834-
<Link>StreamUnpackerReader.cs</Link>
835-
</Compile>
836-
<Compile Include="..\MsgPack\StreamUnpackerReader.TypedRead.cs">
837-
<Link>StreamUnpackerReader.TypedRead.cs</Link>
838-
</Compile>
839824
<Compile Include="..\MsgPack\StringEscape.cs">
840825
<Link>StringEscape.cs</Link>
841826
</Compile>
@@ -863,12 +848,6 @@
863848
<Compile Include="..\MsgPack\UnpackerOptions.cs">
864849
<Link>UnpackerOptions.cs</Link>
865850
</Compile>
866-
<Compile Include="..\MsgPack\UnpackerReader.cs">
867-
<Link>UnpackerReader.cs</Link>
868-
</Compile>
869-
<Compile Include="..\MsgPack\UnpackerReader.TypedRead.cs">
870-
<Link>UnpackerReader.TypedRead.cs</Link>
871-
</Compile>
872851
<Compile Include="..\MsgPack\UnpackerValidationLevel.cs">
873852
<Link>UnpackerValidationLevel.cs</Link>
874853
</Compile>

0 commit comments

Comments
 (0)