Changeset 127191 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
- Timestamp:
- Aug 30, 2012, 2:23:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r113454 r127191 35 35 #include "Nodes.h" 36 36 #include "Parser.h" 37 #include "UStringBuilder.h"38 37 #include <wtf/dtoa.h> 39 38 #include <stdio.h> … … 43 42 #include <wtf/MathExtras.h> 44 43 #include <wtf/StringExtras.h> 44 #include <wtf/text/StringBuilder.h> 45 45 #include <wtf/unicode/UTF8.h> 46 46 … … 143 143 { 144 144 JSStringBuilder builder; 145 UString str = exec->argument(0).toString(exec)->value(exec);145 String str = exec->argument(0).toString(exec)->value(exec); 146 146 147 147 if (str.is8Bit()) … … 233 233 template <typename CharType> 234 234 ALWAYS_INLINE 235 static double parseInt(const UString& s, const CharType* data, int radix)235 static double parseInt(const String& s, const CharType* data, int radix) 236 236 { 237 237 // 1. Let inputString be ToString(string). … … 314 314 } 315 315 316 static double parseInt(const UString& s, int radix)316 static double parseInt(const String& s, int radix) 317 317 { 318 318 if (s.is8Bit()) … … 433 433 434 434 // See ecma-262 9.3.1 435 double jsToNumber(const UString& s)435 double jsToNumber(const String& s) 436 436 { 437 437 unsigned size = s.length(); … … 451 451 } 452 452 453 static double parseFloat(const UString& s)453 static double parseFloat(const String& s) 454 454 { 455 455 unsigned size = s.length(); … … 506 506 return JSValue::encode(x); 507 507 508 UString s = x.toString(exec)->value(exec);508 String s = x.toString(exec)->value(exec); 509 509 510 510 if (s.is8Bit()) { … … 549 549 550 550 // If ToString throws, we shouldn't call ToInt32. 551 UString s = value.toString(exec)->value(exec);551 String s = value.toString(exec)->value(exec); 552 552 if (exec->hadException()) 553 553 return JSValue::encode(jsUndefined()); … … 616 616 617 617 JSStringBuilder builder; 618 UString str = exec->argument(0).toString(exec)->value(exec);618 String str = exec->argument(0).toString(exec)->value(exec); 619 619 if (str.is8Bit()) { 620 620 const LChar* c = str.characters8(); … … 654 654 EncodedJSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec) 655 655 { 656 UStringBuilder builder;657 UString str = exec->argument(0).toString(exec)->value(exec);656 StringBuilder builder; 657 String str = exec->argument(0).toString(exec)->value(exec); 658 658 int k = 0; 659 659 int len = str.length(); … … 700 700 } 701 701 702 return JSValue::encode(jsString(exec, builder.to UString()));702 return JSValue::encode(jsString(exec, builder.toString())); 703 703 } 704 704
Note:
See TracChangeset
for help on using the changeset viewer.