1function foo(s) { 2 return s[-1]; 3} 4 5noInline(foo); 6 7String.prototype[-1] = "hello"; 8 9for (var i = 0; i < 100000; ++i) { 10 var result = foo("hello"); 11 if (result != "hello") 12 throw "Error: bad result: " + result; 13} 14 15