From 550e3980737a005e70c42b94db3b545bbbd4f597 Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Mon, 26 Jan 2009 21:05:59 -0800 Subject: [PATCH] Correct incorrectly reversed order of argument types in builtin description (472533, r=brendan). --- js/src/jsbuiltins.h | 10 +++++----- js/src/trace-test.js | 7 +++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/js/src/jsbuiltins.h b/js/src/jsbuiltins.h index 270a3a9de5ac..00e6a7607f06 100644 --- a/js/src/jsbuiltins.h +++ b/js/src/jsbuiltins.h @@ -255,27 +255,27 @@ struct JSTraceableNative { #define _JS_TN_INIT_HELPER_2(linkage, rt, op, at0, at1, cse, fold) \ &_JS_CALLINFO(op), \ _JS_CTYPE_PCH(at1) _JS_CTYPE_PCH(at0), \ - _JS_CTYPE_ACH(at0) _JS_CTYPE_ACH(at1), \ + _JS_CTYPE_ACH(at1) _JS_CTYPE_ACH(at0), \ _JS_CTYPE_FLAGS(rt) #define _JS_TN_INIT_HELPER_3(linkage, rt, op, at0, at1, at2, cse, fold) \ &_JS_CALLINFO(op), \ _JS_CTYPE_PCH(at2) _JS_CTYPE_PCH(at1) _JS_CTYPE_PCH(at0), \ - _JS_CTYPE_ACH(at0) _JS_CTYPE_ACH(at1) _JS_CTYPE_ACH(at2), \ + _JS_CTYPE_ACH(at2) _JS_CTYPE_ACH(at1) _JS_CTYPE_ACH(at0), \ _JS_CTYPE_FLAGS(rt) #define _JS_TN_INIT_HELPER_4(linkage, rt, op, at0, at1, at2, at3, cse, fold) \ &_JS_CALLINFO(op), \ _JS_CTYPE_PCH(at3) _JS_CTYPE_PCH(at2) _JS_CTYPE_PCH(at1) _JS_CTYPE_PCH(at0), \ - _JS_CTYPE_ACH(at0) _JS_CTYPE_ACH(at1) _JS_CTYPE_ACH(at2) _JS_CTYPE_ACH(at3), \ + _JS_CTYPE_ACH(at3) _JS_CTYPE_ACH(at2) _JS_CTYPE_ACH(at1) _JS_CTYPE_ACH(at0), \ _JS_CTYPE_FLAGS(rt) #define _JS_TN_INIT_HELPER_5(linkage, rt, op, at0, at1, at2, at3, at4, cse, fold) \ &_JS_CALLINFO(op), \ _JS_CTYPE_PCH(at4) _JS_CTYPE_PCH(at3) _JS_CTYPE_PCH(at2) _JS_CTYPE_PCH(at1) \ _JS_CTYPE_PCH(at0), \ - _JS_CTYPE_ACH(at0) _JS_CTYPE_ACH(at1) _JS_CTYPE_ACH(at2) _JS_CTYPE_ACH(at3) \ - _JS_CTYPE_ACH(at4), \ + _JS_CTYPE_ACH(at4) _JS_CTYPE_ACH(at3) _JS_CTYPE_ACH(at2) _JS_CTYPE_ACH(at1) \ + _JS_CTYPE_ACH(at0), \ _JS_CTYPE_FLAGS(rt) #define JS_DEFINE_TRCINFO_1(name, tn0) \ diff --git a/js/src/trace-test.js b/js/src/trace-test.js index 86f9d3ece961..179716559a74 100644 --- a/js/src/trace-test.js +++ b/js/src/trace-test.js @@ -4034,6 +4034,13 @@ function testBug474769() { testBug474769.expected = 1; test(testBug474769); +function testReverseArgTypes() { + for (var j = 0; j < 4; ++j) ''.replace('', /x/); + return 1; +} +testReverseArgTypes.expected = 1; +test(testReverseArgTypes); + /***************************************************************************** * * * _____ _ _ _____ ______ _____ _______ *