Changeset 127191 in webkit for trunk/Source/JavaScriptCore/testRegExp.cpp
- Timestamp:
- Aug 30, 2012, 2:23:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/testRegExp.cpp
r121381 r127191 25 25 #include "InitializeThreading.h" 26 26 #include "JSGlobalObject.h" 27 #include "UStringBuilder.h"28 27 #include <errno.h> 29 28 #include <stdio.h> 30 29 #include <stdlib.h> 31 30 #include <string.h> 31 #include <wtf/text/StringBuilder.h> 32 32 33 33 #if !OS(WINDOWS) … … 64 64 bool interactive; 65 65 bool verbose; 66 Vector< UString> arguments;67 Vector< UString> files;66 Vector<String> arguments; 67 Vector<String> files; 68 68 }; 69 69 … … 101 101 } 102 102 103 UString subject;103 String subject; 104 104 int offset; 105 105 int result; … … 109 109 class GlobalObject : public JSGlobalObject { 110 110 private: 111 GlobalObject(JSGlobalData&, Structure*, const Vector< UString>& arguments);111 GlobalObject(JSGlobalData&, Structure*, const Vector<String>& arguments); 112 112 113 113 public: 114 114 typedef JSGlobalObject Base; 115 115 116 static GlobalObject* create(JSGlobalData& globalData, Structure* structure, const Vector< UString>& arguments)116 static GlobalObject* create(JSGlobalData& globalData, Structure* structure, const Vector<String>& arguments) 117 117 { 118 118 return new (NotNull, allocateCell<GlobalObject>(globalData.heap)) GlobalObject(globalData, structure, arguments); … … 127 127 128 128 protected: 129 void finishCreation(JSGlobalData& globalData, const Vector< UString>& arguments)129 void finishCreation(JSGlobalData& globalData, const Vector<String>& arguments) 130 130 { 131 131 Base::finishCreation(globalData); … … 139 139 const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(GlobalObject) }; 140 140 141 GlobalObject::GlobalObject(JSGlobalData& globalData, Structure* structure, const Vector< UString>& arguments)141 GlobalObject::GlobalObject(JSGlobalData& globalData, Structure* structure, const Vector<String>& arguments) 142 142 : JSGlobalObject(globalData, structure) 143 143 { … … 240 240 } 241 241 242 static int scanString(char* buffer, int bufferLength, UStringBuilder& builder, char termChar)242 static int scanString(char* buffer, int bufferLength, StringBuilder& builder, char termChar) 243 243 { 244 244 bool escape = false; … … 308 308 static RegExp* parseRegExpLine(JSGlobalData& globalData, char* line, int lineLength) 309 309 { 310 UStringBuilder pattern;310 StringBuilder pattern; 311 311 312 312 if (line[0] != '/') … … 320 320 ++i; 321 321 322 return RegExp::create(globalData, pattern.to UString(), regExpFlags(line + i));322 return RegExp::create(globalData, pattern.toString(), regExpFlags(line + i)); 323 323 } 324 324 325 325 static RegExpTest* parseTestLine(char* line, int lineLength) 326 326 { 327 UStringBuilder subjectString;327 StringBuilder subjectString; 328 328 329 329 if ((line[0] != ' ') || (line[1] != '"')) … … 364 364 RegExpTest* result = new RegExpTest(); 365 365 366 result->subject = subjectString.to UString();366 result->subject = subjectString.toString(); 367 367 result->offset = offset; 368 368 result->result = matchResult; … … 395 395 } 396 396 397 static bool runFromFiles(GlobalObject* globalObject, const Vector< UString>& files, bool verbose)398 { 399 UString script;400 UString fileName;397 static bool runFromFiles(GlobalObject* globalObject, const Vector<String>& files, bool verbose) 398 { 399 String script; 400 String fileName; 401 401 Vector<char> scriptBuffer; 402 402 unsigned tests = 0;
Note:
See TracChangeset
for help on using the changeset viewer.