| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 | 85 |
| 86 function testRenamedMethod() { | 86 function testRenamedMethod() { |
| 87 function a$b$c$d() { return FAIL; } | 87 function a$b$c$d() { return FAIL; } |
| 88 function Wookie() { } | 88 function Wookie() { } |
| 89 Wookie.prototype.d = a$b$c$d; | 89 Wookie.prototype.d = a$b$c$d; |
| 90 (new Wookie).d(); | 90 (new Wookie).d(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 function testAnonymousMethod() { | 93 function testAnonymousMethod() { |
| 94 (function () { FAIL }).call([1, 2, 3]); | 94 (function () { FAIL; }).call([1, 2, 3]); |
| 95 } | 95 } |
| 96 | 96 |
| 97 function CustomError(message, stripPoint) { | 97 function CustomError(message, stripPoint) { |
| 98 this.message = message; | 98 this.message = message; |
| 99 Error.captureStackTrace(this, stripPoint); | 99 Error.captureStackTrace(this, stripPoint); |
| 100 } | 100 } |
| 101 | 101 |
| 102 CustomError.prototype.toString = function () { | 102 CustomError.prototype.toString = function () { |
| 103 return "CustomError: " + this.message; | 103 return "CustomError: " + this.message; |
| 104 }; | 104 }; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 testTraceNativeConstructor(Date); // Does ToNumber on argument. | 268 testTraceNativeConstructor(Date); // Does ToNumber on argument. |
| 269 | 269 |
| 270 // Omitted because QuickSort has builtins object as receiver, and is non-native | 270 // Omitted because QuickSort has builtins object as receiver, and is non-native |
| 271 // builtin. | 271 // builtin. |
| 272 testOmittedBuiltin(function(){ [thrower, 2].sort(function (a,b) { | 272 testOmittedBuiltin(function(){ [thrower, 2].sort(function (a,b) { |
| 273 (b < a) - (a < b); }); | 273 (b < a) - (a < b); }); |
| 274 }, "QuickSort"); | 274 }, "QuickSort"); |
| 275 | 275 |
| 276 // Omitted because ADD from runtime.js is non-native builtin. | 276 // Omitted because ADD from runtime.js is non-native builtin. |
| 277 testOmittedBuiltin(function(){ thrower + 2; }, "ADD"); | 277 testOmittedBuiltin(function(){ thrower + 2; }, "ADD"); |
| OLD | NEW |