OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 (function(global, utils, extrasUtils) { | 5 (function(global, utils, extrasUtils) { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 %CheckIsBootstrapping(); | 238 %CheckIsBootstrapping(); |
239 %ExportExperimentalFromRuntime(exports_container); | 239 %ExportExperimentalFromRuntime(exports_container); |
240 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { | 240 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { |
241 imports(exports_container); | 241 imports(exports_container); |
242 } | 242 } |
243 for ( ; !IS_UNDEFINED(imports_from_experimental); | 243 for ( ; !IS_UNDEFINED(imports_from_experimental); |
244 imports_from_experimental = imports_from_experimental.next) { | 244 imports_from_experimental = imports_from_experimental.next) { |
245 imports_from_experimental(exports_container); | 245 imports_from_experimental(exports_container); |
246 } | 246 } |
247 | 247 |
| 248 utils.InitializeRNG(); |
| 249 utils.InitializeRNG = UNDEFINED; |
248 utils.CreateDoubleResultArray(); | 250 utils.CreateDoubleResultArray(); |
249 utils.CreateDoubleResultArray = UNDEFINED; | 251 utils.CreateDoubleResultArray = UNDEFINED; |
250 | 252 |
251 utils.Export = UNDEFINED; | 253 utils.Export = UNDEFINED; |
252 utils.PostDebug = UNDEFINED; | 254 utils.PostDebug = UNDEFINED; |
253 utils.PostExperimentals = UNDEFINED; | 255 utils.PostExperimentals = UNDEFINED; |
254 typed_array_setup = UNDEFINED; | 256 typed_array_setup = UNDEFINED; |
255 } | 257 } |
256 | 258 |
257 | 259 |
258 function PostDebug(utils) { | 260 function PostDebug(utils) { |
259 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { | 261 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { |
260 imports(exports_container); | 262 imports(exports_container); |
261 } | 263 } |
262 | 264 |
| 265 utils.InitializeRNG(); |
| 266 utils.InitializeRNG = UNDEFINED; |
263 utils.CreateDoubleResultArray(); | 267 utils.CreateDoubleResultArray(); |
264 utils.CreateDoubleResultArray = UNDEFINED; | 268 utils.CreateDoubleResultArray = UNDEFINED; |
265 | 269 |
266 exports_container = UNDEFINED; | 270 exports_container = UNDEFINED; |
267 | 271 |
268 utils.Export = UNDEFINED; | 272 utils.Export = UNDEFINED; |
269 utils.Import = UNDEFINED; | 273 utils.Import = UNDEFINED; |
270 utils.ImportNow = UNDEFINED; | 274 utils.ImportNow = UNDEFINED; |
271 utils.PostDebug = UNDEFINED; | 275 utils.PostDebug = UNDEFINED; |
272 utils.PostExperimentals = UNDEFINED; | 276 utils.PostExperimentals = UNDEFINED; |
273 typed_array_setup = UNDEFINED; | 277 typed_array_setup = UNDEFINED; |
274 } | 278 } |
275 | 279 |
276 | 280 |
277 function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) { | 281 function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) { |
278 var setup_list = typed_array_setup; | 282 var setup_list = typed_array_setup; |
279 | 283 |
280 for ( ; !IS_UNDEFINED(setup_list); setup_list = setup_list.next) { | 284 for ( ; !IS_UNDEFINED(setup_list); setup_list = setup_list.next) { |
281 setup_list(rng_state, rempio2result); | 285 setup_list(rng_state, rempio2result); |
282 } | 286 } |
283 } | 287 } |
284 | 288 |
285 | 289 |
286 // ----------------------------------------------------------------------- | 290 // ----------------------------------------------------------------------- |
287 | 291 |
288 %OptimizeObjectForAddingMultipleProperties(utils, 14); | 292 %OptimizeObjectForAddingMultipleProperties(utils, 15); |
289 | 293 |
290 utils.Import = Import; | 294 utils.Import = Import; |
291 utils.ImportNow = ImportNow; | 295 utils.ImportNow = ImportNow; |
292 utils.Export = Export; | 296 utils.Export = Export; |
293 utils.ImportFromExperimental = ImportFromExperimental; | 297 utils.ImportFromExperimental = ImportFromExperimental; |
294 utils.SetFunctionName = SetFunctionName; | 298 utils.SetFunctionName = SetFunctionName; |
295 utils.InstallConstants = InstallConstants; | 299 utils.InstallConstants = InstallConstants; |
296 utils.InstallFunctions = InstallFunctions; | 300 utils.InstallFunctions = InstallFunctions; |
297 utils.InstallGetter = InstallGetter; | 301 utils.InstallGetter = InstallGetter; |
298 utils.InstallGetterSetter = InstallGetterSetter; | 302 utils.InstallGetterSetter = InstallGetterSetter; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 346 |
343 extrasUtils.uncurryThis = function uncurryThis(func) { | 347 extrasUtils.uncurryThis = function uncurryThis(func) { |
344 return function(thisArg) { | 348 return function(thisArg) { |
345 return %Apply(func, thisArg, arguments, 1, arguments.length - 1); | 349 return %Apply(func, thisArg, arguments, 1, arguments.length - 1); |
346 }; | 350 }; |
347 }; | 351 }; |
348 | 352 |
349 %ToFastProperties(extrasUtils); | 353 %ToFastProperties(extrasUtils); |
350 | 354 |
351 }) | 355 }) |
OLD | NEW |