OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 return %_CallFunction(receiver, f); | 156 return %_CallFunction(receiver, f); |
157 } | 157 } |
158 | 158 |
159 | 159 |
160 // ---------------------------------------------------------------------------- | 160 // ---------------------------------------------------------------------------- |
161 | 161 |
162 | 162 |
163 function SetupGlobal() { | 163 function SetupGlobal() { |
164 // ECMA 262 - 15.1.1.1. | 164 // ECMA 262 - 15.1.1.1. |
165 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE | READ_ONLY); | 165 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE); |
166 | 166 |
167 // ECMA-262 - 15.1.1.2. | 167 // ECMA-262 - 15.1.1.2. |
168 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE | READ_ONLY); | 168 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE); |
169 | 169 |
170 // ECMA-262 - 15.1.1.3. | 170 // ECMA-262 - 15.1.1.3. |
171 %SetProperty(global, "undefined", void 0, | 171 %SetProperty(global, "undefined", void 0, DONT_ENUM | DONT_DELETE); |
172 DONT_ENUM | DONT_DELETE | READ_ONLY); | |
173 | 172 |
174 // Setup non-enumerable function on the global object. | 173 // Setup non-enumerable function on the global object. |
175 InstallFunctions(global, DONT_ENUM, $Array( | 174 InstallFunctions(global, DONT_ENUM, $Array( |
176 "isNaN", GlobalIsNaN, | 175 "isNaN", GlobalIsNaN, |
177 "isFinite", GlobalIsFinite, | 176 "isFinite", GlobalIsFinite, |
178 "parseInt", GlobalParseInt, | 177 "parseInt", GlobalParseInt, |
179 "parseFloat", GlobalParseFloat, | 178 "parseFloat", GlobalParseFloat, |
180 "eval", GlobalEval | 179 "eval", GlobalEval |
181 )); | 180 )); |
182 } | 181 } |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1533 // ---------------------------------------------------------------------------- | 1532 // ---------------------------------------------------------------------------- |
1534 | 1533 |
1535 function SetupFunction() { | 1534 function SetupFunction() { |
1536 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1535 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
1537 "bind", FunctionBind, | 1536 "bind", FunctionBind, |
1538 "toString", FunctionToString | 1537 "toString", FunctionToString |
1539 )); | 1538 )); |
1540 } | 1539 } |
1541 | 1540 |
1542 SetupFunction(); | 1541 SetupFunction(); |
OLD | NEW |