Bug 536748: fix argument index typo, r=gal

This commit is contained in:
David Mandelin 2010-01-04 13:36:06 -08:00
parent 1b4fbd91e6
commit 6479d75e0d
2 changed files with 9 additions and 1 deletions

View File

@ -8385,7 +8385,7 @@ TraceRecorder::f2i(LIns* f)
}
if (ci == &js_String_p_charCodeAt0_ci) {
// Use a fast path builtin for a charCodeAt that converts to an int right away.
LIns* args[] = { fcallarg(f, 1) };
LIns* args[] = { fcallarg(f, 0) };
return lir->insCall(&js_String_p_charCodeAt0_int_ci, args);
}
if (ci == &js_String_p_charCodeAt_ci) {

View File

@ -0,0 +1,8 @@
// Do not assert.
var s = "a";
var b = 32767;
for (var i = 0; i < 10; ++i) {
b = b & s.charCodeAt();
}