polserver/testsuite/escript/parity
Eric Swanson a1a15f708d
OG compiler: set module to Mod_Basic when a token is an identifier (#257)
The OG compiler looks up function ids for most tokens, even when it doesn't need to. When this happens, it assigns the module id as the module of the function.

When the token is later found not to be a function call, the parser changes the id to TOK_IDENT and the type to TYP_OPERAND, but leaves the module id.

We can see this in the included script, which adds members, which have names that match module function names, to a struct.

This doesn't cause problems during execution because the executor ignores the type for the emitted instructions.

It does cause problems when comparing .ecl output for parity between the old compiler and the new compiler, because the new compiler does not look up every identifier to see if it's a function.

This change assigns module = Mod_Basic along with id and type for tokens that are identifiers.
2020-08-30 01:47:24 -07:00
..
parity001-identifier-module.out OG compiler: set module to Mod_Basic when a token is an identifier (#257) 2020-08-30 01:47:24 -07:00
parity001-identifier-module.src OG compiler: set module to Mod_Basic when a token is an identifier (#257) 2020-08-30 01:47:24 -07:00