| OLD | NEW | 
|---|
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 24 matching lines...) Expand all  Loading... | 
| 35 | 35 | 
| 36 // Array.prototype functions. | 36 // Array.prototype functions. | 
| 37 var arrayPrototypeFunctions = [ | 37 var arrayPrototypeFunctions = [ | 
| 38     "toString", "toLocaleString", "join", "pop", "push", "concat", "reverse", | 38     "toString", "toLocaleString", "join", "pop", "push", "concat", "reverse", | 
| 39     "shift", "unshift", "slice", "splice", "sort", "filter", "forEach", | 39     "shift", "unshift", "slice", "splice", "sort", "filter", "forEach", | 
| 40     "some", "every", "map", "indexOf", "lastIndexOf"]; | 40     "some", "every", "map", "indexOf", "lastIndexOf"]; | 
| 41 | 41 | 
| 42 TestFunctionNames(Array.prototype, arrayPrototypeFunctions); | 42 TestFunctionNames(Array.prototype, arrayPrototypeFunctions); | 
| 43 | 43 | 
| 44 | 44 | 
|  | 45 // Boolean prototype functions. | 
|  | 46 var booleanPrototypeFunctions = [ "toString", "valueOf" ]; | 
|  | 47 | 
|  | 48 TestFunctionNames(Boolean.prototype, booleanPrototypeFunctions); | 
|  | 49 | 
|  | 50 | 
| 45 // Date functions. | 51 // Date functions. | 
| 46 var dateFunctions = ["UTC", "parse", "now"]; | 52 var dateFunctions = ["UTC", "parse", "now"]; | 
| 47 | 53 | 
| 48 TestFunctionNames(Date, dateFunctions); | 54 TestFunctionNames(Date, dateFunctions); | 
| 49 | 55 | 
| 50 | 56 | 
| 51 // Date.prototype functions. | 57 // Date.prototype functions. | 
| 52 var datePrototypeFunctions = [ | 58 var datePrototypeFunctions = [ | 
| 53     "toString", "toDateString", "toTimeString", "toLocaleString", | 59     "toString", "toDateString", "toTimeString", "toLocaleString", | 
| 54     "toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime", | 60     "toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime", | 
| 55     "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", | 61     "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", | 
| 56     "getDate", "getUTCDate", "getDay", "getUTCDay", "getHours", | 62     "getDate", "getUTCDate", "getDay", "getUTCDay", "getHours", | 
| 57     "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds", | 63     "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds", | 
| 58     "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", | 64     "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", | 
| 59     "getTimezoneOffset", "setTime", "setMilliseconds", | 65     "getTimezoneOffset", "setTime", "setMilliseconds", | 
| 60     "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", | 66     "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", | 
| 61     "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", | 67     "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", | 
| 62     "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toGMTString", | 68     "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toGMTString", | 
| 63     "toUTCString", "getYear", "setYear"]; | 69     "toUTCString", "getYear", "setYear"]; | 
| 64 | 70 | 
| 65 TestFunctionNames(Date.prototype, datePrototypeFunctions); | 71 TestFunctionNames(Date.prototype, datePrototypeFunctions); | 
| 66 | 72 | 
| 67 | 73 | 
|  | 74 // Function.prototype functions. | 
|  | 75 var functionPrototypeFunctions = [ "toString", "apply", "call" ]; | 
|  | 76 | 
|  | 77 TestFunctionNames(Function.prototype, functionPrototypeFunctions); | 
|  | 78 | 
| 68 // Math functions. | 79 // Math functions. | 
| 69 var mathFunctions = [ | 80 var mathFunctions = [ | 
| 70     "random", "abs", "acos", "asin", "atan", "ceil", "cos", "exp", "floor", | 81     "random", "abs", "acos", "asin", "atan", "ceil", "cos", "exp", "floor", | 
| 71     "log", "round", "sin", "sqrt", "tan", "atan2", "pow", "max", "min"]; | 82     "log", "round", "sin", "sqrt", "tan", "atan2", "pow", "max", "min"]; | 
| 72 | 83 | 
| 73 TestFunctionNames(Math, mathFunctions); | 84 TestFunctionNames(Math, mathFunctions); | 
| 74 | 85 | 
| 75 | 86 | 
|  | 87 // Number.prototype functions. | 
|  | 88 var numberPrototypeFunctions = [ | 
|  | 89     "toString", "toLocaleString", "valueOf", "toFixed", "toExponential", | 
|  | 90     "toPrecision"]; | 
|  | 91 | 
|  | 92 TestFunctionNames(Number.prototype, numberPrototypeFunctions); | 
|  | 93 | 
|  | 94 // Object.prototype functions. | 
|  | 95 var objectPrototypeFunctions = [ | 
|  | 96     "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", | 
|  | 97     "propertyIsEnumerable", "__defineGetter__", "__lookupGetter__", | 
|  | 98     "__defineSetter__", "__lookupSetter__"]; | 
|  | 99 | 
|  | 100 TestFunctionNames(Object.prototype, objectPrototypeFunctions); | 
|  | 101 | 
| 76 // RegExp.prototype functions. | 102 // RegExp.prototype functions. | 
| 77 var regExpPrototypeFunctions = ["exec", "test", "toString", "compile"]; | 103 var regExpPrototypeFunctions = ["exec", "test", "toString", "compile"]; | 
| 78 | 104 | 
| 79 TestFunctionNames(RegExp.prototype, regExpPrototypeFunctions); | 105 TestFunctionNames(RegExp.prototype, regExpPrototypeFunctions); | 
| 80 | 106 | 
| 81 // String functions. | 107 // String functions. | 
| 82 var stringFunctions = ["fromCharCode"]; | 108 var stringFunctions = ["fromCharCode"]; | 
| 83 | 109 | 
| 84 TestFunctionNames(String, stringFunctions); | 110 TestFunctionNames(String, stringFunctions); | 
| 85 | 111 | 
| 86 | 112 | 
| 87 // String.prototype functions. | 113 // String.prototype functions. | 
| 88 var stringPrototypeFunctions = [ | 114 var stringPrototypeFunctions = [ | 
| 89     "toString", "valueOf", "charAt", "charCodeAt", "concat", "indexOf", | 115     "toString", "valueOf", "charAt", "charCodeAt", "concat", "indexOf", | 
| 90     "lastIndexOf", "localeCompare", "match", "replace", "search", "slice", | 116     "lastIndexOf", "localeCompare", "match", "replace", "search", "slice", | 
| 91     "split", "substring", "substr", "toLowerCase", "toLocaleLowerCase", | 117     "split", "substring", "substr", "toLowerCase", "toLocaleLowerCase", | 
| 92     "toUpperCase", "toLocaleUpperCase", "link", "anchor", "fontcolor", | 118     "toUpperCase", "toLocaleUpperCase", "link", "anchor", "fontcolor", | 
| 93     "fontsize", "big", "blink", "bold", "fixed", "italics", "small", | 119     "fontsize", "big", "blink", "bold", "fixed", "italics", "small", | 
| 94     "strike", "sub", "sup"]; | 120     "strike", "sub", "sup"]; | 
| 95 | 121 | 
| 96 TestFunctionNames(String.prototype, stringPrototypeFunctions); | 122 TestFunctionNames(String.prototype, stringPrototypeFunctions); | 
| 97 | 123 | 
| 98 | 124 | 
| 99 // Global functions. | 125 // Global functions. | 
| 100 var globalFunctions = [ | 126 var globalFunctions = [ | 
| 101     "escape", "unescape", "decodeURI", "decodeURIComponent", | 127     "escape", "unescape", "decodeURI", "decodeURIComponent", | 
| 102     "encodeURI", "encodeURIComponent", "Error", "TypeError", | 128     "encodeURI", "encodeURIComponent", "Error", "TypeError", | 
| 103     "RangeError", "SyntaxError", "ReferenceError", "EvalError", | 129     "RangeError", "SyntaxError", "ReferenceError", "EvalError", | 
| 104     "URIError"]; | 130     "URIError", "isNaN", "isFinite", "parseInt", "parseFloat", | 
|  | 131     "eval", "execScript"]; | 
| 105 | 132 | 
| 106 TestFunctionNames(this, globalFunctions); | 133 TestFunctionNames(this, globalFunctions); | 
| OLD | NEW | 
|---|