Index: Source/core/html/parser/HTMLEntityTable.h |
diff --git a/Source/core/html/parser/HTMLEntityTable.h b/Source/core/html/parser/HTMLEntityTable.h |
index b5cd6c4869b2f738cfd94355e1e19e7f833bf3cc..1e465049b57148e25eb6ccfde7ade4bb44c18a91 100644 |
--- a/Source/core/html/parser/HTMLEntityTable.h |
+++ b/Source/core/html/parser/HTMLEntityTable.h |
@@ -30,13 +30,14 @@ |
namespace WebCore { |
+// Member order to optimize packing. There will be thousands of these objects. |
struct HTMLEntityTableEntry { |
- LChar lastCharacter() const { return entity[length - 1]; } |
+ LChar lastCharacter() const; |
- const LChar* entity; |
- int length; |
UChar32 firstValue; |
- UChar32 secondValue; |
+ UChar secondValue; // UChar since double char sequences only use BMP chars. |
+ short entityOffset; |
+ short length; |
}; |
class HTMLEntityTable { |
@@ -46,6 +47,8 @@ public: |
static const HTMLEntityTableEntry* firstEntryStartingWith(UChar); |
static const HTMLEntityTableEntry* lastEntryStartingWith(UChar); |
+ |
+ static const LChar* entityString(const HTMLEntityTableEntry&); |
}; |
} |