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

Unified Diff: src/bootstrapper.cc

Issue 1262583002: Reland of "Remove ExternalArray, derived types, and element kinds" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 5 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/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('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 1c1f3c7357f2fb21ec1b6da90862bd6fe6af2f1c..5f2f9d3cd58010d086804aabb2b20921fe0a3231 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -235,11 +235,8 @@ class Genesis BASE_EMBEDDED {
ElementsKind elements_kind);
bool InstallNatives(ContextType context_type);
- void InstallTypedArray(
- const char* name,
- ElementsKind elements_kind,
- Handle<JSFunction>* fun,
- Handle<Map>* external_map);
+ void InstallTypedArray(const char* name, ElementsKind elements_kind,
+ Handle<JSFunction>* fun);
bool InstallExperimentalNatives();
bool InstallExtraNatives();
void InstallBuiltinFunctionIds();
@@ -1284,17 +1281,12 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
}
{ // -- T y p e d A r r a y s
-#define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
- { \
- Handle<JSFunction> fun; \
- Handle<Map> external_map; \
- InstallTypedArray(#Type "Array", \
- TYPE##_ELEMENTS, \
- &fun, \
- &external_map); \
- native_context()->set_##type##_array_fun(*fun); \
- native_context()->set_##type##_array_external_map(*external_map); \
- }
+#define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
+ { \
+ Handle<JSFunction> fun; \
+ InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \
+ native_context()->set_##type##_array_fun(*fun); \
+ }
TYPED_ARRAYS(INSTALL_TYPED_ARRAY)
#undef INSTALL_TYPED_ARRAY
@@ -1505,11 +1497,8 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
}
-void Genesis::InstallTypedArray(
- const char* name,
- ElementsKind elements_kind,
- Handle<JSFunction>* fun,
- Handle<Map>* external_map) {
+void Genesis::InstallTypedArray(const char* name, ElementsKind elements_kind,
+ Handle<JSFunction>* fun) {
Handle<JSObject> global = Handle<JSObject>(native_context()->global_object());
Handle<JSFunction> result = InstallFunction(
global, name, JS_TYPED_ARRAY_TYPE, JSTypedArray::kSize,
@@ -1522,9 +1511,6 @@ void Genesis::InstallTypedArray(
JSFunction::SetInitialMap(result, initial_map,
handle(initial_map->prototype(), isolate()));
*fun = result;
-
- ElementsKind external_kind = GetNextTransitionElementsKind(elements_kind);
- *external_map = Map::AsElementsKind(initial_map, external_kind);
}
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698