From c71976d55abe7a7a996036b76db845407b1ca27f Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Wed, 10 Sep 2014 12:56:19 +0000 Subject: [PATCH] Also rename ascii to one-byte in tool scripts. TBR=marja@chromium.org Review URL: https://codereview.chromium.org/561743002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/gen-postmortem-metadata.py | 16 ++++++++-------- tools/grokdump.py | 20 ++++++++++---------- tools/parser-shell.cc | 2 +- tools/v8heapconst.py | 38 +++++++++++++++++++------------------- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/tools/gen-postmortem-metadata.py b/tools/gen-postmortem-metadata.py index 1c93159..04a1ea8 100644 --- a/tools/gen-postmortem-metadata.py +++ b/tools/gen-postmortem-metadata.py @@ -61,7 +61,7 @@ consts_misc = [ { 'name': 'StringEncodingMask', 'value': 'kStringEncodingMask' }, { 'name': 'TwoByteStringTag', 'value': 'kTwoByteStringTag' }, - { 'name': 'AsciiStringTag', 'value': 'kOneByteStringTag' }, + { 'name': 'OneByteStringTag', 'value': 'kOneByteStringTag' }, { 'name': 'StringRepresentationMask', 'value': 'kStringRepresentationMask' }, @@ -315,11 +315,11 @@ def load_objects(): # # Mapping string types is more complicated. Both types and # class names for Strings specify a representation (e.g., Seq, - # Cons, External, or Sliced) and an encoding (TwoByte or Ascii), + # Cons, External, or Sliced) and an encoding (TwoByte/OneByte), # In the simplest case, both of these are explicit in both # names, as in: # - # EXTERNAL_ASCII_STRING_TYPE => ExternalAsciiString + # EXTERNAL_ONE_BYTE_STRING_TYPE => ExternalOneByteString # # However, either the representation or encoding can be omitted # from the type name, in which case "Seq" and "TwoByte" are @@ -330,7 +330,7 @@ def load_objects(): # Additionally, sometimes the type name has more information # than the class, as in: # - # CONS_ASCII_STRING_TYPE => ConsString + # CONS_ONE_BYTE_STRING_TYPE => ConsString # # To figure this out dynamically, we first check for a # representation and encoding and add them if they're not @@ -341,19 +341,19 @@ def load_objects(): if (cctype.find('Cons') == -1 and cctype.find('External') == -1 and cctype.find('Sliced') == -1): - if (cctype.find('Ascii') != -1): - cctype = re.sub('AsciiString$', + if (cctype.find('OneByte') != -1): + cctype = re.sub('OneByteString$', 'SeqOneByteString', cctype); else: cctype = re.sub('String$', 'SeqString', cctype); - if (cctype.find('Ascii') == -1): + if (cctype.find('OneByte') == -1): cctype = re.sub('String$', 'TwoByteString', cctype); if (not (cctype in klasses)): - cctype = re.sub('Ascii', '', cctype); + cctype = re.sub('OneByte', '', cctype); cctype = re.sub('TwoByte', '', cctype); # diff --git a/tools/grokdump.py b/tools/grokdump.py index f6c45fc..2177ec2 100755 --- a/tools/grokdump.py +++ b/tools/grokdump.py @@ -1482,22 +1482,22 @@ class Code(HeapObject): class V8Heap(object): CLASS_MAP = { "SYMBOL_TYPE": SeqString, - "ASCII_SYMBOL_TYPE": SeqString, + "ONE_BYTE_SYMBOL_TYPE": SeqString, "CONS_SYMBOL_TYPE": ConsString, - "CONS_ASCII_SYMBOL_TYPE": ConsString, + "CONS_ONE_BYTE_SYMBOL_TYPE": ConsString, "EXTERNAL_SYMBOL_TYPE": ExternalString, - "EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE": ExternalString, - "EXTERNAL_ASCII_SYMBOL_TYPE": ExternalString, + "EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString, + "EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString, "SHORT_EXTERNAL_SYMBOL_TYPE": ExternalString, - "SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE": ExternalString, - "SHORT_EXTERNAL_ASCII_SYMBOL_TYPE": ExternalString, + "SHORT_EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString, + "SHORT_EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString, "STRING_TYPE": SeqString, - "ASCII_STRING_TYPE": SeqString, + "ONE_BYTE_STRING_TYPE": SeqString, "CONS_STRING_TYPE": ConsString, - "CONS_ASCII_STRING_TYPE": ConsString, + "CONS_ONE_BYTE_STRING_TYPE": ConsString, "EXTERNAL_STRING_TYPE": ExternalString, - "EXTERNAL_STRING_WITH_ASCII_DATA_TYPE": ExternalString, - "EXTERNAL_ASCII_STRING_TYPE": ExternalString, + "EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE": ExternalString, + "EXTERNAL_ONE_BYTE_STRING_TYPE": ExternalString, "MAP_TYPE": Map, "ODDBALL_TYPE": Oddball, "FIXED_ARRAY_TYPE": FixedArray, diff --git a/tools/parser-shell.cc b/tools/parser-shell.cc index a774449..ce18e38 100644 --- a/tools/parser-shell.cc +++ b/tools/parser-shell.cc @@ -45,7 +45,7 @@ using namespace v8::internal; -class StringResource8 : public v8::String::ExternalAsciiStringResource { +class StringResource8 : public v8::String::ExternalOneByteStringResource { public: StringResource8(const char* data, int length) : data_(data), length_(length) { } diff --git a/tools/v8heapconst.py b/tools/v8heapconst.py index c7f1ddc..5e3e841 100644 --- a/tools/v8heapconst.py +++ b/tools/v8heapconst.py @@ -31,26 +31,26 @@ # List of known V8 instance types. INSTANCE_TYPES = { 64: "STRING_TYPE", - 68: "ASCII_STRING_TYPE", + 68: "ONE_BYTE_STRING_TYPE", 65: "CONS_STRING_TYPE", - 69: "CONS_ASCII_STRING_TYPE", + 69: "CONS_ONE_BYTE_STRING_TYPE", 67: "SLICED_STRING_TYPE", - 71: "SLICED_ASCII_STRING_TYPE", + 71: "SLICED_ONE_BYTE_STRING_TYPE", 66: "EXTERNAL_STRING_TYPE", - 70: "EXTERNAL_ASCII_STRING_TYPE", + 70: "EXTERNAL_ONE_BYTE_STRING_TYPE", 74: "EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE", 82: "SHORT_EXTERNAL_STRING_TYPE", - 86: "SHORT_EXTERNAL_ASCII_STRING_TYPE", + 86: "SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE", 90: "SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE", 0: "INTERNALIZED_STRING_TYPE", - 4: "ASCII_INTERNALIZED_STRING_TYPE", + 4: "ONE_BYTE_INTERNALIZED_STRING_TYPE", 1: "CONS_INTERNALIZED_STRING_TYPE", - 5: "CONS_ASCII_INTERNALIZED_STRING_TYPE", + 5: "CONS_ONE_BYTE_INTERNALIZED_STRING_TYPE", 2: "EXTERNAL_INTERNALIZED_STRING_TYPE", - 6: "EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE", + 6: "EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE", 10: "EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE", 18: "SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE", - 22: "SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE", + 22: "SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE", 26: "SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE", 128: "SYMBOL_TYPE", 129: "MAP_TYPE", @@ -135,7 +135,7 @@ KNOWN_MAPS = { 0x08081: (136, "ByteArrayMap"), 0x080a9: (129, "MetaMap"), 0x080d1: (131, "OddballMap"), - 0x080f9: (4, "AsciiInternalizedStringMap"), + 0x080f9: (4, "OneByteInternalizedStringMap"), 0x08121: (179, "FixedArrayMap"), 0x08149: (134, "HeapNumberMap"), 0x08171: (137, "FreeSpaceMap"), @@ -153,28 +153,28 @@ KNOWN_MAPS = { 0x08351: (179, "HashTableMap"), 0x08379: (128, "SymbolMap"), 0x083a1: (64, "StringMap"), - 0x083c9: (68, "AsciiStringMap"), + 0x083c9: (68, "OneByteStringMap"), 0x083f1: (65, "ConsStringMap"), - 0x08419: (69, "ConsAsciiStringMap"), + 0x08419: (69, "ConsOneByteStringMap"), 0x08441: (67, "SlicedStringMap"), - 0x08469: (71, "SlicedAsciiStringMap"), + 0x08469: (71, "SlicedOneByteStringMap"), 0x08491: (66, "ExternalStringMap"), 0x084b9: (74, "ExternalStringWithOneByteDataMap"), - 0x084e1: (70, "ExternalAsciiStringMap"), + 0x084e1: (70, "ExternalOneByteStringMap"), 0x08509: (82, "ShortExternalStringMap"), 0x08531: (90, "ShortExternalStringWithOneByteDataMap"), 0x08559: (0, "InternalizedStringMap"), 0x08581: (1, "ConsInternalizedStringMap"), - 0x085a9: (5, "ConsAsciiInternalizedStringMap"), + 0x085a9: (5, "ConsOneByteInternalizedStringMap"), 0x085d1: (2, "ExternalInternalizedStringMap"), 0x085f9: (10, "ExternalInternalizedStringWithOneByteDataMap"), - 0x08621: (6, "ExternalAsciiInternalizedStringMap"), + 0x08621: (6, "ExternalOneByteInternalizedStringMap"), 0x08649: (18, "ShortExternalInternalizedStringMap"), 0x08671: (26, "ShortExternalInternalizedStringWithOneByteDataMap"), - 0x08699: (22, "ShortExternalAsciiInternalizedStringMap"), - 0x086c1: (86, "ShortExternalAsciiStringMap"), + 0x08699: (22, "ShortExternalOneByteInternalizedStringMap"), + 0x086c1: (86, "ShortExternalOneByteStringMap"), 0x086e9: (64, "UndetectableStringMap"), - 0x08711: (68, "UndetectableAsciiStringMap"), + 0x08711: (68, "UndetectableOneByteStringMap"), 0x08739: (138, "ExternalInt8ArrayMap"), 0x08761: (139, "ExternalUint8ArrayMap"), 0x08789: (140, "ExternalInt16ArrayMap"), -- 2.7.4