Module equiv
Source and binary equivalency comparisons
Notes:
- Intended as an extra safety check for mission-critical code, should give affirmative results if everything works.
- Heavy on load() and string.dump(), which may be slowish, and may cause problems for cross-compiled applications.
- Optional detailed information dump is mainly for debugging, reason being, if the two are not equivalent when they should be, then some form of optimization has failed.
- source: IMPORTANT: TK_NAME not compared if opt-locals enabled.
- binary: IMPORTANT: Some shortcuts are taken with int and size_t value reading -- if the functions break, then the binary chunk is very large indeed.
- binary: There is a lack of diagnostic information when a compare fails; you can use ChunkSpy and compare using visual diff.
Functions
init (_option, _llex, _warn) | The initialization function. |
binary (z, dat) | Tests binary chunk equivalence (only for PUC Lua 5.1). |
Local Functions
build_stream (s) | Builds lists containing a 'normal' lexer stream. |
Functions
- init (_option, _llex, _warn)
-
The initialization function.
Parameters:
- _option {[string]=bool,...}
- _llex luasrcdiet.llex
- _warn table
- binary (z, dat)
-
Tests binary chunk equivalence (only for PUC Lua 5.1).
Parameters: