Changeset 227725 in webkit for trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp
- Timestamp:
- Jan 29, 2018, 2:43:13 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp
r226928 r227725 251 251 } 252 252 253 static CString regexpToSourceString(RegExp* regExp)254 {255 char postfix[7] = { '/', 0, 0, 0, 0, 0, 0 };256 int index = 1;257 if (regExp->global())258 postfix[index++] = 'g';259 if (regExp->ignoreCase())260 postfix[index++] = 'i';261 if (regExp->multiline())262 postfix[index] = 'm';263 if (regExp->dotAll())264 postfix[index++] = 's';265 if (regExp->unicode())266 postfix[index++] = 'u';267 if (regExp->sticky())268 postfix[index++] = 'y';269 270 return toCString("/", regExp->pattern().impl(), postfix);271 }272 273 253 static CString regexpName(int re, RegExp* regexp) 274 254 { 275 return toCString(regexp ToSourceString(regexp), "(@re", re, ")");255 return toCString(regexp->toSourceString(), "(@re", re, ")"); 276 256 } 277 257 … … 1749 1729 size_t i = 0; 1750 1730 do { 1751 out.print f(" re%u = %s\n", static_cast<unsigned>(i), regexpToSourceString(block()->regexp(i)).data());1731 out.print(" re", i, " = ", block()->regexp(i)->toSourceString(), "\n"); 1752 1732 ++i; 1753 1733 } while (i < count);
Note:
See TracChangeset
for help on using the changeset viewer.