зеркало из https://github.com/mozilla/gecko-dev.git
70509cb3c2
This commit switches the representation of PackedType (and therefore ValType/FieldType) to use a *TypeDef instead of type index. There are several changes here: 1. PackedTypeCode is always 64-bits now to pack the pointer. This penalizes 32-bit platforms, but we likely don't care about them enough to try to optimize this. 2. RefType::TypeIndex is RefType::TypeRef 3. RefType::typeIndex() is RefType::typeDef() 4. TypeContext now stores a map from *TypeDef to original type index for printing errors 5. Decoding a RefType now stores a *TypeDef instead of type index 6. We now just transfer the SharedTypeContext from ModuleEnvironment to Metadata instead of copying definitions. This is needed for sharing the indexOf map. 7. We now manually serialize/deserialize TypeContext 8. TypeContext now stores SharedTypeDef in vector instead of TypeDef, this is needed so that *TypeDef is not invalidated across resizing the vector (asm.js does this) 9. The initialization of TypeContext is refactored to keep the indexOf map in-sync with adding new types (asm.js needs this) 10. We now manually serialize/deserialize PackedTypeCode using a new SerializedTypeCode 11. Serialization now needs a TypeContext in order to get the index of type definitions 12. Deserialization now constructs a TypeContext, and uses that when deserializing ValType/RefType/FieldType Differential Revision: https://phabricator.services.mozilla.com/D157387 |
||
---|---|---|
.. | ||
examples | ||
loader | ||
public | ||
src | ||
xpconnect | ||
app.mozbuild | ||
ffi.configure | ||
moz.build | ||
moz.configure | ||
sub.configure |