Closed Bug 695097 Opened 14 years ago Closed 14 years ago

Split up frontend/Parser.{h,cpp}

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

Attachments

(1 file)

This breaks out three smallish parts of frontend/Parser.{h,cpp}: - BytecodeCompiler.{h,cpp} (the facade, js::Compiler) - ParseNode.{h,cpp} (AST stuff: JSParseNode, JSDefinition, etc.) - FoldConstants.{h,cpp} (js_FoldConstants) Later, I'll rename the classes and functions into alignment with the filenames. It's BytecodeCompiler.h rather than Compiler.h because we already have js/src/methodjit/Compiler.h.
Attached patch v1Splinter Review
I used "hg cp Parser.cpp ..." so that history is preserved and the patch consists mostly of - lines with very few + lines. Unfortunately that makes the patch super fragile. I made the patch based on some other patches in progress, so (I just realized) it almost certainly won't apply against tip. :-P If you'd like one that does, that's ok -- I'll be producing one today anyway. But I think this is reviewable as-is.
Assignee: general → jorendorff
Attachment #567529 - Flags: review?(luke)
Comment on attachment 567529 [details] [diff] [review] v1 I agree with your high-level goal and using cp to preserve history. My one request is that you update the #includes to match the style: https://wiki.mozilla.org/JavaScript:SpiderMonkey:C%2B%2B_Coding_Style#Includes.
Attachment #567529 - Flags: review?(luke) → review+
Requires this follow-up: https://hg.mozilla.org/integration/mozilla-inbound/rev/9e3f7294169d Otherwise you get "Symbol undefined" linker errors. The -inl.h file contains the definition of the relevant template, so you need it in order to instantiate the method. It worked fine in my local DEBUG builds because there is DEBUG-only code in other files that instantiates the same method. I'm not sure why it failed to link in the "debug" builds on the tinderboxen, but I noticed that we are passing both --enable-debug and --enable-optimize to configure.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: