Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1622)

Unified Diff: src/typedarray.js

Issue 14125004: Move global code for builtins into setup functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/symbol.js ('k') | src/uri.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/symbol.js ('k') | src/uri.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698