Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JavaScriptCoreのObject.groupBy/Map.groupByのバグを...

sosukesuzuki
April 25, 2024
420

 JavaScriptCoreのObject.groupBy/Map.groupByのバグを自分で報告して自分で直す

sosukesuzuki

April 25, 2024
Tweet

Transcript

  1. JavaScriptCoreのGroupByのライセンス /* * Copyright (C) 2016 Oleksandr Skachkov <[email protected]>. *

    Copyright (C) 2015 Jordan Harband. All rights reserved. * Copyright (C) 2018 Yusuke Suzuki <[email protected]>. * Copyright (C) 2023 Devin Rousso <[email protected]>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ https://github.com/WebKit/WebKit/blob/ab951214497597d3 41962219a73d4b1ce743f19e/Source/JavaScriptCore/builtins/ ObjectConstructor.js (前ページのコードのライセンス )
  2. JSCをローカルでビルドする • https://github.com/WebKit/WebKit を clone する ◦ デカすぎるので注意 • JSCをビルドできるようにする

    ◦ WebKitのビルドはCMakeとXCodeの二通りがある ◦ Mac なら XCode を入れて ./Tools/Scripts/build-jsc –debug でいける ◦ 自分はCMakeでのビルドを通せたことがない
  3. JSCをローカルでビルドする • デバッガの設定 ◦ C++プロジェクトなのでLLDBを設定しておくと便利 • VSCodeの設定 ◦ 現時点で自分の設定を Gist

    に投稿しておいたので興味のある 方は参照してほしい ▪ https://gist.github.com/sosukesuzuki/da19f1b789031 f19ad88ef2446beb7da
  4. Test262にテストケースを追加する • test262は「Official ECMAScript Conformance Test Suite」 ◦ https://github.com/tc39/test262 •

    要は「ECMAScriptを実装しているやつが満たしておくべきテスト ケース」 • 結構エグいテストケースが多く、各エンジンの通過率は以下(2024 年4月23日)