nodejs / llparse

Generating parsers in LLVM IR
http://llparse.org
Other
584 stars 30 forks source link

src: pack struct by sorting fields #36

Open fanatid opened 4 years ago

fanatid commented 4 years ago

Issue #35 Decide just drop code, interesting thing.

Fields in struct same, but by some cases errors on tests. Currently do not know llparse too good for say why :thinking:

btw, should not i8/i16/i32/i64 be u8/u16/u32/u64?

fanatid commented 4 years ago

Sorry, I do not think that I understand. I should change something in bitcode for fixing tests?

indutny commented 4 years ago

Not in the tests. The order of fields has to be changed in the bitcode generator.

fanatid commented 4 years ago

Thank you. I see that I also need change fields in bitcode / js: https://github.com/nodejs/llparse/blob/564e5c4363d95cc14bdadb27d165082f0f3e09f0/src/implementation/bitcode/compilation.ts#L124 https://github.com/nodejs/llparse/blob/564e5c4363d95cc14bdadb27d165082f0f3e09f0/src/implementation/js/index.ts#L47

indutny commented 4 years ago

Well, maybe not in JS, but you got it right!

fanatid commented 4 years ago

I fixed code for bitcode.