Stop using plain Arrays internally in built-in functions.
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 3 Mar 2011 11:49:03 +0000 (11:49 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 3 Mar 2011 11:49:03 +0000 (11:49 +0000)
commit4707d7ac0821dadcddd178a0f526406b7bdb46e7
tree21ee1050c7d6613236544afe2811ff921f637d32
parent8fddb2a664326630d2c786828c8215c9df01a68c
Stop using plain Arrays internally in built-in functions.

In built-in code we use arrays for internal computations.
This makes it possible to affect the built-in code by putting getters
or setters on the Array prototype chain.
This adds a new internal Array constructor that creates Arrays with
a very simplistic prototype chain that doesn't include any publicly
visible objects. These Arrays shoudl ofcourse never leak outside the
builtins, since that would expose the prototype object.
The prototype object contains only the array functions that we use:
push, pop and join (and not even a toString, so it doesn't stringify
well).

Also change uses of .call to %_CallFunction.

BUG=1206

Review URL: http://codereview.chromium.org/6602081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/builtins-arm.cc
src/array.js
src/bootstrapper.cc
src/ia32/builtins-ia32.cc
src/json.js
src/objects.cc
src/regexp.js
src/string.js
src/v8natives.js
src/x64/builtins-x64.cc
src/x64/macro-assembler-x64.cc