mozilla-spidermonkey / jsparagus

Experimental JS parser-generator project.
Other
439 stars 20 forks source link

Update opcodes for bug 1730843 #652

Closed arai-a closed 2 years ago

arai-a commented 2 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1730843 modified Opcodes.h, with extra macro to conditionally enable those opcodes for Record and Tuple.

there are 2 places that reads Opcodes.h, m-c/js/src/vm/jsopcode.py and jsparagus/update_stencil.py.

m-c/js/src/vm/jsopcode.py's pattern ignores the extra macro, and those opcodes are included in the return value. jsparagus/update_stencil.py's pattern filtered out the opcodes with extra macro. So that results in inconsistency, and the first patch here fixes it by filtering out Record and Tuple opcodes from the value returned from m-c/js/src/vm/jsopcode.py. (eventually we could drop the code that parses Opcodes.h from jsparagus/update_stencil.py, but that's for other bug)