RESOLVED FIXED169293
Revert changes in bug#160417 about extending `null` not being a derived class
https://bugs.webkit.org/show_bug.cgi?id=169293
Summary Revert changes in bug#160417 about extending `null` not being a derived class
Saam Barati
Reported 2017-03-07 11:01:34 PST
Attachments
Patch (4.80 KB, patch)
2017-06-15 02:08 PDT, GSkachkov
no flags
Patch (19.75 KB, patch)
2017-06-18 09:19 PDT, GSkachkov
no flags
Radar WebKit Bug Importer
Comment 1 2017-06-13 13:21:16 PDT
GSkachkov
Comment 2 2017-06-15 02:08:02 PDT
Created attachment 312963 [details] Patch Patch
Saam Barati
Comment 3 2017-06-15 13:14:11 PDT
Comment on attachment 312963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=312963&action=review > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:-3765 > - Ref<Label> superclassIsNullLabel = generator.newLabel(); > - Ref<Label> done = generator.newLabel(); > - > - generator.emitJumpIfTrue(generator.emitUnaryOp(op_eq_null, tempRegister.get(), superclass.get()), superclassIsNullLabel.get()); > generator.emitNewDefaultConstructor(constructor.get(), ConstructorKind::Extends, m_name, ecmaName(), m_classSource); > generator.emitLoad(tempRegister.get(), jsBoolean(true)); > - generator.emitJump(done.get()); > - generator.emitLabel(superclassIsNullLabel.get()); > - generator.emitNewDefaultConstructor(constructor.get(), ConstructorKind::Base, m_name, ecmaName(), m_classSource); > - generator.emitLoad(tempRegister.get(), jsBoolean(false)); > - generator.emitLabel(done.get()); Lets move back to determining this property statically. There is no need for a putById here, since it's always true! Also, things that get this property should also be able to determine its value statically.
Saam Barati
Comment 4 2017-06-15 13:15:42 PDT
Comment on attachment 312963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=312963&action=review >> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:-3765 >> - generator.emitLabel(done.get()); > > Lets move back to determining this property statically. There is no need for a putById here, since it's always true! Also, things that get this property should also be able to determine its value statically. Also, there is the case above you didn't change. Perhaps we don't have tests for this. Please add them if this is true.
GSkachkov
Comment 5 2017-06-18 09:19:41 PDT
Created attachment 313228 [details] Patch Patch with fixes
Saam Barati
Comment 6 2017-06-19 11:57:02 PDT
Comment on attachment 313228 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=313228&action=review > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3745 > + constructor = generator.emitNewDefaultConstructor(generator.finalDestination(dst), m_classHeritage ? ConstructorKind::Extends : ConstructorKind::Base, m_name, ecmaName(), m_classSource); style nit: no braces around "else" since this is just one line now
GSkachkov
Comment 7 2017-06-20 03:29:55 PDT
Issue is closed. Patch landed by r218581 commit.
Note You need to log in before you can comment on or make changes to this bug.