Changeset 238778 in webkit
- Timestamp:
- Dec 1, 2018, 12:38:53 AM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
parser/ResultType.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r238766 r238778 1 2018-11-29 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] Keep TypeMaybeBigInt small 4 https://bugs.webkit.org/show_bug.cgi?id=192203 5 6 Reviewed by Saam Barati. 7 8 As BigInt is being implemented, more and more bytecodes start returning BigInt. 9 It means that ResultType of these bytecodes include TypeMaybeBigInt. However, 10 TypeMaybeBigInt was large number 0x20, leading to wide instruction since ResultType 11 easily becomes larger than 32 (e.g. TypeInt32 | TypeMaybeBigInt == 33). 12 13 This patch sorts the numbers of TypeMaybeXXX based on the frequency of appearance in 14 the code. 15 16 * parser/ResultType.h: 17 1 18 2018-11-30 Dean Jackson <dino@apple.com> 2 19 -
trunk/Source/JavaScriptCore/parser/ResultType.h
r238543 r238778 33 33 34 34 using Type = uint8_t; 35 static constexpr Type TypeInt32 = 1;36 static constexpr Type TypeMaybeNumber = 0x 02;37 static constexpr Type TypeMaybeString = 0x 04;38 static constexpr Type TypeMaybe Null = 0x08;39 static constexpr Type TypeMaybe Bool = 0x10;40 static constexpr Type TypeMaybeB igInt = 0x20;41 static constexpr Type TypeMaybeOther = 0x 40;42 43 static constexpr Type TypeBits = TypeMaybeNumber | TypeMaybeString | TypeMaybe Null | TypeMaybeBool | TypeMaybeBigInt| TypeMaybeOther;35 static constexpr Type TypeInt32 = 0x1 << 0; 36 static constexpr Type TypeMaybeNumber = 0x1 << 1; 37 static constexpr Type TypeMaybeString = 0x1 << 2; 38 static constexpr Type TypeMaybeBigInt = 0x1 << 3; 39 static constexpr Type TypeMaybeNull = 0x1 << 4; 40 static constexpr Type TypeMaybeBool = 0x1 << 5; 41 static constexpr Type TypeMaybeOther = 0x1 << 6; 42 43 static constexpr Type TypeBits = TypeMaybeNumber | TypeMaybeString | TypeMaybeBigInt | TypeMaybeNull | TypeMaybeBool | TypeMaybeOther; 44 44 45 45 public:
Note:
See TracChangeset
for help on using the changeset viewer.