WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 209158
AccessCase::canReplace should allow a Getter to replace an IntrinsicGetter
https://bugs.webkit.org/show_bug.cgi?id=209158
Summary
AccessCase::canReplace should allow a Getter to replace an IntrinsicGetter
Tadeu Zagallo
Reported
2020-03-16 16:36:00 PDT
...
Attachments
Patch
(3.68 KB, patch)
2020-03-16 16:46 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Patch for landing
(3.74 KB, patch)
2020-03-17 11:56 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tadeu Zagallo
Comment 1
2020-03-16 16:44:53 PDT
<
rdar://problem/59222012
>
Tadeu Zagallo
Comment 2
2020-03-16 16:46:05 PDT
Created
attachment 393707
[details]
Patch
Keith Miller
Comment 3
2020-03-16 19:41:36 PDT
Comment on
attachment 393707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393707&action=review
> Source/JavaScriptCore/bytecode/AccessCase.cpp:681 > + if (other.type() != type() && other.type() != IntrinsicGetter)
Isn't this just always false? I think you want an ||?
Keith Miller
Comment 4
2020-03-16 19:44:00 PDT
Comment on
attachment 393707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393707&action=review
>> Source/JavaScriptCore/bytecode/AccessCase.cpp:681 >> + if (other.type() != type() && other.type() != IntrinsicGetter) > > Isn't this just always false? I think you want an ||?
Nvm, I just misread this as ==.
Saam Barati
Comment 5
2020-03-16 23:53:24 PDT
Comment on
attachment 393707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393707&action=review
r=me
> Source/JavaScriptCore/ChangeLog:9 > + When we override an intrinsic getter with an user defined getter, we might end up with the
"an user" => "a user"
> Source/JavaScriptCore/bytecode/AccessCase.cpp:680 > + case Getter:
You're missing the other direction here, where |this| is InrinsicGetter, and the other is Getter If you wanted to be fancy, you could have something like: bool isInterchangeable(AccessType a, AccessType b) { if (a == b) return true; if (a == Getter and b == IntrinsicGetter) return true; if (a == IntrinsicGettter and b == Getter) return true } and then just write this function in terms of that
Tadeu Zagallo
Comment 6
2020-03-17 11:54:34 PDT
Comment on
attachment 393707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393707&action=review
>> Source/JavaScriptCore/ChangeLog:9 >> + When we override an intrinsic getter with an user defined getter, we might end up with the > > "an user" => "a user"
I debated that, thanks.
>> Source/JavaScriptCore/bytecode/AccessCase.cpp:680 >> + case Getter: > > You're missing the other direction here, where |this| is InrinsicGetter, and the other is Getter > > If you wanted to be fancy, you could have something like: > > bool isInterchangeable(AccessType a, AccessType b) > { > if (a == b) > return true; > if (a == Getter and b == IntrinsicGetter) > return true; > if (a == IntrinsicGettter and b == Getter) > return true > } > > and then just write this function in terms of that
I was unsure whether it was possible to go in the other direction. Fixed it now.
Tadeu Zagallo
Comment 7
2020-03-17 11:56:05 PDT
Created
attachment 393773
[details]
Patch for landing
WebKit Commit Bot
Comment 8
2020-03-17 12:45:10 PDT
Comment on
attachment 393773
[details]
Patch for landing Clearing flags on attachment: 393773 Committed
r258573
: <
https://trac.webkit.org/changeset/258573
>
WebKit Commit Bot
Comment 9
2020-03-17 12:45:12 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug