Index: src/typedarray.js |
diff --git a/src/typedarray.js b/src/typedarray.js |
index c3e3ebd66765a7c8eb8cf33a6235c50a9fd5d0f3..2a71543104f85396d2b3f91bc3cc810e9e4b050f 100644 |
--- a/src/typedarray.js |
+++ b/src/typedarray.js |
@@ -27,8 +27,14 @@ |
"use strict"; |
+// This file relies on the fact that the following declaration has been made |
+// in runtime.js: |
+// var $Array = global.Array; |
+ |
var $ArrayBuffer = global.__ArrayBuffer; |
+// ------------------------------------------------------------------- |
+ |
function ArrayBufferConstructor(byteLength) { // length = 1 |
if (%_IsConstructCall()) { |
var l = TO_POSITIVE_INTEGER(byteLength); |
@@ -77,10 +83,9 @@ function ArrayBufferSlice(start, end) { |
} |
- |
// ------------------------------------------------------------------- |
-(function () { |
+function SetUpArrayBuffer() { |
%CheckIsBootstrapping(); |
// Set up the Uint16Array constructor function. |
@@ -94,5 +99,6 @@ function ArrayBufferSlice(start, end) { |
InstallFunctions($ArrayBuffer.prototype, DONT_ENUM, $Array( |
"slice", ArrayBufferSlice |
)); |
+} |
-})(); |
+SetUpArrayBuffer(); |