Remove the dynamic selector-state-machine from the parser class
Instead, use a plain-old switch-case. Performance boost (along with the character token changes) about 6% (reference to baseline)
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
MODE_ENTRY( HTMLInsertionModeAfterFrameset, ) \
|
||||
MODE_ENTRY( HTMLInsertionModeAfterAfterBody, ) \
|
||||
MODE_ENTRY( HTMLInsertionModeAfterAfterFrameset, ) \
|
||||
MODE_ENTRY( HTMLInsertionModeCurrentTemplate, ) \
|
||||
MODE_ENTRY( HTMLInsertionModesCount, )
|
||||
|
||||
typedef NS_ENUM(NSUInteger, HTMLInsertionMode)
|
||||
{
|
||||
@@ -39,13 +37,3 @@ typedef NS_ENUM(NSUInteger, HTMLInsertionMode)
|
||||
INSERTION_MODES
|
||||
#undef MODE_ENTRY
|
||||
};
|
||||
|
||||
static NSString * HTMLInsertionModesTable[] = {
|
||||
#define LITERAL(X) #X
|
||||
#define STRINGIFY(X) LITERAL(X)
|
||||
#define MODE_ENTRY( name, value ) [name] = @#name STRINGIFY(:),
|
||||
INSERTION_MODES
|
||||
#undef MODE_ENTRY
|
||||
#undef STRINGIFY
|
||||
#undef LITERAL
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user