Changeset 261464 in webkit for trunk/Source/JavaScriptCore/testRegExp.cpp
- Timestamp:
- May 10, 2020, 7:36:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/testRegExp.cpp
r260415 r261464 119 119 static Structure* createStructure(VM& vm, JSValue prototype) 120 120 { 121 return Structure::create(vm, 0, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());121 return Structure::create(vm, nullptr, prototype, TypeInfo(GlobalObjectType, StructureFlags), info()); 122 122 } 123 123 … … 321 321 322 322 if (line[0] != '/') 323 return 0;323 return nullptr; 324 324 325 325 int i = scanString(line + 1, lineLength - 1, pattern, '/') + 1; 326 326 327 327 if ((i >= lineLength) || (line[i] != '/')) 328 return 0;328 return nullptr; 329 329 330 330 ++i; … … 350 350 351 351 if ((line[0] != ' ') || (line[1] != '"')) 352 return 0;352 return nullptr; 353 353 354 354 int i = scanString(line + 2, lineLength - 2, subjectString, '"') + 2; 355 355 356 356 if ((i >= (lineLength - 2)) || (line[i] != '"') || (line[i+1] != ',') || (line[i+2] != ' ')) 357 return 0;357 return nullptr; 358 358 359 359 i += 3; … … 362 362 363 363 if (sscanf(line + i, "%d, ", &offset) != 1) 364 return 0;364 return nullptr; 365 365 366 366 while (line[i] && line[i] != ' ') … … 372 372 373 373 if (sscanf(line + i, "%d, ", &matchResult) != 1) 374 return 0;374 return nullptr; 375 375 376 376 while (line[i] && line[i] != ' ') … … 380 380 381 381 if (line[i++] != '(') 382 return 0;382 return nullptr; 383 383 384 384 int start, end; … … 393 393 if (sscanf(line + i, "%d, %d", &start, &end) != 2) { 394 394 delete result; 395 return 0;395 return nullptr; 396 396 } 397 397 … … 409 409 if (!line[i] || (line[i] != ',')) { 410 410 delete result; 411 return 0;411 return nullptr; 412 412 } 413 413 i++; … … 437 437 } 438 438 439 RegExp* regexp = 0;439 RegExp* regexp = nullptr; 440 440 size_t lineLength = 0; 441 char* linePtr = 0;441 char* linePtr = nullptr; 442 442 unsigned int lineNumber = 0; 443 443 const char* regexpError = nullptr; … … 475 475 } else if (linePtr[0] == '-') { 476 476 tests++; 477 regexp = 0; // Reset the live regexp to avoid confusing other subsequent tests477 regexp = nullptr; // Reset the live regexp to avoid confusing other subsequent tests 478 478 bool successfullyParsed = parseRegExpLine(vm, linePtr + 1, lineLength - 1, ®expError); 479 479 if (successfullyParsed) {
Note:
See TracChangeset
for help on using the changeset viewer.