mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fast-path for string constructors only works for new/call with a single argument (491989, r=dmandelin).
This commit is contained in:
parent
5f2681ef36
commit
89e9d61d35
@ -7696,7 +7696,7 @@ TraceRecorder::functionCall(uintN argc, JSOp mode)
|
||||
jsval* argv = &tval + 1;
|
||||
if (native == js_Array)
|
||||
return newArray(JSVAL_TO_OBJECT(fval), argc, argv, &fval);
|
||||
if (native == js_String && argc >= 1) {
|
||||
if (native == js_String && argc == 1) {
|
||||
if (mode == JSOP_NEW)
|
||||
return newString(JSVAL_TO_OBJECT(fval), 1, argv, &fval);
|
||||
if (!JSVAL_IS_PRIMITIVE(argv[0])) {
|
||||
|
@ -5187,6 +5187,14 @@ testShiftRightArithmetic.expected =
|
||||
"-2147483648,-1073741824,-16777216,-8388608,-65536,-32768,-256,-128,-1";
|
||||
test(testShiftRightArithmetic);
|
||||
|
||||
function testStringConstructorWithExtraArg() {
|
||||
for (let i = 0; i < 5; ++i)
|
||||
new String(new String(), 2);
|
||||
return "ok";
|
||||
}
|
||||
testStringConstructorWithExtraArg.expected = "ok";
|
||||
test(testStringConstructorWithExtraArg);
|
||||
|
||||
/*****************************************************************************
|
||||
* *
|
||||
* _____ _ _ _____ ______ _____ _______ *
|
||||
|
Loading…
Reference in New Issue
Block a user