RESOLVED FIXED 142556
Integrate MapData into JSMap and JSSet
https://bugs.webkit.org/show_bug.cgi?id=142556
Summary Integrate MapData into JSMap and JSSet
Yusuke Suzuki
Reported 2015-03-10 18:55:09 PDT
Integrate MapData into JSMap and JSSet
Attachments
Patch (26.04 KB, patch)
2015-03-10 18:58 PDT, Yusuke Suzuki
no flags
Patch (60.95 KB, patch)
2015-03-10 23:23 PDT, Yusuke Suzuki
no flags
Patch (81.40 KB, patch)
2015-03-11 02:11 PDT, Yusuke Suzuki
no flags
Patch (76.56 KB, patch)
2015-03-11 09:22 PDT, Yusuke Suzuki
no flags
Patch (76.56 KB, patch)
2015-03-11 09:27 PDT, Yusuke Suzuki
no flags
Patch (74.00 KB, patch)
2015-03-11 10:18 PDT, Yusuke Suzuki
no flags
Patch (80.81 KB, patch)
2015-03-12 12:47 PDT, Yusuke Suzuki
no flags
Patch (80.85 KB, patch)
2015-03-12 12:49 PDT, Yusuke Suzuki
no flags
Patch (81.62 KB, patch)
2015-03-12 13:26 PDT, Yusuke Suzuki
no flags
Patch (84.01 KB, patch)
2015-03-12 13:43 PDT, Yusuke Suzuki
fpizlo: review+
Yusuke Suzuki
Comment 1 2015-03-10 18:58:29 PDT
Yusuke Suzuki
Comment 2 2015-03-10 19:03:10 PDT
Created the prototype to integrate MapData into JSMap / JSSet. In the current patch, MapData is not splitted into MapData / SetData. MapData's operations are similar to SetData. If splitting MapData into SetData and MapData is preferable, one possible solution is template parameterizing MapData such as MapData<ValueType, ValueTraits> and using MapData<Pair<Key, Value>, Traits> in JSMap and MapData<Value, Traits> in JSSet.
Yusuke Suzuki
Comment 3 2015-03-10 23:23:15 PDT
WebKit Commit Bot
Comment 4 2015-03-10 23:25:37 PDT
Attachment 248406 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/MapData.h:191: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:212: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 5 2015-03-11 02:11:30 PDT
WebKit Commit Bot
Comment 6 2015-03-11 02:13:19 PDT
Attachment 248407 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/MapData.h:191: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:212: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 3 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 7 2015-03-11 09:22:09 PDT
WebKit Commit Bot
Comment 8 2015-03-11 09:24:22 PDT
Attachment 248422 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/MapData.h:193: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:214: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 9 2015-03-11 09:27:26 PDT
WebKit Commit Bot
Comment 10 2015-03-11 09:29:26 PDT
Attachment 248425 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/MapData.h:194: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:215: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 11 2015-03-11 10:18:24 PDT
WebKit Commit Bot
Comment 12 2015-03-11 10:22:37 PDT
Attachment 248430 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/MapData.h:194: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:215: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 13 2015-03-12 12:47:44 PDT
Yusuke Suzuki
Comment 14 2015-03-12 12:49:23 PDT
Filip Pizlo
Comment 15 2015-03-12 12:50:10 PDT
Comment on attachment 248533 [details] Patch Nice!
WebKit Commit Bot
Comment 16 2015-03-12 12:51:18 PDT
Attachment 248533 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/JSMap.h:119: The parameter name "value" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/MapData.h:193: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:214: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 19 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 17 2015-03-12 12:59:24 PDT
(In reply to comment #16) > Attachment 248533 [details] did not pass style-queue: > > > ERROR: Source/JavaScriptCore/runtime/JSMap.h:119: The parameter name > "value" adds no information, so it should be removed. I think that the style bot is wrong here; you're using the word "value" to distinguish from "key". So, please ignore this style feedback. > [readability/parameter_name] [5] > ERROR: Source/JavaScriptCore/runtime/MapData.h:193: > MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use > underscores in your identifier names. [readability/naming/underscores] [4] > ERROR: Source/JavaScriptCore/runtime/MapData.h:214: > MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores > in your identifier names. [readability/naming/underscores] [4] These errors are wrong. You're right to use const_iterator as the name of a const iterator. ;-) > Total errors found: 3 in 19 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style.
Yusuke Suzuki
Comment 18 2015-03-12 13:09:05 PDT
(In reply to comment #17) > I think that the style bot is wrong here; you're using the word "value" to > distinguish from "key". So, please ignore this style feedback. > > > [readability/parameter_name] [5] > > ERROR: Source/JavaScriptCore/runtime/MapData.h:193: > > MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use > > underscores in your identifier names. [readability/naming/underscores] [4] > > ERROR: Source/JavaScriptCore/runtime/MapData.h:214: > > MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores > > in your identifier names. [readability/naming/underscores] [4] > > These errors are wrong. You're right to use const_iterator as the name of a > const iterator. ;-) > > > Total errors found: 3 in 19 files > > > > > > If any of these errors are false positives, please file a bug against > > check-webkit-style. Thank you for your review. Oops, one build failure is raised. This is because JSMap::get conflicts with JSObject::get. I needed to rebuild with --clean for MapConstructor.cpp, this is because it doesn't use JSMap::get, so rebuild doesn't occur. I'll fix it with speciflying explicitly by `map->JSObject::get`. And update the patch with it. The change will become only this from the reviewed patch.
Yusuke Suzuki
Comment 19 2015-03-12 13:26:28 PDT
WebKit Commit Bot
Comment 20 2015-03-12 13:28:58 PDT
Attachment 248536 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/JSMap.h:119: The parameter name "value" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/MapData.h:193: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:214: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 21 2015-03-12 13:36:21 PDT
Comment on attachment 248536 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248536&action=review I've updated the patch with a few build fix. I've only annotated the changes from the previous reviewed patch. To land it safely, I've updated the patch again. Could you take a look? > Source/JavaScriptCore/runtime/MapConstructor.cpp:63 > + JSValue adderFunction = map->JSObject::get(exec, exec->propertyNames().set); Explicitly specifying JSObject::get since JSMap also has JSMap::get which signature is different from JSObject::get. > Source/WebCore/bindings/js/SerializedScriptValue.cpp:2555 > + set->add(m_exec, outValue); I've missed that changing this from set->set to set->add. Now I've built whole WebKit and make sure that build passed, run-webkit-tests for structured-cloning passed, run-javascriptcore-tests passed on GTK environment.
Yusuke Suzuki
Comment 22 2015-03-12 13:39:12 PDT
Ah, sorry, I'll update once more for windows build. Dropping MapData.cpp from vcxproj.
Yusuke Suzuki
Comment 23 2015-03-12 13:43:22 PDT
Filip Pizlo
Comment 24 2015-03-12 13:44:44 PDT
This probably doesn't need to be reviewed again even if you have to make small changes to pacify the various builds. That's how we usually work - it's a given that after an r+, additional changes may be necessary, and if they are small, we don't request additional review.
WebKit Commit Bot
Comment 25 2015-03-12 13:46:21 PDT
Attachment 248539 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/JSMap.h:119: The parameter name "value" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/MapData.h:193: MapDataImpl::const_iterator::const_iterator is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/JavaScriptCore/runtime/MapData.h:214: MapDataImpl::const_iterator::end is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 26 2015-03-12 13:50:36 PDT
(In reply to comment #24) > This probably doesn't need to be reviewed again even if you have to make > small changes to pacify the various builds. That's how we usually work - > it's a given that after an r+, additional changes may be necessary, and if > they are small, we don't request additional review. Thank you :) I've checked build on gtk, but maybe, iOS seems failed due to the lack of JS_EXPORT_PRIVATE. So I'll move this patch from my GTK environment to OSX, eusured that build/test passed and land it. Does Tools/Scripts/webkit-patch land-safely works fine? If it works, I'm planning to use it to land it safely.
Filip Pizlo
Comment 27 2015-03-12 14:22:07 PDT
(In reply to comment #26) > (In reply to comment #24) > > This probably doesn't need to be reviewed again even if you have to make > > small changes to pacify the various builds. That's how we usually work - > > it's a given that after an r+, additional changes may be necessary, and if > > they are small, we don't request additional review. > > Thank you :) > I've checked build on gtk, but maybe, iOS seems failed due to the lack of > JS_EXPORT_PRIVATE. > So I'll move this patch from my GTK environment to OSX, eusured that > build/test passed and land it. > > Does Tools/Scripts/webkit-patch land-safely works fine? > If it works, I'm planning to use it to land it safely. I don't know. I just svn commit. ;-)
Yusuke Suzuki
Comment 28 2015-03-12 15:57:53 PDT
Yusuke Suzuki
Comment 29 2015-03-12 16:04:16 PDT
(In reply to comment #27) > I don't know. I just svn commit. ;-) I see. I've landed with Tools/Scripts/webkit-patch land. Thank you!
Note You need to log in before you can comment on or make changes to this bug.