RESOLVED FIXED 53219
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
Summary Convert markstack to a slot visitor API
Oliver Hunt
Reported 2011-01-26 18:22:53 PST
Convert markstack to a slot visitor API
Attachments
Patch (250.08 KB, patch)
2011-01-27 17:11 PST, Oliver Hunt
no flags
Patch (250.19 KB, patch)
2011-01-27 18:04 PST, Oliver Hunt
no flags
Patch (261.06 KB, patch)
2011-01-28 12:40 PST, Oliver Hunt
no flags
Patch (270.59 KB, patch)
2011-01-28 15:08 PST, Oliver Hunt
no flags
Oliver Hunt
Comment 1 2011-01-27 17:11:53 PST
WebKit Review Bot
Comment 2 2011-01-27 17:15:28 PST
Attachment 80382 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/API/JSCallbackObject..." exit_code: 1 Source/JavaScriptCore/runtime/JSArray.h:30: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 114 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 3 2011-01-27 17:45:53 PST
Build Bot
Comment 4 2011-01-27 17:59:07 PST
Oliver Hunt
Comment 5 2011-01-27 18:04:53 PST
WebKit Review Bot
Comment 6 2011-01-27 18:08:23 PST
Attachment 80390 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/API/JSCallbackObject..." exit_code: 1 Source/JavaScriptCore/runtime/JSArray.h:30: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 114 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 7 2011-01-27 18:45:45 PST
WebKit Review Bot
Comment 8 2011-01-27 19:40:18 PST
WebKit Review Bot
Comment 9 2011-01-27 23:12:29 PST
Geoffrey Garen
Comment 10 2011-01-28 10:20:35 PST
- ALWAYS_INLINE void append(JSValue); - void append(JSCell*); + void append(JSValue*); + void append(JSCell**); I think we want these APIs to be deprecatedAppend(JSValue*); template <typename T> deprecatedAppend(DeprecatedPtr<T>); template <typename T> append(WriteBarrier<T>); We rely on MarkStack's interface, and the help of the compiler, to suss out all the objects that aren't yet moving-safe. I think it's worth it to limit the surface area here, not allowing any JSCell**, and to call out the deprecated interfaces explicitly.
Geoffrey Garen
Comment 11 2011-01-28 10:30:39 PST
+ template <> class WriteBarrierBase<Unknown> { What's the goal of this separate base class? + protected: + EncodedJSValue m_value; Can we store a JSValue instead of an EncodedJSValue? +++ b/Source/JavaScriptCore/runtime/JSValue.h @@ -23,6 +23,8 @@ #ifndef JSValue_h #define JSValue_h +#include "WriteBarrier.h" It's confusing that half the WriteBarrier and DeprecatedPtr class is in WriteBarrier.h, and half is in JSValue.h. Can we put them in the same file, and have WriterBarrier.h #include JSValue.h? JSValue declares two constructor declarations that depend on a template declaration, but I think you can just add that those declarations stand-alone.
Oliver Hunt
Comment 12 2011-01-28 11:49:29 PST
(In reply to comment #11) > + template <> class WriteBarrierBase<Unknown> { > > What's the goal of this separate base class? > > + protected: > + EncodedJSValue m_value; > > Can we store a JSValue instead of an EncodedJSValue? Nope. > > > +++ b/Source/JavaScriptCore/runtime/JSValue.h > @@ -23,6 +23,8 @@ > #ifndef JSValue_h > #define JSValue_h > > +#include "WriteBarrier.h" > > It's confusing that half the WriteBarrier and DeprecatedPtr class is in WriteBarrier.h, and half is in JSValue.h. Can we put them in the same file, and have WriterBarrier.h #include JSValue.h? JSValue declares two constructor declarations that depend on a template declaration, but I think you can just add that those declarations stand-alone. I will give that a shot
Geoffrey Garen
Comment 13 2011-01-28 11:54:38 PST
> > Can we store a JSValue instead of an EncodedJSValue? > Nope. Can you explain why we need to store an EncodedJSValue?
Oliver Hunt
Comment 14 2011-01-28 12:00:34 PST
(In reply to comment #13) > > > Can we store a JSValue instead of an EncodedJSValue? > > Nope. > > Can you explain why we need to store an EncodedJSValue? Because using a JSValue creates an implicit constructor in WriteBarrierBase. We need WriteBarrierBase to have no constructor so that we can put it in the JSObject data union. That's also why there's the WriteBarrierBase and WriteBarrier distinction - WriteBarrier is the easier one to write, and has helpful constructors, but we need a common base class so that JSObject is sane.
Oliver Hunt
Comment 15 2011-01-28 12:40:07 PST
WebKit Review Bot
Comment 16 2011-01-28 12:42:21 PST
Attachment 80482 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/API/JSCallbackObject..." exit_code: 1 Source/JavaScriptCore/runtime/JSArray.h:30: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 121 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 17 2011-01-28 13:46:26 PST
Oliver Hunt
Comment 18 2011-01-28 15:08:47 PST
WebKit Review Bot
Comment 19 2011-01-28 15:12:00 PST
Attachment 80503 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/API/JSCallbackObject..." exit_code: 1 Source/JavaScriptCore/runtime/JSArray.h:30: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 124 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 20 2011-01-28 15:26:15 PST
Comment on attachment 80503 [details] Patch r=me
Oliver Hunt
Comment 21 2011-01-28 15:40:46 PST
Oliver Hunt
Comment 23 2011-01-30 17:14:24 PST
Csaba Osztrogonác
Comment 24 2011-01-30 23:03:32 PST
Reopen, because it was rolled out by http://trac.webkit.org/changeset/77113 Qt build was broken for ~6 hours and 7 patches are stucked in Qt EWS because of this build break. Qt EWS and Qt folks always willingly help you to fix the Qt build, but breaking the build for hours isn't a fairplay game ... Please respect and don't ignore "Keeping the tree green" policy: http://webkit.org/coding/contributing.html "Your change must at least compile on all platforms."
Csaba Osztrogonác
Comment 25 2011-01-30 23:03:54 PST
Comment on attachment 80503 [details] Patch remove r+ from landed patch
Oliver Hunt
Comment 26 2011-01-31 08:31:08 PST
(In reply to comment #24) > Reopen, because it was rolled out by http://trac.webkit.org/changeset/77113 > > Qt build was broken for ~6 hours and 7 patches are stucked in Qt EWS because of this build break. > > Qt EWS and Qt folks always willingly help you to fix the Qt > build, but breaking the build for hours isn't a fairplay game ... > > Please respect and don't ignore "Keeping the tree green" policy: > http://webkit.org/coding/contributing.html > "Your change must at least compile on all platforms." I emailed simon for assistance, there is no clear goto person for qt js bindings. The build failures should have been trivial for someone to fix if they had a qt build. Also afaict the build bot output was giving invalid line numbers. There's bindings code for qt that is not using normal webcore hashmaps so my ability to actually fix code that's using them is severely limited. I will land this again with my approach to "working build" be compiling. Even if the code is obviously incorrect. Personally I would have tried being more polite to someone who actually put effort into fixing things.
Oliver Hunt
Comment 27 2011-01-31 08:34:13 PST
(In reply to comment #24) > Reopen, because it was rolled out by http://trac.webkit.org/changeset/77113 > > Qt build was broken for ~6 hours and 7 patches are stucked in Qt EWS because of this build break. > > Qt EWS and Qt folks always willingly help you to fix the Qt > build, but breaking the build for hours isn't a fairplay game ... > > Please respect and don't ignore "Keeping the tree green" policy: > http://webkit.org/coding/contributing.html > "Your change must at least compile on all platforms." Sorry i forgot: I also told those qt people that appeared to be on irc when i logged off about what they needed to do to fix the build. Clearly I'm a bastard.
Note You need to log in before you can comment on or make changes to this bug.