What tag does LBC_TYPE_TAGGED_USERDATA_BASE
map to?
#1885
-
It would make sense for it to map to 0 or 1, so I'm wondering which it actually is. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In the compilation options, you specify the array of userdata type names that you wish to detect later in CodeGen lowering. From the compilation options struct:
Example use:
Later, you provide a re-mapper to provide type indices you need at runtime using This mapping is separate from the actual userdata tags used at runtime, you can still have In this example and if we imagine that
|
Beta Was this translation helpful? Give feedback.
In the compilation options, you specify the array of userdata type names that you wish to detect later in CodeGen lowering.
From the compilation options struct:
Example use:
Later, you provide a re-mapper to provide type indices you need at runtime using
Luau::CodeGen::setUserdataRemapper
.This is needed because bytecode and runtime might be out of sync (runtime optimizing for new types that bytecode wasn't compiled for or the other way around).