Closed Bug 336373 (js1.7) Opened 18 years ago Closed 18 years ago

JS1.7 tracking bug

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: brendan, Assigned: brendan)

References

Details

(Keywords: fixed1.8.1)

Attachments

(6 files, 3 obsolete files)

JS1.7 for Gecko 1.8.1 / Firefox 2 consists of JS1.6 plus:

- iterators, generators, array comprehensions (bug 326466)
- removal of reserved identifiers in property identifiers (to be filed)
- let bindings, blocks, and expressions (to be filed)
- generalized destructuring assignment (to be filed)

Much of the infrastructure for blocks is already done for array comprehensions.  Full Python 2.5 generator support requires unreserving identifiers in property identifier contexts (after . and .. and in object initialisers).

/be
Status: NEW → ASSIGNED
Priority: -- → P1
Depends on: 336376
Alias: js1.7
Depends on: js1.7let
Depends on: 336379
I've created a JS_1_7_ALPHA_BRANCH to share work tracked by this bug, and landed the latest patch for bug 326466 there.

/be
JS_1_7_ALPHA_BRANCH has Pythonic iteration and generators (not yet Python 2.5 like ones), and unreserved identifiers in property name positions. Destructuring next, blocks (let statements and expressions) next.  If you want to help test, just update your trunk tree to the tip, then cvs up -rJS_1_7_ALPHA_BRANCH js/src and you should be able to build and run.

/be
I get a link error when I try to build the debug shell:

js.obj : error LNK2019: unresolved external symbol _js_ValueToString referenced
in function _DumpScope

Replacing js_ValueToString with JS_ValueToString in the #define js_ValueToPrintableString(cx,v) line in jsstr.h seems to work.
(In reply to comment #3)
> I get a link error when I try to build the debug shell:
> 
> js.obj : error LNK2019: unresolved external symbol _js_ValueToString referenced
> in function _DumpScope
> 
> Replacing js_ValueToString with JS_ValueToString in the #define
> js_ValueToPrintableString(cx,v) line in jsstr.h seems to work.

Odd: the JS_FRIEND_API should have done the trick.  Oh, but it looks like the #define js_ValueToPrintableString in jsstr.h was not seen when you compiled js.c last time -- so this is a case of missing Makefile.ref dependencies.

Can you verify by cleaning and recompiling?

/be

> 

I tried both make clean and deleting the object directory, it didn't make a difference, I still get the same linking error. But marking js_ValueToString as a JS_FRIEND_API works.
Sorry, fixed now on the JS_1_7_ALPHA_BRANCH:

/cvsroot/mozilla/js/src/jsstr.c,v  <--  jsstr.c
new revision: 3.128.2.2; previous revision: 3.128.2.1
done
Checking in jsstr.h;
/cvsroot/mozilla/js/src/jsstr.h,v  <--  jsstr.h
new revision: 3.30.4.2; previous revision: 3.30.4.1
done

Anyone who wants to fix bug 97954, please do.  This would unify standalone and in-Gecko-apps build systems, and give us dependencies in the bargain.

/be
Fixed a bug pointed out by mrbkap:

$ cvs ci -m"JSCLASS_IS_ANONYMOUS depends on global object's class being flagged." jsapi.c 
Checking in jsapi.c;
/cvsroot/mozilla/js/src/jsapi.c,v  <--  jsapi.c
new revision: 3.263.2.3; previous revision: 3.263.2.2
done

/be
Have these new features been tested with WAY_TOO_MUCH_GC?  If there are tests in the test suite for all of them, I could try running it at some point soon, or somebody else could.
Depends on: 340036
Depends on: 340340
Could we add bug 340987 and 307795 to this?
(In reply to comment #9)
> Could we add bug 340987 and 307795 to this?

Given that JS1.7 is going to be in Gecko 1.8, I don't think that there's time to implement these features. Brendan's on vacation, leaving me (with some help) to merge in the JS1.7 changes to the branch, and finish the remaining features. At this point, I'm not even sure that drivers would accept the additional features.
Depends on: 341300
Attachment #228172 - Flags: review?(mrbkap)
Attached patch roll-up patch, v2 (obsolete) — — Splinter Review
Fix function-def vs. -stmt opcode selection.  This should be more ready to pass the js testsuite!

/be
Attachment #228205 - Flags: review?(mrbkap)
Attached patch roll-up patch, v3 (obsolete) — — Splinter Review
With late-breaking leak fix from mrbkap and me to regression from patch for bug 331456 (see bug 331456 comment 17).

/be
Attachment #228212 - Flags: review?(mrbkap)
Attached patch roll-up patch, v4 — — Splinter Review
Attachment #228172 - Attachment is obsolete: true
Attachment #228205 - Attachment is obsolete: true
Attachment #228212 - Attachment is obsolete: true
Attachment #228239 - Flags: review?(mrbkap)
Attachment #228172 - Flags: review?(mrbkap)
Attachment #228205 - Flags: review?(mrbkap)
Attachment #228212 - Flags: review?(mrbkap)
Comment on attachment 228239 [details] [diff] [review]
roll-up patch, v4

Looks good...
Attachment #228239 - Flags: review?(mrbkap) → review+
Comment on attachment 228239 [details] [diff] [review]
roll-up patch, v4

Landed on the trunk, which now matches the JS_1_7_ALPHA_BRANCH.  I hope to avoid using that branch ever again, and just update trunk and MOZILLA_1_8_BRANCH.

/be
Flags: blocking1.8.1+
Target Milestone: mozilla1.8.1alpha1 → mozilla1.8.1beta1
Depends on: 343708
Attachment #228312 - Flags: superreview?(shaver)
Attachment #228312 - Flags: review?(mrbkap)
Comment on attachment 228312 [details] [diff] [review]
MOZILLA_1_8_BRANCH API compatibility

sr=shaver, thanks!
Attachment #228312 - Flags: superreview?(shaver) → superreview+
Attachment #228312 - Flags: review?(mrbkap) → review+
Comment on attachment 228312 [details] [diff] [review]
MOZILLA_1_8_BRANCH API compatibility

Checked into the trunk.

Now to gather a bunch of cvs up -j commands via bonsai....

/be
This is needed because bz already kept API compat in his patch for bug 337095, which gavin landed on the 1.8 branch on 6/15.

I'm checking it into the trunk with rs=me; diffing trunk and 1.8 branch after the checkin shows the goodness.

/be
And to assert in jsparse.c and remove a uses TCF_FUN_USES_NONLOCALS test (note well, shaver!).

/be
Attachment #228380 - Flags: superreview?(shaver)
Attachment #228380 - Flags: review?(mrbkap)
Attachment #228380 - Flags: review?(mrbkap) → review+
This is the patch that I just checked in (bzip'd, it was too big to attach normally).
Comment on attachment 228383 [details]
Final patch (checked in, bzipped)

(the title was wrong, gzip wasn't good enough)
Attachment #228383 - Attachment description: Final patch (checked in, gzipped) → Final patch (checked in, bzipped)
(In reply to comment #22)
> Created an attachment (id=228383) [edit]
> Final patch (checked in, gzipped)
> 
> This is the patch that I just checked in (bzip'd, it was too big to attach
> normally).

That was checked into the MOZILLA_1_8_BRANCH.

This bug stays open to track followup items and known unfinished work.

/be
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Oops.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
This bug deoptimizes string method calls, requiring conversion ToObject (wrapping primitive string in String object).  It's sufficient, even though the trunk uses orthogonal bits for the JSFUN_THISP_{STRING,NUMBER,BOOLEAN} flags, to treat the union JSFUN_THISP_PRIMITIVE as a special case, and not try to find more bits for the 1.8 branch (there aren't any).

/be
Attachment #228394 - Flags: superreview?(shaver)
Attachment #228394 - Flags: review?(mrbkap)
Attachment #228394 - Flags: review?(mrbkap) → review+
Comment on attachment 228394 [details] [diff] [review]
followup patch to fix another bit-magic botch (again in the MOZILLA_1_8_BRANCH compat fork)

Checked in on the trunk and 1.8 branch, to keep the src in sync and fix the branch.

/be
Blocks: 343984
Depends on: 344455
Depends on: 344830
Depends on: 344873
Depends on: 344214
Depends on: 345736
Should this be FIXED and marked fixed1.8.1? Any reason we're leaving it open?
(In reply to comment #29)
> Should this be FIXED and marked fixed1.8.1? Any reason we're leaving it open?

See comment 24 and the unfixed dependencies.  Patches coming, don't fret! :-)

/be
Depends on: 345879
Depends on: 345772
Depends on: 345922
Depends on: 344711
Depends on: 346029
Depends on: 346144
Depends on: 346450
Depends on: 346773
Depends on: 347739
Depends on: 348696
Target Milestone: mozilla1.8.1beta1 → mozilla1.8.1
Depends on: 349596
Depends on: 349634
Depends on: 349663
Depends on: 349956
Depends on: 349648
Depends on: 350670
Depends on: 351515
Depends on: 350238
Depends on: 351602
Depends on: 347065
Be - should we remove the 181 blocking flag or kill the dep bugs and mark this as Fixed?   
If you can stand it for a little while longer, leave the dependencies.  This will be marked fixed1.8.1 and closed later today, especially if mrbkap surfaces.

/be
Ok.  I'll try and keep my "must close all bugs" fixation in check for a little while longer :-).
All but done.  I'll double-check the dependency tree in a minute.

/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Flags: in-testsuite-
Blocks: 379381
Blocks: 380901
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: