Changeset 214272 in webkit
- Timestamp:
- Mar 22, 2017 1:07:21 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r214260 r214272 1 2017-03-22 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [JSC] Use jsNontrivialString for Number toString operations 4 https://bugs.webkit.org/show_bug.cgi?id=169965 5 6 Reviewed by Mark Lam. 7 8 * stress/to-string-int32.js: Added. 9 (shouldBe): 10 (toString10): 11 (expected): 12 1 13 2017-03-22 JF Bastien <jfbastien@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r214261 r214272 1 2017-03-22 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [JSC] Use jsNontrivialString for Number toString operations 4 https://bugs.webkit.org/show_bug.cgi?id=169965 5 6 Reviewed by Mark Lam. 7 8 After single character check, produced string is always longer than 1. 9 Thus, we can use jsNontrivialString. 10 11 * runtime/NumberPrototype.cpp: 12 (JSC::int32ToStringInternal): 13 1 14 2017-03-22 JF Bastien <jfbastien@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp
r214219 r214272 500 500 } 501 501 502 static inlineJSString* int32ToStringInternal(VM& vm, int32_t value, int32_t radix)502 static ALWAYS_INLINE JSString* int32ToStringInternal(VM& vm, int32_t value, int32_t radix) 503 503 { 504 504 ASSERT(!(radix < 2 || radix > 36)); … … 510 510 } 511 511 512 if (radix == 10) { 513 return jsString(&vm, vm.numericStrings.add(value)); 514 } 515 516 return jsString(&vm, toStringWithRadix(value, radix)); 512 if (radix == 10) 513 return jsNontrivialString(&vm, vm.numericStrings.add(value)); 514 515 return jsNontrivialString(&vm, toStringWithRadix(value, radix)); 517 516 518 517 }
Note: See TracChangeset
for help on using the changeset viewer.