Closed Bug 853178 Opened 11 years ago Closed 11 years ago

Remove all SRC_PCDELTA source notes except on JSOP_CASE opcodes

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(1 file, 1 obsolete file)

and rename SRC_PCDELTA to SRC_NEXTCASE.
Attached patch v1 (obsolete) — Splinter Review
Assignee: general → jorendorff
Attachment #728108 - Flags: review?(n.nethercote)
Comment on attachment 728108 [details] [diff] [review]
v1

Review of attachment 728108 [details] [diff] [review]:
-----------------------------------------------------------------

Saving source code has really led to a never-ending stream of goodness, hasn't it?

This is great, except I can't see in this patch where SRC_NEXTCASE is used!  (Except for the case in shell/js.cpp, but that doesn't count.)  But looking at the codebase, I do see this line in IonBuilder.cpp, which you haven't changed:

    JS_ASSERT(caseSn && SN_TYPE(caseSn) == SRC_PCDELTA);

Are you building with --disable-ion?  And since the only place it's used is an assertion do we really need it?  I say just get rid of it completely.  So, f+ for now...
Attachment #728108 - Flags: review?(n.nethercote) → feedback+
(In reply to Nicholas Nethercote [:njn] from comment #2)
> at the codebase, I do see this line in IonBuilder.cpp, which you haven't
> changed:
> 
>     JS_ASSERT(caseSn && SN_TYPE(caseSn) == SRC_PCDELTA);

D'oh. This should've been changed too, of course; I think I accidentally qrecorded it into another patch somewhere.

> [...] And since the only place it's used is
> an assertion do we really need it?  I say just get rid of it completely. 

I think we should keep it for now. Ion uses the data in the source note, and every source note has a type.

Ideally we eventually stop using bytecode and then it'll go away. ;)
Attached patch v2Splinter Review
Attachment #728108 - Attachment is obsolete: true
Attachment #729051 - Flags: review?(n.nethercote)
Comment on attachment 729051 [details] [diff] [review]
v2

Review of attachment 729051 [details] [diff] [review]:
-----------------------------------------------------------------

Oh, I missed the post-assertion use in IonBuilder.cpp.  Looks good, thanks.
Attachment #729051 - Flags: review?(n.nethercote) → review+
https://hg.mozilla.org/mozilla-central/rev/bfc2073bcf31
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: