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

Unified Diff: src/bootstrapper.cc

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/accessors.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 38c5331fe63de5a2bb1fbbf6d388afd002ad6f74..78a80ca3df32ca09a028ccfd76462347df076094 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1606,17 +1606,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
}
{ // -- T y p e d A r r a y s
- // Create the %TypedArrayPrototype%
- Handle<JSObject> typed_array_prototype =
- factory->NewJSObject(isolate->object_function(), TENURED);
- native_context()->set_typed_array_prototype(*typed_array_prototype);
-
- Handle<JSFunction> typed_array_fun = CreateFunction(
- isolate, factory->InternalizeUtf8String("TypedArray"), JS_OBJECT_TYPE,
- JSObject::kHeaderSize, typed_array_prototype, Builtins::kIllegal);
- InstallWithIntrinsicDefaultProto(isolate, typed_array_fun,
- Context::TYPED_ARRAY_FUN_INDEX);
-
#define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
{ \
Handle<JSFunction> fun; \
@@ -1939,17 +1928,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
void Genesis::InstallTypedArray(const char* name, ElementsKind elements_kind,
Handle<JSFunction>* fun) {
Handle<JSObject> global = Handle<JSObject>(native_context()->global_object());
-
- Handle<JSObject> typed_array_prototype =
- Handle<JSObject>(isolate()->typed_array_prototype());
- Handle<JSFunction> typed_array_function =
- Handle<JSFunction>(isolate()->typed_array_function());
-
- Handle<JSObject> prototype =
- factory()->NewJSObject(isolate()->object_function(), TENURED);
- Handle<JSFunction> result =
- InstallFunction(global, name, JS_TYPED_ARRAY_TYPE, JSTypedArray::kSize,
- prototype, Builtins::kIllegal);
+ Handle<JSFunction> result = InstallFunction(
+ global, name, JS_TYPED_ARRAY_TYPE, JSTypedArray::kSize,
+ isolate()->initial_object_prototype(), Builtins::kIllegal);
Handle<Map> initial_map = isolate()->factory()->NewMap(
JS_TYPED_ARRAY_TYPE,
@@ -1957,15 +1938,6 @@ void Genesis::InstallTypedArray(const char* name, ElementsKind elements_kind,
elements_kind);
JSFunction::SetInitialMap(result, initial_map,
handle(initial_map->prototype(), isolate()));
-
- CHECK(JSObject::SetPrototype(result, typed_array_function, false,
- Object::DONT_THROW)
- .FromJust());
-
- CHECK(JSObject::SetPrototype(prototype, typed_array_prototype, false,
- Object::DONT_THROW)
- .FromJust());
-
*fun = result;
}
« no previous file with comments | « src/accessors.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698