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

Unified Diff: src/bootstrapper.cc

Issue 148343005: A64: Synchronize with r18147. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/ast.cc ('k') | src/builtins.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 c8486fb45849086751d2c9e389a25ed50e8430c8..99e7c065a9d5b726598973d1841ebacb565d14e2 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -41,6 +41,7 @@
#include "platform.h"
#include "snapshot.h"
#include "trig-table.h"
+#include "extensions/free-buffer-extension.h"
#include "extensions/externalize-string-extension.h"
#include "extensions/gc-extension.h"
#include "extensions/statistics-extension.h"
@@ -100,6 +101,9 @@ void Bootstrapper::Initialize(bool create_heap_objects) {
void Bootstrapper::InitializeOncePerProcess() {
+#ifdef ADDRESS_SANITIZER
+ FreeBufferExtension::Register();
+#endif
GCExtension::Register();
ExternalizeStringExtension::Register();
StatisticsExtension::Register();
@@ -1575,6 +1579,7 @@ void Genesis::InstallNativeFunctions() {
void Genesis::InstallExperimentalNativeFunctions() {
+ INSTALL_NATIVE(JSFunction, "RunMicrotasks", run_microtasks);
if (FLAG_harmony_proxies) {
INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap);
INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap);
@@ -1588,8 +1593,6 @@ void Genesis::InstallExperimentalNativeFunctions() {
observers_begin_perform_splice);
INSTALL_NATIVE(JSFunction, "EndPerformSplice",
observers_end_perform_splice);
- INSTALL_NATIVE(JSFunction, "DeliverChangeRecords",
- observers_deliver_changes);
}
}
@@ -2020,55 +2023,28 @@ bool Genesis::InstallNatives() {
}
+#define INSTALL_EXPERIMENTAL_NATIVE(i, flag, file) \
+ if (FLAG_harmony_##flag && \
+ strcmp(ExperimentalNatives::GetScriptName(i).start(), \
+ "native " file) == 0) { \
+ if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
+ }
+
+
bool Genesis::InstallExperimentalNatives() {
for (int i = ExperimentalNatives::GetDebuggerCount();
i < ExperimentalNatives::GetBuiltinsCount();
i++) {
- if (FLAG_harmony_symbols &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native symbol.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_proxies &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native proxy.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_collections &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native collection.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_observation &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native object-observe.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_generators &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native generator.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_iteration &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native array-iterator.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_strings &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native harmony-string.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_arrays &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native harmony-array.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
- if (FLAG_harmony_maths &&
- strcmp(ExperimentalNatives::GetScriptName(i).start(),
- "native harmony-math.js") == 0) {
- if (!CompileExperimentalBuiltin(isolate(), i)) return false;
- }
+ INSTALL_EXPERIMENTAL_NATIVE(i, symbols, "symbol.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, collections, "collection.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, observation, "object-observe.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, promises, "promise.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, arrays, "harmony-array.js")
+ INSTALL_EXPERIMENTAL_NATIVE(i, maths, "harmony-math.js")
}
InstallExperimentalNativeFunctions();
@@ -2278,6 +2254,11 @@ bool Genesis::InstallExtensions(Handle<Context> native_context,
current = current->next();
}
+#ifdef ADDRESS_SANITIZER
+ if (FLAG_expose_free_buffer) {
+ InstallExtension(isolate, "v8/free-buffer", &extension_states);
+ }
+#endif
if (FLAG_expose_gc) InstallExtension(isolate, "v8/gc", &extension_states);
if (FLAG_expose_externalize_string) {
InstallExtension(isolate, "v8/externalize", &extension_states);
@@ -2648,7 +2629,8 @@ Genesis::Genesis(Isolate* isolate,
isolate->random_number_generator()->NextBytes(state, num_bytes);
} while (state[0] == 0 || state[1] == 0);
- v8::Local<v8::ArrayBuffer> buffer = v8::ArrayBuffer::New(state, num_bytes);
+ v8::Local<v8::ArrayBuffer> buffer = v8::ArrayBuffer::New(
+ reinterpret_cast<v8::Isolate*>(isolate), state, num_bytes);
Utils::OpenHandle(*buffer)->set_should_be_freed(true);
v8::Local<v8::Uint32Array> ta = v8::Uint32Array::New(buffer, 0, num_elems);
Handle<JSBuiltinsObject> builtins(native_context()->builtins());
@@ -2661,8 +2643,10 @@ Genesis::Genesis(Isolate* isolate,
// Initialize trigonometric lookup tables and constants.
const int table_num_bytes = TrigonometricLookupTable::table_num_bytes();
v8::Local<v8::ArrayBuffer> sin_buffer = v8::ArrayBuffer::New(
+ reinterpret_cast<v8::Isolate*>(isolate),
TrigonometricLookupTable::sin_table(), table_num_bytes);
v8::Local<v8::ArrayBuffer> cos_buffer = v8::ArrayBuffer::New(
+ reinterpret_cast<v8::Isolate*>(isolate),
TrigonometricLookupTable::cos_x_interval_table(), table_num_bytes);
v8::Local<v8::Float64Array> sin_table = v8::Float64Array::New(
sin_buffer, 0, TrigonometricLookupTable::table_size());
« no previous file with comments | « src/ast.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698