Last Comment Bug 695549 - Rename everything in the front end
: Rename everything in the front end
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86 Mac OS X
: -- normal (vote)
: mozilla10
Assigned To: Jason Orendorff [:jorendorff]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-18 16:00 PDT by Jason Orendorff [:jorendorff]
Modified: 2011-10-20 03:08 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part 1, rename types and put enums into namespace js - v1 (465.00 KB, patch)
2011-10-18 16:12 PDT, Jason Orendorff [:jorendorff]
luke: review+
Details | Diff | Splinter Review
Part 2, move emitter global functions into namespace js::frontend - v1 (208.96 KB, patch)
2011-10-18 16:33 PDT, Jason Orendorff [:jorendorff]
luke: review+
Details | Diff | Splinter Review
Part 3, move tokenizer global functions into namespace js (14.06 KB, patch)
2011-10-18 16:36 PDT, Jason Orendorff [:jorendorff]
luke: review+
Details | Diff | Splinter Review
Part 4, rename js::Compiler to js::BytecodeCompiler (37.86 KB, patch)
2011-10-18 16:40 PDT, Jason Orendorff [:jorendorff]
luke: review+
Details | Diff | Splinter Review

Description Jason Orendorff [:jorendorff] 2011-10-18 16:00:49 PDT
The front end is old. It has a lot of names like JSParseNode and JSStmtInfo that should be js::ParseNode and js::StmtInfo.
Comment 1 Jason Orendorff [:jorendorff] 2011-10-18 16:12:17 PDT
Created attachment 567919 [details] [diff] [review]
Part 1, rename types and put enums into namespace js - v1
Comment 2 Jason Orendorff [:jorendorff] 2011-10-18 16:33:18 PDT
Created attachment 567925 [details] [diff] [review]
Part 2, move emitter global functions into namespace js::frontend - v1

js_PopStatement became js::frontend::PopStatementTC rather than js::frontend::PopStatement, because there is already a function named PopStatement, and that one is actually called rather more than this one.
Comment 3 Jason Orendorff [:jorendorff] 2011-10-18 16:36:29 PDT
Created attachment 567926 [details] [diff] [review]
Part 3, move tokenizer global functions into namespace js

It is subjective whether js or js::frontend is better. These functions (at least js_IsIdentifier) actually are used outside of the frontend/ subdirectory.
Comment 4 Jason Orendorff [:jorendorff] 2011-10-18 16:40:40 PDT
Created attachment 567929 [details] [diff] [review]
Part 4, rename js::Compiler to js::BytecodeCompiler

Elective surgery. I want to rename it to match the filename. (methodjit has a class js::mjit::Compiler. No collision.)

While I was in here I grepped for places where the old filenames jsscan, jsparse, jsemit were still used, so this patch fixes several of those (and deletes some bafflingly ancient super-dead code).
Comment 5 Luke Wagner [:luke] 2011-10-18 17:21:28 PDT
Comment on attachment 567919 [details] [diff] [review]
Part 1, rename types and put enums into namespace js - v1

I like it all.

Note You need to log in before you can comment on or make changes to this bug.