Closed Bug 1335886 Opened 8 years ago Closed 8 years ago

Remove vestigial symtab property on nodes in IPDL type checker

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

The type checker adds "symtab" properties to nodes that it calls enterScope() on, which are a frame of the symbol table. However, this is only ever used to detect recursive loops. Getting rid of this makes it clearer how symbol tables are actually used (namely, there is only one ever live at any given time). As an additional minor cleanup, the symtab property is used on GatherDecls but not CheckTypes, and is always initially null.
My testing here was limited to making sure that the tree built after every change set. I'm pretty sure they also did not change the generated code.
Comment on attachment 8832623 [details] Bug 1335886, part 1 - Set symtab on GatherDecls instead of TcheckVisitor. https://reviewboard.mozilla.org/r/108804/#review110438 ::: ipc/ipdl/ipdl/type.py:539 (Diff revision 1) > def declare(self, loc, type, shortname=None, fullname=None, progname=None): > d = Decl(loc) > d.type = type > d.progname = progname > d.shortname = shortname > d.fullname = fullname > self.symtab.declare(d) > return d Can you move this method to GatherDecls since it's only used there?
Attachment #8832623 - Flags: review?(wmccloskey) → review+
Comment on attachment 8832624 [details] Bug 1335886, part 2 - Nodes never have existing symbol tables in enterScope. https://reviewboard.mozilla.org/r/108806/#review110442
Attachment #8832624 - Flags: review?(wmccloskey) → review+
Comment on attachment 8832625 [details] Bug 1335886, part 3 - Don't use symtab property to avoid infinite recursion. https://reviewboard.mozilla.org/r/108808/#review110444
Attachment #8832625 - Flags: review?(wmccloskey) → review+
Comment on attachment 8832626 [details] Bug 1335886, part 4 - Remove the unused node arg to {enter,exit}Scope. https://reviewboard.mozilla.org/r/108810/#review110446
Attachment #8832626 - Flags: review?(wmccloskey) → review+
(In reply to Bill McCloskey (:billm) from comment #6) > Can you move this method to GatherDecls since it's only used there? Good point. I'll do that.
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b3dc3434f7a7 part 1 - Set symtab on GatherDecls instead of TcheckVisitor. r=billm https://hg.mozilla.org/integration/autoland/rev/fb72e2cea50f part 2 - Nodes never have existing symbol tables in enterScope. r=billm https://hg.mozilla.org/integration/autoland/rev/3abddeffa872 part 3 - Don't use symtab property to avoid infinite recursion. r=billm https://hg.mozilla.org/integration/autoland/rev/b66afe0be0f9 part 4 - Remove the unused node arg to {enter,exit}Scope. r=billm
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: