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

Unified Diff: src/bootstrapper.cc

Issue 1421703004: Initialize maths result array in JS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/js/prologue.js » ('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 47f9ff42cb9e57f013708c8518087021282edeb9..bde867442585bb44732512edbae9b4342f69014e 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -197,8 +197,6 @@ class Genesis BASE_EMBEDDED {
Handle<JSFunction> empty_function,
ContextType context_type);
void InitializeExperimentalGlobal();
- // Typed arrays are not serializable and have to initialized afterwards.
- bool InitializeBuiltinTypedArrays();
// Depending on the situation, expose and/or get rid of the utils object.
void ConfigureUtilsObject(ContextType context_type);
@@ -1789,26 +1787,6 @@ Handle<JSTypedArray> CreateTypedArray(Isolate* isolate, ExternalArrayType type,
}
-bool Genesis::InitializeBuiltinTypedArrays() {
- HandleScope scope(isolate());
- const size_t num_elements = 2;
- double* data = NULL;
- Handle<JSTypedArray> rempio2result =
- CreateTypedArray(isolate(), kExternalFloat64Array, num_elements, &data);
- for (size_t i = 0; i < num_elements; i++) data[i] = 0;
-
- Handle<JSObject> utils =
- Handle<JSObject>::cast(isolate()->natives_utils_object());
- Handle<String> name_string = isolate()->factory()->NewStringFromAsciiChecked(
- "InitializeBuiltinTypedArrays");
- Handle<Object> fun = JSObject::GetDataProperty(utils, name_string);
- Handle<Object> receiver = isolate()->factory()->undefined_value();
- Handle<Object> args[] = {utils, rempio2result};
- return !Execution::Call(isolate(), fun, receiver, arraysize(args), args)
- .is_null();
-}
-
-
void Genesis::ConfigureUtilsObject(ContextType context_type) {
switch (context_type) {
// We still need the utils object to find debug functions.
@@ -3253,7 +3231,6 @@ Genesis::Genesis(Isolate* isolate,
// snapshot as we should be able to turn them off at runtime. Re-installing
// them after they have already been deserialized would also fail.
if (context_type == FULL_CONTEXT) {
- if (!InitializeBuiltinTypedArrays()) return;
if (!isolate->serializer_enabled()) {
InitializeExperimentalGlobal();
if (!InstallExperimentalNatives()) return;
@@ -3266,7 +3243,6 @@ Genesis::Genesis(Isolate* isolate,
// for each new context.
} else if (context_type == DEBUG_CONTEXT) {
DCHECK(!isolate->serializer_enabled());
- if (!InitializeBuiltinTypedArrays()) return;
InitializeExperimentalGlobal();
if (!InstallDebuggerNatives()) return;
}
« no previous file with comments | « no previous file | src/js/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698