Changeset 174113 in webkit for trunk/Source/JavaScriptCore/replay
- Timestamp:
- Sep 30, 2014, 12:21:25 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore/replay
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/replay/NondeterministicInput.h
r164007 r174113 48 48 struct JS_EXPORT_PRIVATE InputTraits { 49 49 static InputQueue queue(); 50 static AtomicString& type();50 static String& type(); 51 51 52 52 static void encode(EncodedValue& encodedInput, InputType& decodedInput); … … 60 60 virtual ~NondeterministicInputBase() { } 61 61 62 virtual const AtomicString& type() const = 0;62 virtual const String& type() const = 0; 63 63 virtual InputQueue queue() const = 0; 64 64 }; … … 66 66 template<typename InputType> 67 67 class NondeterministicInput : public NondeterministicInputBase { 68 virtual const AtomicString& type() const override68 virtual const String& type() const override 69 69 { 70 70 return InputTraits<InputType>::type(); -
trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
r171684 r174113 73 73 "implIncludes": [ 74 74 (["WebCore"], 75 ("WebCore", "replay/ReplayInputTypes.h")76 ),77 (["WebCore"],78 75 ("WebCore", "replay/SerializationMethods.h") 79 76 ), … … 81 78 ("JavaScriptCore", "inspector/InspectorValues.h") 82 79 ), 83 ([" JavaScriptCore"],80 (["WebCore", "JavaScriptCore"], 84 81 ("WTF", "wtf/NeverDestroyed.h") 85 ),86 (["JavaScriptCore"],87 ("WTF", "wtf/text/AtomicString.h")88 82 ), 89 83 … … 112 106 "namespace": "JSC", 113 107 "exportMacro": "JS_EXPORT_PRIVATE", 114 "inputTypeTemplate": Templates.InputTypeFromStaticLocal,115 108 }, 116 109 "WebCore": { 117 110 "prefix": "Web", 118 111 "namespace": "WebCore", 119 "inputTypeTemplate": Templates.InputTypeFromThreadLocal,120 112 }, 121 113 # Used for bindings tests. … … 123 115 "prefix": "Test", 124 116 "namespace": "Test", 125 "inputTypeTemplate": Templates.InputTypeFromStaticLocal,126 117 } 127 118 } … … 875 866 template_arguments = { 876 867 'inputsNamespace': self.target_framework.setting('namespace'), 877 'input TypeImplementation': Template(self.setting('inputTypeTemplate')).substitute(None, inputName=_input.name),868 'inputNameStringLiteral': '"%s"' % _input.name, 878 869 'qualifiedInputName': self.qualified_input_name(_input), 879 870 'constructorArguments': self.generate_constructor_arguments_list(_input), -
trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputsTemplates.py
r163918 r174113 99 99 """template<> ${structOrClass} InputTraits<${qualifiedInputName}> { 100 100 static InputQueue queue() { return InputQueue::${queueType}; } 101 static const AtomicString& type();101 static const String& type(); 102 102 103 103 static void encode(JSC::EncodedValue&, const ${qualifiedInputName}&); … … 153 153 154 154 InputTraitsImplementation = ( 155 """const AtomicString& InputTraits<${qualifiedInputName}>::type() 156 { 157 $inputTypeImplementation 155 """const String& InputTraits<${qualifiedInputName}>::type() 156 { 157 static NeverDestroyed<const String> type(ASCIILiteral(${inputNameStringLiteral})); 158 return type; 158 159 } 159 160 … … 227 228 enumValue = static_cast<${qualifiedEnumName}>(enumValue | ${qualifiedEnumValue});""") 228 229 229 InputTypeFromStaticLocal = (230 """ static NeverDestroyed<const AtomicString> type("${inputName}", AtomicString::ConstructFromLiteral);231 return type;""")232 233 InputTypeFromThreadLocal = " return WebCore::inputTypes().${inputName};"234 235 230 InputClassImplementation = ( 236 231 """${inputName}::${inputName}(${constructorFormalsList}) -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp
r163918 r174113 49 49 50 50 namespace JSC { 51 const AtomicString& InputTraits<Test::SavedMouseButton>::type()51 const String& InputTraits<Test::SavedMouseButton>::type() 52 52 { 53 static NeverDestroyed<const AtomicString> type("SavedMouseButton", AtomicString::ConstructFromLiteral);53 static NeverDestroyed<const String> type(ASCIILiteral("SavedMouseButton")); 54 54 return type; 55 55 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.h
r163918 r174113 47 47 template<> struct InputTraits<Test::SavedMouseButton> { 48 48 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 49 static const AtomicString& type();49 static const String& type(); 50 50 51 51 static void encode(JSC::EncodedValue&, const Test::SavedMouseButton&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp
r163918 r174113 50 50 51 51 namespace JSC { 52 const AtomicString& InputTraits<Test::SavedMouseButton>::type()52 const String& InputTraits<Test::SavedMouseButton>::type() 53 53 { 54 static NeverDestroyed<const AtomicString> type("SavedMouseButton", AtomicString::ConstructFromLiteral);54 static NeverDestroyed<const String> type(ASCIILiteral("SavedMouseButton")); 55 55 return type; 56 56 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h
r163918 r174113 51 51 template<> struct InputTraits<Test::SavedMouseButton> { 52 52 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 53 static const AtomicString& type();53 static const String& type(); 54 54 55 55 static void encode(JSC::EncodedValue&, const Test::SavedMouseButton&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp
r170774 r174113 49 49 50 50 namespace JSC { 51 const AtomicString& InputTraits<Test::HandleWheelEvent>::type()51 const String& InputTraits<Test::HandleWheelEvent>::type() 52 52 { 53 static NeverDestroyed<const AtomicString> type("HandleWheelEvent", AtomicString::ConstructFromLiteral);53 static NeverDestroyed<const String> type(ASCIILiteral("HandleWheelEvent")); 54 54 return type; 55 55 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h
r169889 r174113 48 48 template<> struct InputTraits<Test::HandleWheelEvent> { 49 49 static InputQueue queue() { return InputQueue::EventLoopInput; } 50 static const AtomicString& type();50 static const String& type(); 51 51 52 52 static void encode(JSC::EncodedValue&, const Test::HandleWheelEvent&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp
r171683 r174113 51 51 52 52 namespace JSC { 53 const AtomicString& InputTraits<Test::FormCombo>::type()53 const String& InputTraits<Test::FormCombo>::type() 54 54 { 55 static NeverDestroyed<const AtomicString> type("FormCombo", AtomicString::ConstructFromLiteral);55 static NeverDestroyed<const String> type(ASCIILiteral("FormCombo")); 56 56 return type; 57 57 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h
r171683 r174113 47 47 template<> struct InputTraits<Test::FormCombo> { 48 48 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 49 static const AtomicString& type();49 static const String& type(); 50 50 51 51 static void encode(JSC::EncodedValue&, const Test::FormCombo&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.cpp
r163918 r174113 61 61 namespace JSC { 62 62 #if ENABLE(DUMMY_FEATURE) 63 const AtomicString& InputTraits<Test::GetCurrentTime>::type()63 const String& InputTraits<Test::GetCurrentTime>::type() 64 64 { 65 static NeverDestroyed<const AtomicString> type("GetCurrentTime", AtomicString::ConstructFromLiteral);65 static NeverDestroyed<const String> type(ASCIILiteral("GetCurrentTime")); 66 66 return type; 67 67 } … … 83 83 #endif // ENABLE(DUMMY_FEATURE) 84 84 85 const AtomicString& InputTraits<Test::SetRandomSeed>::type()85 const String& InputTraits<Test::SetRandomSeed>::type() 86 86 { 87 static NeverDestroyed<const AtomicString> type("SetRandomSeed", AtomicString::ConstructFromLiteral);87 static NeverDestroyed<const String> type(ASCIILiteral("SetRandomSeed")); 88 88 return type; 89 89 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.h
r163918 r174113 48 48 template<> struct InputTraits<Test::GetCurrentTime> { 49 49 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 50 static const AtomicString& type();50 static const String& type(); 51 51 52 52 static void encode(JSC::EncodedValue&, const Test::GetCurrentTime&); … … 57 57 template<> struct InputTraits<Test::SetRandomSeed> { 58 58 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 59 static const AtomicString& type();59 static const String& type(); 60 60 61 61 static void encode(JSC::EncodedValue&, const Test::SetRandomSeed&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.cpp
r171684 r174113 62 62 63 63 namespace JSC { 64 const AtomicString& InputTraits<Test::ArrayOfThings>::type()64 const String& InputTraits<Test::ArrayOfThings>::type() 65 65 { 66 static NeverDestroyed<const AtomicString> type("ArrayOfThings", AtomicString::ConstructFromLiteral);66 static NeverDestroyed<const String> type(ASCIILiteral("ArrayOfThings")); 67 67 return type; 68 68 } … … 93 93 } 94 94 95 const AtomicString& InputTraits<Test::SavedHistory>::type()95 const String& InputTraits<Test::SavedHistory>::type() 96 96 { 97 static NeverDestroyed<const AtomicString> type("SavedHistory", AtomicString::ConstructFromLiteral);97 static NeverDestroyed<const String> type(ASCIILiteral("SavedHistory")); 98 98 return type; 99 99 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h
r171684 r174113 49 49 template<> struct InputTraits<Test::ArrayOfThings> { 50 50 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 51 static const AtomicString& type();51 static const String& type(); 52 52 53 53 static void encode(JSC::EncodedValue&, const Test::ArrayOfThings&); … … 57 57 template<> struct InputTraits<Test::SavedHistory> { 58 58 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 59 static const AtomicString& type();59 static const String& type(); 60 60 61 61 static void encode(JSC::EncodedValue&, const Test::SavedHistory&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-inputs-with-flags.json-TestReplayInputs.cpp
r163918 r174113 58 58 59 59 namespace JSC { 60 const AtomicString& InputTraits<Test::ScalarInput1>::type()60 const String& InputTraits<Test::ScalarInput1>::type() 61 61 { 62 static NeverDestroyed<const AtomicString> type("ScalarInput1", AtomicString::ConstructFromLiteral);62 static NeverDestroyed<const String> type(ASCIILiteral("ScalarInput1")); 63 63 return type; 64 64 } … … 79 79 } 80 80 81 const AtomicString& InputTraits<Test::ScalarInput2>::type()81 const String& InputTraits<Test::ScalarInput2>::type() 82 82 { 83 static NeverDestroyed<const AtomicString> type("ScalarInput2", AtomicString::ConstructFromLiteral);83 static NeverDestroyed<const String> type(ASCIILiteral("ScalarInput2")); 84 84 return type; 85 85 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-inputs-with-flags.json-TestReplayInputs.h
r163918 r174113 45 45 template<> struct InputTraits<Test::ScalarInput1> { 46 46 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 47 static const AtomicString& type();47 static const String& type(); 48 48 49 49 static void encode(JSC::EncodedValue&, const Test::ScalarInput1&); … … 53 53 template<> struct InputTraits<Test::ScalarInput2> { 54 54 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 55 static const AtomicString& type();55 static const String& type(); 56 56 57 57 static void encode(JSC::EncodedValue&, const Test::ScalarInput2&); -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.cpp
r170774 r174113 58 58 59 59 namespace JSC { 60 const AtomicString& InputTraits<Test::ScalarInput>::type()60 const String& InputTraits<Test::ScalarInput>::type() 61 61 { 62 static NeverDestroyed<const AtomicString> type("ScalarInput", AtomicString::ConstructFromLiteral);62 static NeverDestroyed<const String> type(ASCIILiteral("ScalarInput")); 63 63 return type; 64 64 } … … 79 79 } 80 80 81 const AtomicString& InputTraits<Test::MapInput>::type()81 const String& InputTraits<Test::MapInput>::type() 82 82 { 83 static NeverDestroyed<const AtomicString> type("MapInput", AtomicString::ConstructFromLiteral);83 static NeverDestroyed<const String> type(ASCIILiteral("MapInput")); 84 84 return type; 85 85 } -
trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.h
r163918 r174113 45 45 template<> struct InputTraits<Test::ScalarInput> { 46 46 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 47 static const AtomicString& type();47 static const String& type(); 48 48 49 49 static void encode(JSC::EncodedValue&, const Test::ScalarInput&); … … 53 53 template<> struct InputTraits<Test::MapInput> { 54 54 static InputQueue queue() { return InputQueue::ScriptMemoizedData; } 55 static const AtomicString& type();55 static const String& type(); 56 56 57 57 static void encode(JSC::EncodedValue&, const Test::MapInput&);
Note:
See TracChangeset
for help on using the changeset viewer.