3 ms·
Just declare a C union of an int, float, string, etc. All functions take these unions as function parameters. Have one field be an enum of its actual type. Or
by randyrand 11y ago
Just declare a C union of an int, float, string, etc. All functions take these unions as function parameters.
Have one field be an enum of its actual type. Or something along these lines.
I don't see why this is any more difficult than a normal jit that also doesnt have type information.
- comex 11y agoBecause JITs are able to generate code that optimistically assumes variables have certain types (with appropriate deoptimization checks), which is much less expensive than performing full dynamic lookups on every single operation.