зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1763103 - Part 4: Only initialise home object for private instance accessors when neeeded. r=arai
Private instance accessors were always initialising the home object, even when `needsHomeObject()` was `false`. Depends on D142931 Differential Revision: https://phabricator.services.mozilla.com/D142932
This commit is contained in:
Родитель
47c3eea2cb
Коммит
4d5a126c0f
|
@ -9862,11 +9862,13 @@ bool BytecodeEmitter::emitPrivateMethodInitializers(ClassEmitter& ce,
|
|||
}
|
||||
// The private method body needs to access the home object,
|
||||
// and the CE knows where that is on the stack.
|
||||
if (!ce.emitMemberInitializerHomeObject(false)) {
|
||||
// [stack] HOMEOBJ HERITAGE? ARRAY METHOD
|
||||
// or:
|
||||
// [stack] CTOR HOMEOBJ ARRAY METHOD
|
||||
return false;
|
||||
if (classMethod->method().funbox()->needsHomeObject()) {
|
||||
if (!ce.emitMemberInitializerHomeObject(false)) {
|
||||
// [stack] HOMEOBJ HERITAGE? ARRAY METHOD
|
||||
// or:
|
||||
// [stack] CTOR HOMEOBJ ARRAY METHOD
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!emitLexicalInitialization(storedMethodAtom)) {
|
||||
// [stack] HOMEOBJ HERITAGE? ARRAY METHOD
|
||||
|
|
Загрузка…
Ссылка в новой задаче