OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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); | 165 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE | READ_ONLY); |
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); | 168 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE | READ_ONLY); |
169 | 169 |
170 // ECMA-262 - 15.1.1.3. | 170 // ECMA-262 - 15.1.1.3. |
171 %SetProperty(global, "undefined", void 0, DONT_ENUM | DONT_DELETE); | 171 %SetProperty(global, "undefined", void 0, |
| 172 DONT_ENUM | DONT_DELETE | READ_ONLY); |
172 | 173 |
173 // Setup non-enumerable function on the global object. | 174 // Setup non-enumerable function on the global object. |
174 InstallFunctions(global, DONT_ENUM, $Array( | 175 InstallFunctions(global, DONT_ENUM, $Array( |
175 "isNaN", GlobalIsNaN, | 176 "isNaN", GlobalIsNaN, |
176 "isFinite", GlobalIsFinite, | 177 "isFinite", GlobalIsFinite, |
177 "parseInt", GlobalParseInt, | 178 "parseInt", GlobalParseInt, |
178 "parseFloat", GlobalParseFloat, | 179 "parseFloat", GlobalParseFloat, |
179 "eval", GlobalEval | 180 "eval", GlobalEval |
180 )); | 181 )); |
181 } | 182 } |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 // ---------------------------------------------------------------------------- | 1524 // ---------------------------------------------------------------------------- |
1524 | 1525 |
1525 function SetupFunction() { | 1526 function SetupFunction() { |
1526 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1527 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
1527 "bind", FunctionBind, | 1528 "bind", FunctionBind, |
1528 "toString", FunctionToString | 1529 "toString", FunctionToString |
1529 )); | 1530 )); |
1530 } | 1531 } |
1531 | 1532 |
1532 SetupFunction(); | 1533 SetupFunction(); |
OLD | NEW |