Closed
Bug 880575
Opened 11 years ago
Closed 11 years ago
Factor the JS shell's repl into a few functions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
Attachments
(5 files)
6.98 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
3.54 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
3.33 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
4.34 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
5.88 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
Who knows, maybe if the code is readable enough someone will take bug 480198. :)
Assignee | ||
Comment 1•11 years ago
|
||
This comes in five patches, all of them pretty trivial.
Assignee: general → jorendorff
Attachment #759597 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #759598 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #759599 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #759600 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #759601 -
Flags: review?(jwalden+bmo)
Comment 6•11 years ago
|
||
Comment on attachment 759597 [details] [diff] [review] Part 1 - Factor out ReadEvalPrintLoop, v1 Review of attachment 759597 [details] [diff] [review]: ----------------------------------------------------------------- I don't care where the style nits get fixed in this patch stack, just fix them by the end. :-) I'm noting 'em as I see 'em. ::: js/src/shell/js.cpp @@ +528,5 @@ > free(buffer); > fprintf(gOutFile, "\n"); > +} > + > +class AutoCloseInputFile { { on new line. @@ +533,5 @@ > + private: > + FILE *f_; > + public: > + explicit AutoCloseInputFile(FILE *f) : f_(f) {} > + ~AutoCloseInputFile() { if (f_ && f_ != stdin) fclose(f_); } I'd rather see this in multiple lines, honestly. @@ +566,5 @@ > + * hack, and gobble the first line if it starts with '#'. > + */ > + int ch = fgetc(file); > + if (ch == '#') { > + while((ch = fgetc(file)) != EOF) { Space after while.
Attachment #759597 -
Flags: review?(jwalden+bmo) → review+
Updated•11 years ago
|
Attachment #759598 -
Flags: review?(jwalden+bmo) → review+
Updated•11 years ago
|
Attachment #759599 -
Flags: review?(jwalden+bmo) → review+
Updated•11 years ago
|
Attachment #759600 -
Flags: review?(jwalden+bmo) → review+
Updated•11 years ago
|
Attachment #759601 -
Flags: review?(jwalden+bmo) → review+
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/df75bae8a436 https://hg.mozilla.org/mozilla-central/rev/42975d6638db https://hg.mozilla.org/mozilla-central/rev/d496b277486d https://hg.mozilla.org/mozilla-central/rev/abeb26888062 https://hg.mozilla.org/mozilla-central/rev/efe5d05176dc
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•