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

Unified Diff: src/js/typedarray.js

Issue 1977983002: Revert "Fix TypedArray Property optimizations", add regression test and eliminate dead code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 4 years, 7 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/js/array-iterator.js ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/typedarray.js
diff --git a/src/js/typedarray.js b/src/js/typedarray.js
index 0f335d37b58abb575696875a08bc1b62913011ff..18f6dde29975de4ba34b824b5c9f57fa84061efe 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -68,8 +68,6 @@ endmacro
TYPED_ARRAYS(DECLARE_GLOBALS)
-var TypedArray = %object_get_prototype_of(GlobalUint8Array);
-
utils.Import(function(from) {
ArrayValues = from.ArrayValues;
GetIterator = from.GetIterator;
@@ -810,7 +808,7 @@ function TypedArrayFrom(source, mapfn, thisArg) {
}
%FunctionSetLength(TypedArrayFrom, 1);
-function TypedArrayConstructor() {
+function TypedArray() {
if (IS_UNDEFINED(new.target)) {
throw MakeTypeError(kConstructorNonCallable, "TypedArray");
}
@@ -821,10 +819,9 @@ function TypedArrayConstructor() {
// -------------------------------------------------------------------
-%SetCode(TypedArray, TypedArrayConstructor);
+%FunctionSetPrototype(TypedArray, new GlobalObject());
%AddNamedProperty(TypedArray.prototype,
"constructor", TypedArray, DONT_ENUM);
-
utils.InstallFunctions(TypedArray, DONT_ENUM, [
"from", TypedArrayFrom,
"of", TypedArrayOf
« no previous file with comments | « src/js/array-iterator.js ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698