Handle fields in derived classes

RESOLVED FIXED in Firefox 68

Status

()

enhancement
P1
normal
RESOLVED FIXED
4 months ago
2 months ago

People

(Reporter: khyperia, Assigned: khyperia)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 wontfix, firefox68 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

4 months ago

Currently, fields in derived classes are just entirely broken. Let's fix that.

Priority: -- → P1
Assignee

Updated

4 months ago
Blocks: es-fields

Leaving a note, because I'm not quite ready to review this patch yet.

Three sanity tests to put in the test suite:

class Base {
}
class C extends Base {
  field;
}
new C();

$ $DJS --enable-experimental-fields ../../../../crasher.js
Assertion failure: (activation.regs()).stackDepth() == 0 || (*(activation.regs()).pc == JSOP_AWAIT && !(activation.regs()).fp()->isResumedGenerator()), at /Users/jorendorff/work/gecko/js/src/vm/Interpreter.cpp:2127
class Base {
}
var C = class extends Base {
  field;
};
new C();

$ $DJS --enable-experimental-fields ../../../../crasher.js
Assertion failure: env == cx->global() || env == &cx->global()->lexicalEnvironment() || env->is<RuntimeLexicalErrorObject>(), at /Users/jorendorff/work/gecko/js/src/vm/Interpreter-inl.h:315
class Base {
}
class C extends Base {
  field;
  constructor() {
    super();
  }
};
new C();

$ $DJS --enable-experimental-fields ../../../../crasher.js
Assertion failure: next == JSOP_CHECKTHIS || next == JSOP_CHECKRETURN || next == JSOP_CHECKTHISREINIT, at /Users/jorendorff/work/gecko/js/src/vm/Interpreter.cpp:3520

Comment 3

3 months ago
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/048424eb3075
Handle fields in derived classes. r=jorendorff

Comment 5

3 months ago
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed722cf1b2d9
Handle fields in derived classes. r=jorendorff

Comment 6

3 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee

Updated

3 months ago
Flags: needinfo?(khyperia)
You need to log in before you can comment on or make changes to this bug.