Commit 8cfe45b6 authored by adamk's avatar adamk Committed by Commit bot

Remove infrastructure for experimental JS natives

Now that no harmony-flagged features are implemented in experimental
JS, most of this is simply dead code.

As PostExperimentals() is no longer needed, I also removed the use of
Import() in the debug context, allowing the deletion of PostDebug()
along with PostExperimentals(); cleanup code is moved to the
end of PostNatives.

Also gets rid of some longer-dead code in prologue.js related to
TypedArrays, and some duplicate code for setting up SharedArrayBuffer
builtins.

Review-Url: https://codereview.chromium.org/2705293004
Cr-Commit-Position: refs/heads/master@{#43418}
parent 0ba513f0
...@@ -476,42 +476,6 @@ action("js2c") { ...@@ -476,42 +476,6 @@ action("js2c") {
} }
} }
action("js2c_experimental") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
script = "tools/js2c.py"
# The script depends on this other script, this rule causes a rebuild if it
# changes.
inputs = [
"tools/jsmin.py",
]
# NOSORT
sources = [
"src/js/macros.py",
"src/messages.h",
]
outputs = [
"$target_gen_dir/experimental-libraries.cc",
]
args = [
rebase_path("$target_gen_dir/experimental-libraries.cc",
root_build_dir),
"EXPERIMENTAL",
] + rebase_path(sources, root_build_dir)
if (v8_use_external_startup_data) {
outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
args += [
"--startup_blob",
rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
]
}
}
action("js2c_extras") { action("js2c_extras") {
visibility = [ ":*" ] # Only targets in this file can depend on this. visibility = [ ":*" ] # Only targets in this file can depend on this.
...@@ -622,7 +586,6 @@ if (v8_use_external_startup_data) { ...@@ -622,7 +586,6 @@ if (v8_use_external_startup_data) {
deps = [ deps = [
":js2c", ":js2c",
":js2c_experimental",
":js2c_experimental_extras", ":js2c_experimental_extras",
":js2c_extras", ":js2c_extras",
] ]
...@@ -630,7 +593,6 @@ if (v8_use_external_startup_data) { ...@@ -630,7 +593,6 @@ if (v8_use_external_startup_data) {
# NOSORT # NOSORT
sources = [ sources = [
"$target_gen_dir/libraries.bin", "$target_gen_dir/libraries.bin",
"$target_gen_dir/libraries_experimental.bin",
"$target_gen_dir/libraries_extras.bin", "$target_gen_dir/libraries_extras.bin",
"$target_gen_dir/libraries_experimental_extras.bin", "$target_gen_dir/libraries_experimental_extras.bin",
] ]
...@@ -793,7 +755,6 @@ v8_source_set("v8_nosnapshot") { ...@@ -793,7 +755,6 @@ v8_source_set("v8_nosnapshot") {
deps = [ deps = [
":js2c", ":js2c",
":js2c_experimental",
":js2c_experimental_extras", ":js2c_experimental_extras",
":js2c_extras", ":js2c_extras",
":v8_base", ":v8_base",
...@@ -801,7 +762,6 @@ v8_source_set("v8_nosnapshot") { ...@@ -801,7 +762,6 @@ v8_source_set("v8_nosnapshot") {
sources = [ sources = [
"$target_gen_dir/experimental-extras-libraries.cc", "$target_gen_dir/experimental-extras-libraries.cc",
"$target_gen_dir/experimental-libraries.cc",
"$target_gen_dir/extras-libraries.cc", "$target_gen_dir/extras-libraries.cc",
"$target_gen_dir/libraries.cc", "$target_gen_dir/libraries.cc",
"src/snapshot/snapshot-empty.cc", "src/snapshot/snapshot-empty.cc",
...@@ -820,7 +780,6 @@ v8_source_set("v8_snapshot") { ...@@ -820,7 +780,6 @@ v8_source_set("v8_snapshot") {
deps = [ deps = [
":js2c", ":js2c",
":js2c_experimental",
":js2c_experimental_extras", ":js2c_experimental_extras",
":js2c_extras", ":js2c_extras",
":v8_base", ":v8_base",
...@@ -833,7 +792,6 @@ v8_source_set("v8_snapshot") { ...@@ -833,7 +792,6 @@ v8_source_set("v8_snapshot") {
sources = [ sources = [
"$target_gen_dir/experimental-extras-libraries.cc", "$target_gen_dir/experimental-extras-libraries.cc",
"$target_gen_dir/experimental-libraries.cc",
"$target_gen_dir/extras-libraries.cc", "$target_gen_dir/extras-libraries.cc",
"$target_gen_dir/libraries.cc", "$target_gen_dir/libraries.cc",
"$target_gen_dir/snapshot.cc", "$target_gen_dir/snapshot.cc",
...@@ -848,7 +806,6 @@ if (v8_use_external_startup_data) { ...@@ -848,7 +806,6 @@ if (v8_use_external_startup_data) {
deps = [ deps = [
":js2c", ":js2c",
":js2c_experimental",
":js2c_experimental_extras", ":js2c_experimental_extras",
":js2c_extras", ":js2c_extras",
":v8_base", ":v8_base",
......
...@@ -57,8 +57,6 @@ Handle<String> Bootstrapper::SourceLookup(int index) { ...@@ -57,8 +57,6 @@ Handle<String> Bootstrapper::SourceLookup(int index) {
template Handle<String> Bootstrapper::SourceLookup<Natives>(int index); template Handle<String> Bootstrapper::SourceLookup<Natives>(int index);
template Handle<String> Bootstrapper::SourceLookup<ExperimentalNatives>(
int index);
template Handle<String> Bootstrapper::SourceLookup<ExperimentalExtraNatives>( template Handle<String> Bootstrapper::SourceLookup<ExperimentalExtraNatives>(
int index); int index);
template Handle<String> Bootstrapper::SourceLookup<ExtraNatives>(int index); template Handle<String> Bootstrapper::SourceLookup<ExtraNatives>(int index);
...@@ -133,7 +131,6 @@ void DeleteNativeSources(Object* maybe_array) { ...@@ -133,7 +131,6 @@ void DeleteNativeSources(Object* maybe_array) {
void Bootstrapper::TearDown() { void Bootstrapper::TearDown() {
DeleteNativeSources(Natives::GetSourceCache(isolate_->heap())); DeleteNativeSources(Natives::GetSourceCache(isolate_->heap()));
DeleteNativeSources(ExperimentalNatives::GetSourceCache(isolate_->heap()));
DeleteNativeSources(ExtraNatives::GetSourceCache(isolate_->heap())); DeleteNativeSources(ExtraNatives::GetSourceCache(isolate_->heap()));
DeleteNativeSources( DeleteNativeSources(
ExperimentalExtraNatives::GetSourceCache(isolate_->heap())); ExperimentalExtraNatives::GetSourceCache(isolate_->heap()));
...@@ -230,7 +227,6 @@ class Genesis BASE_EMBEDDED { ...@@ -230,7 +227,6 @@ class Genesis BASE_EMBEDDED {
void InstallTypedArray(const char* name, ElementsKind elements_kind, void InstallTypedArray(const char* name, ElementsKind elements_kind,
Handle<JSFunction>* fun); Handle<JSFunction>* fun);
bool InstallExperimentalNatives();
bool InstallExtraNatives(); bool InstallExtraNatives();
bool InstallExperimentalExtraNatives(); bool InstallExperimentalExtraNatives();
bool InstallDebuggerNatives(); bool InstallDebuggerNatives();
...@@ -2950,19 +2946,6 @@ bool Bootstrapper::CompileBuiltin(Isolate* isolate, int index) { ...@@ -2950,19 +2946,6 @@ bool Bootstrapper::CompileBuiltin(Isolate* isolate, int index) {
} }
bool Bootstrapper::CompileExperimentalBuiltin(Isolate* isolate, int index) {
HandleScope scope(isolate);
Vector<const char> name = ExperimentalNatives::GetScriptName(index);
Handle<String> source_code =
isolate->bootstrapper()->SourceLookup<ExperimentalNatives>(index);
Handle<Object> global = isolate->global_object();
Handle<Object> utils = isolate->natives_utils_object();
Handle<Object> args[] = {global, utils};
return Bootstrapper::CompileNative(isolate, name, source_code,
arraysize(args), args, NATIVES_CODE);
}
bool Bootstrapper::CompileExtraBuiltin(Isolate* isolate, int index) { bool Bootstrapper::CompileExtraBuiltin(Isolate* isolate, int index) {
HandleScope scope(isolate); HandleScope scope(isolate);
Vector<const char> name = ExtraNatives::GetScriptName(index); Vector<const char> name = ExtraNatives::GetScriptName(index);
...@@ -4222,57 +4205,6 @@ bool Genesis::InstallNatives(GlobalContextType context_type) { ...@@ -4222,57 +4205,6 @@ bool Genesis::InstallNatives(GlobalContextType context_type) {
return true; return true;
} }
bool Genesis::InstallExperimentalNatives() {
static const char* harmony_tailcalls_natives[] = {nullptr};
static const char* harmony_sharedarraybuffer_natives[] = {nullptr};
static const char* harmony_do_expressions_natives[] = {nullptr};
static const char* harmony_regexp_lookbehind_natives[] = {nullptr};
static const char* harmony_regexp_named_captures_natives[] = {nullptr};
static const char* harmony_regexp_property_natives[] = {nullptr};
static const char* harmony_function_sent_natives[] = {nullptr};
static const char* harmony_array_prototype_values_natives[] = {nullptr};
#ifdef V8_I18N_SUPPORT
static const char* icu_case_mapping_natives[] = {nullptr};
static const char* datetime_format_to_parts_natives[] = {nullptr};
#endif
static const char* harmony_restrictive_generators_natives[] = {nullptr};
static const char* harmony_trailing_commas_natives[] = {nullptr};
static const char* harmony_function_tostring_natives[] = {nullptr};
static const char* harmony_class_fields_natives[] = {nullptr};
static const char* harmony_object_rest_spread_natives[] = {nullptr};
static const char* harmony_async_iteration_natives[] = {nullptr};
static const char* harmony_dynamic_import_natives[] = {nullptr};
static const char* harmony_promise_finally_natives[] = {nullptr};
static const char* harmony_template_escapes_natives[] = {nullptr};
for (int i = ExperimentalNatives::GetDebuggerCount();
i < ExperimentalNatives::GetBuiltinsCount(); i++) {
#define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
if (FLAG_##id) { \
for (size_t j = 0; id##_natives[j] != NULL; j++) { \
Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
if (strncmp(script_name.start(), id##_natives[j], \
script_name.length()) == 0) { \
if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
return false; \
} \
} \
} \
}
HARMONY_INPROGRESS(INSTALL_EXPERIMENTAL_NATIVES);
HARMONY_STAGED(INSTALL_EXPERIMENTAL_NATIVES);
HARMONY_SHIPPING(INSTALL_EXPERIMENTAL_NATIVES);
#undef INSTALL_EXPERIMENTAL_NATIVES
}
if (!CallUtilsFunction(isolate(), "PostExperimentals")) return false;
InstallExperimentalBuiltinFunctionIds();
return true;
}
bool Genesis::InstallExtraNatives() { bool Genesis::InstallExtraNatives() {
HandleScope scope(isolate()); HandleScope scope(isolate());
...@@ -4304,7 +4236,7 @@ bool Genesis::InstallDebuggerNatives() { ...@@ -4304,7 +4236,7 @@ bool Genesis::InstallDebuggerNatives() {
for (int i = 0; i < Natives::GetDebuggerCount(); ++i) { for (int i = 0; i < Natives::GetDebuggerCount(); ++i) {
if (!Bootstrapper::CompileBuiltin(isolate(), i)) return false; if (!Bootstrapper::CompileBuiltin(isolate(), i)) return false;
} }
return CallUtilsFunction(isolate(), "PostDebug"); return true;
} }
...@@ -4342,26 +4274,6 @@ void Genesis::InstallBuiltinFunctionIds() { ...@@ -4342,26 +4274,6 @@ void Genesis::InstallBuiltinFunctionIds() {
} }
} }
void Genesis::InstallExperimentalBuiltinFunctionIds() {
if (FLAG_harmony_sharedarraybuffer) {
struct BuiltinFunctionIds {
const char* holder_expr;
const char* fun_name;
BuiltinFunctionId id;
};
const BuiltinFunctionIds atomic_builtins[] = {
ATOMIC_FUNCTIONS_WITH_ID_LIST(INSTALL_BUILTIN_ID)};
for (const BuiltinFunctionIds& builtin : atomic_builtins) {
Handle<JSObject> holder =
ResolveBuiltinIdHolder(native_context(), builtin.holder_expr);
InstallBuiltinFunctionId(holder, builtin.fun_name, builtin.id);
}
}
}
#undef INSTALL_BUILTIN_ID #undef INSTALL_BUILTIN_ID
...@@ -4871,7 +4783,6 @@ Genesis::Genesis( ...@@ -4871,7 +4783,6 @@ Genesis::Genesis(
if (context_type == FULL_CONTEXT) { if (context_type == FULL_CONTEXT) {
if (!isolate->serializer_enabled()) { if (!isolate->serializer_enabled()) {
InitializeExperimentalGlobal(); InitializeExperimentalGlobal();
if (!InstallExperimentalNatives()) return;
if (FLAG_experimental_extras) { if (FLAG_experimental_extras) {
if (!InstallExperimentalExtraNatives()) return; if (!InstallExperimentalExtraNatives()) return;
...@@ -4886,8 +4797,6 @@ Genesis::Genesis( ...@@ -4886,8 +4797,6 @@ Genesis::Genesis(
native_context()->set_string_function_prototype_map( native_context()->set_string_function_prototype_map(
string_function_prototype->map()); string_function_prototype->map());
} }
// The serializer cannot serialize typed arrays. Reset those typed arrays
// for each new context.
} else if (context_type == DEBUG_CONTEXT) { } else if (context_type == DEBUG_CONTEXT) {
DCHECK(!isolate->serializer_enabled()); DCHECK(!isolate->serializer_enabled());
InitializeExperimentalGlobal(); InitializeExperimentalGlobal();
......
...@@ -116,7 +116,6 @@ class Bootstrapper final { ...@@ -116,7 +116,6 @@ class Bootstrapper final {
Handle<String> source, int argc, Handle<String> source, int argc,
Handle<Object> argv[], NativesFlag natives_flag); Handle<Object> argv[], NativesFlag natives_flag);
static bool CompileBuiltin(Isolate* isolate, int index); static bool CompileBuiltin(Isolate* isolate, int index);
static bool CompileExperimentalBuiltin(Isolate* isolate, int index);
static bool CompileExtraBuiltin(Isolate* isolate, int index); static bool CompileExtraBuiltin(Isolate* isolate, int index);
static bool CompileExperimentalExtraBuiltin(Isolate* isolate, int index); static bool CompileExperimentalExtraBuiltin(Isolate* isolate, int index);
......
...@@ -11,17 +11,10 @@ ...@@ -11,17 +11,10 @@
var GlobalArray = global.Array; var GlobalArray = global.Array;
var IsNaN = global.isNaN; var IsNaN = global.isNaN;
var JSONStringify = global.JSON.stringify; var JSONStringify = global.JSON.stringify;
var MapEntries; var MapEntries = global.Map.prototype.entries;
var MapIteratorNext; var MapIteratorNext = (new global.Map).entries().next;
var SetIteratorNext; var SetIteratorNext = (new global.Set).values().next;
var SetValues; var SetValues = global.Set.prototype.values;
utils.Import(function(from) {
MapEntries = from.MapEntries;
MapIteratorNext = from.MapIteratorNext;
SetIteratorNext = from.SetIteratorNext;
SetValues = from.SetValues;
});
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
......
...@@ -2786,9 +2786,6 @@ void Heap::CreateInitialObjects() { ...@@ -2786,9 +2786,6 @@ void Heap::CreateInitialObjects() {
set_natives_source_cache( set_natives_source_cache(
*factory->NewFixedArray(Natives::GetBuiltinsCount())); *factory->NewFixedArray(Natives::GetBuiltinsCount()));
set_experimental_natives_source_cache(
*factory->NewFixedArray(ExperimentalNatives::GetBuiltinsCount()));
set_extra_natives_source_cache( set_extra_natives_source_cache(
*factory->NewFixedArray(ExtraNatives::GetBuiltinsCount())); *factory->NewFixedArray(ExtraNatives::GetBuiltinsCount()));
......
...@@ -178,8 +178,6 @@ using v8::MemoryPressureLevel; ...@@ -178,8 +178,6 @@ using v8::MemoryPressureLevel;
V(Object, instanceof_cache_map, InstanceofCacheMap) \ V(Object, instanceof_cache_map, InstanceofCacheMap) \
V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \
V(FixedArray, natives_source_cache, NativesSourceCache) \ V(FixedArray, natives_source_cache, NativesSourceCache) \
V(FixedArray, experimental_natives_source_cache, \
ExperimentalNativesSourceCache) \
V(FixedArray, extra_natives_source_cache, ExtraNativesSourceCache) \ V(FixedArray, extra_natives_source_cache, ExtraNativesSourceCache) \
V(FixedArray, experimental_extra_natives_source_cache, \ V(FixedArray, experimental_extra_natives_source_cache, \
ExperimentalExtraNativesSourceCache) \ ExperimentalExtraNativesSourceCache) \
......
...@@ -12,33 +12,18 @@ ...@@ -12,33 +12,18 @@
// Utils // Utils
var imports = UNDEFINED; var imports = UNDEFINED;
var imports_from_experimental = UNDEFINED;
var exports_container = %ExportFromRuntime({}); var exports_container = %ExportFromRuntime({});
var typed_array_setup = UNDEFINED;
// Register context value to be initialized with a typed array in
// Genesis::InitializeBuiltinTypedArrays.
function SetupTypedArray(f) {
f.next = typed_array_setup;
typed_array_setup = f;
}
// Export to other scripts. // Export to other scripts.
// In normal natives, this exports functions to other normal natives.
// In experimental natives, this exports to other experimental natives and
// to normal natives that import using utils.ImportFromExperimental.
function Export(f) { function Export(f) {
f(exports_container); f(exports_container);
} }
// Import from other scripts. The actual importing happens in PostNatives and // Import from other scripts. The actual importing happens in PostNatives so
// PostExperimental so that we can import from scripts executed later. However, // that we can import from scripts executed later. However, that means that
// that means that the import is not available until the very end. If the // the import is not available until the very end. If the import needs to be
// import needs to be available immediate, use ImportNow. // available immediately, use ImportNow.
// In normal natives, this imports from other normal natives.
// In experimental natives, this imports from other experimental natives and
// whitelisted exports from normal natives.
function Import(f) { function Import(f) {
f.next = imports; f.next = imports;
imports = f; imports = f;
...@@ -53,14 +38,6 @@ function ImportNow(name) { ...@@ -53,14 +38,6 @@ function ImportNow(name) {
} }
// In normal natives, import from experimental natives.
// Not callable from experimental natives.
function ImportFromExperimental(f) {
f.next = imports_from_experimental;
imports_from_experimental = f;
}
function SetFunctionName(f, name, prefix) { function SetFunctionName(f, name, prefix) {
if (IS_SYMBOL(name)) { if (IS_SYMBOL(name)) {
name = "[" + %SymbolDescription(name) + "]"; name = "[" + %SymbolDescription(name) + "]";
...@@ -165,80 +142,13 @@ function PostNatives(utils) { ...@@ -165,80 +142,13 @@ function PostNatives(utils) {
imports(exports_container); imports(exports_container);
} }
// Whitelist of exports from normal natives to experimental natives and debug.
var expose_list = [
"FormatDateToParts",
"MapEntries",
"MapIteratorNext",
"SetIteratorNext",
"SetValues",
"ToLocaleLowerCaseI18N",
"ToLocaleUpperCaseI18N",
"ToLowerCaseI18N",
"ToUpperCaseI18N",
// From runtime:
"promise_result_symbol",
"promise_state_symbol",
"reflect_apply",
"to_string_tag_symbol",
];
var filtered_exports = {};
%OptimizeObjectForAddingMultipleProperties(
filtered_exports, expose_list.length);
for (var key of expose_list) {
filtered_exports[key] = exports_container[key];
}
%ToFastProperties(filtered_exports);
exports_container = filtered_exports;
utils.PostNatives = UNDEFINED;
utils.ImportFromExperimental = UNDEFINED;
}
function PostExperimentals(utils) {
%CheckIsBootstrapping();
for ( ; !IS_UNDEFINED(imports); imports = imports.next) {
imports(exports_container);
}
for ( ; !IS_UNDEFINED(imports_from_experimental);
imports_from_experimental = imports_from_experimental.next) {
imports_from_experimental(exports_container);
}
utils.Export = UNDEFINED;
utils.PostDebug = UNDEFINED;
utils.PostExperimentals = UNDEFINED;
typed_array_setup = UNDEFINED;
}
function PostDebug(utils) {
for ( ; !IS_UNDEFINED(imports); imports = imports.next) {
imports(exports_container);
}
exports_container = UNDEFINED; exports_container = UNDEFINED;
utils.Export = UNDEFINED; utils.Export = UNDEFINED;
utils.Import = UNDEFINED; utils.Import = UNDEFINED;
utils.ImportNow = UNDEFINED; utils.ImportNow = UNDEFINED;
utils.PostDebug = UNDEFINED; utils.PostNatives = UNDEFINED;
utils.PostExperimentals = UNDEFINED;
typed_array_setup = UNDEFINED;
}
function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) {
var setup_list = typed_array_setup;
for ( ; !IS_UNDEFINED(setup_list); setup_list = setup_list.next) {
setup_list(rng_state, rempio2result);
}
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
%OptimizeObjectForAddingMultipleProperties(utils, 14); %OptimizeObjectForAddingMultipleProperties(utils, 14);
...@@ -246,7 +156,6 @@ function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) { ...@@ -246,7 +156,6 @@ function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) {
utils.Import = Import; utils.Import = Import;
utils.ImportNow = ImportNow; utils.ImportNow = ImportNow;
utils.Export = Export; utils.Export = Export;
utils.ImportFromExperimental = ImportFromExperimental;
utils.SetFunctionName = SetFunctionName; utils.SetFunctionName = SetFunctionName;
utils.InstallConstants = InstallConstants; utils.InstallConstants = InstallConstants;
utils.InstallFunctions = InstallFunctions; utils.InstallFunctions = InstallFunctions;
...@@ -254,8 +163,6 @@ utils.InstallGetter = InstallGetter; ...@@ -254,8 +163,6 @@ utils.InstallGetter = InstallGetter;
utils.OverrideFunction = OverrideFunction; utils.OverrideFunction = OverrideFunction;
utils.SetUpLockedPrototype = SetUpLockedPrototype; utils.SetUpLockedPrototype = SetUpLockedPrototype;
utils.PostNatives = PostNatives; utils.PostNatives = PostNatives;
utils.PostExperimentals = PostExperimentals;
utils.PostDebug = PostDebug;
%ToFastProperties(utils); %ToFastProperties(utils);
......
...@@ -17,12 +17,6 @@ FixedArray* NativesCollection<CORE>::GetSourceCache(Heap* heap) { ...@@ -17,12 +17,6 @@ FixedArray* NativesCollection<CORE>::GetSourceCache(Heap* heap) {
} }
template <>
FixedArray* NativesCollection<EXPERIMENTAL>::GetSourceCache(Heap* heap) {
return heap->experimental_natives_source_cache();
}
template <> template <>
FixedArray* NativesCollection<EXTRAS>::GetSourceCache(Heap* heap) { FixedArray* NativesCollection<EXTRAS>::GetSourceCache(Heap* heap) {
return heap->extra_natives_source_cache(); return heap->extra_natives_source_cache();
......
...@@ -151,8 +151,6 @@ void ReadNatives() { ...@@ -151,8 +151,6 @@ void ReadNatives() {
if (natives_blob_ && NativesHolder<CORE>::empty()) { if (natives_blob_ && NativesHolder<CORE>::empty()) {
SnapshotByteSource bytes(natives_blob_->data, natives_blob_->raw_size); SnapshotByteSource bytes(natives_blob_->data, natives_blob_->raw_size);
NativesHolder<CORE>::set(NativesStore::MakeFromScriptsSource(&bytes)); NativesHolder<CORE>::set(NativesStore::MakeFromScriptsSource(&bytes));
NativesHolder<EXPERIMENTAL>::set(
NativesStore::MakeFromScriptsSource(&bytes));
NativesHolder<EXTRAS>::set(NativesStore::MakeFromScriptsSource(&bytes)); NativesHolder<EXTRAS>::set(NativesStore::MakeFromScriptsSource(&bytes));
NativesHolder<EXPERIMENTAL_EXTRAS>::set( NativesHolder<EXPERIMENTAL_EXTRAS>::set(
NativesStore::MakeFromScriptsSource(&bytes)); NativesStore::MakeFromScriptsSource(&bytes));
...@@ -181,7 +179,6 @@ void SetNativesFromFile(StartupData* natives_blob) { ...@@ -181,7 +179,6 @@ void SetNativesFromFile(StartupData* natives_blob) {
*/ */
void DisposeNatives() { void DisposeNatives() {
NativesHolder<CORE>::Dispose(); NativesHolder<CORE>::Dispose();
NativesHolder<EXPERIMENTAL>::Dispose();
NativesHolder<EXTRAS>::Dispose(); NativesHolder<EXTRAS>::Dispose();
NativesHolder<EXPERIMENTAL_EXTRAS>::Dispose(); NativesHolder<EXPERIMENTAL_EXTRAS>::Dispose();
} }
...@@ -233,7 +230,6 @@ Vector<const char> NativesCollection<type>::GetScriptsSource() { ...@@ -233,7 +230,6 @@ Vector<const char> NativesCollection<type>::GetScriptsSource() {
template Vector<const char> NativesCollection<T>::GetScriptName(int i); \ template Vector<const char> NativesCollection<T>::GetScriptName(int i); \
template Vector<const char> NativesCollection<T>::GetScriptsSource(); template Vector<const char> NativesCollection<T>::GetScriptsSource();
INSTANTIATE_TEMPLATES(CORE) INSTANTIATE_TEMPLATES(CORE)
INSTANTIATE_TEMPLATES(EXPERIMENTAL)
INSTANTIATE_TEMPLATES(EXTRAS) INSTANTIATE_TEMPLATES(EXTRAS)
INSTANTIATE_TEMPLATES(EXPERIMENTAL_EXTRAS) INSTANTIATE_TEMPLATES(EXPERIMENTAL_EXTRAS)
#undef INSTANTIATE_TEMPLATES #undef INSTANTIATE_TEMPLATES
......
...@@ -15,7 +15,6 @@ namespace internal { ...@@ -15,7 +15,6 @@ namespace internal {
enum NativeType { enum NativeType {
CORE, CORE,
EXPERIMENTAL,
EXTRAS, EXTRAS,
EXPERIMENTAL_EXTRAS, EXPERIMENTAL_EXTRAS,
D8, D8,
...@@ -54,7 +53,6 @@ class V8_EXPORT_PRIVATE NativesCollection { ...@@ -54,7 +53,6 @@ class V8_EXPORT_PRIVATE NativesCollection {
}; };
typedef NativesCollection<CORE> Natives; typedef NativesCollection<CORE> Natives;
typedef NativesCollection<EXPERIMENTAL> ExperimentalNatives;
typedef NativesCollection<EXTRAS> ExtraNatives; typedef NativesCollection<EXTRAS> ExtraNatives;
typedef NativesCollection<EXPERIMENTAL_EXTRAS> ExperimentalExtraNatives; typedef NativesCollection<EXPERIMENTAL_EXTRAS> ExperimentalExtraNatives;
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
'v8_vector_stores%': 0, 'v8_vector_stores%': 0,
'embed_script%': "", 'embed_script%': "",
'warmup_script%': "", 'warmup_script%': "",
'v8_extra_library_files%': [],
'v8_experimental_extra_library_files%': [], 'v8_experimental_extra_library_files%': [],
'v8_enable_inspector%': 0, 'v8_enable_inspector%': 0,
'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
...@@ -171,7 +170,6 @@ ...@@ -171,7 +170,6 @@
], ],
'sources': [ 'sources': [
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
'<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc',
'<(INTERMEDIATE_DIR)/snapshot.cc', '<(INTERMEDIATE_DIR)/snapshot.cc',
...@@ -230,7 +228,6 @@ ...@@ -230,7 +228,6 @@
], ],
'sources': [ 'sources': [
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
'<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc',
'snapshot/snapshot-empty.cc', 'snapshot/snapshot-empty.cc',
...@@ -2205,7 +2202,6 @@ ...@@ -2205,7 +2202,6 @@
'inputs': [ 'inputs': [
'../tools/concatenate-files.py', '../tools/concatenate-files.py',
'<(SHARED_INTERMEDIATE_DIR)/libraries.bin', '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
'<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
'<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin', '<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin',
'<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras.bin', '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras.bin',
], ],
...@@ -2280,12 +2276,7 @@ ...@@ -2280,12 +2276,7 @@
'debug/debug.js', 'debug/debug.js',
'debug/liveedit.js', 'debug/liveedit.js',
], ],
'experimental_library_files': [
'js/macros.py',
'messages.h',
],
'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin', 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
'libraries_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin', 'libraries_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin',
'libraries_experimental_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras.bin', 'libraries_experimental_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras.bin',
'conditions': [ 'conditions': [
...@@ -2327,38 +2318,6 @@ ...@@ -2327,38 +2318,6 @@
'--nojs', '--nojs',
], ],
}, },
{
'action_name': 'js2c_experimental',
'inputs': [
'../tools/js2c.py',
'<@(experimental_library_files)',
],
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc'],
'action': [
'python',
'../tools/js2c.py',
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
'EXPERIMENTAL',
'<@(experimental_library_files)',
],
},
{
'action_name': 'js2c_experimental_bin',
'inputs': [
'../tools/js2c.py',
'<@(experimental_library_files)',
],
'outputs': ['<@(libraries_experimental_bin_file)'],
'action': [
'python',
'../tools/js2c.py',
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
'EXPERIMENTAL',
'<@(experimental_library_files)',
'--startup_blob', '<@(libraries_experimental_bin_file)',
'--nojs',
],
},
{ {
'action_name': 'js2c_extras', 'action_name': 'js2c_extras',
'inputs': [ 'inputs': [
......
...@@ -530,8 +530,8 @@ TEST(SizeOfInitialHeap) { ...@@ -530,8 +530,8 @@ TEST(SizeOfInitialHeap) {
// requires no extra space. // requires no extra space.
CompileRun("/*empty*/"); CompileRun("/*empty*/");
for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) {
// Debug code can be very large, so skip CODE_SPACE if we are generating it. // Skip CODE_SPACE, since we had to generate code even for an empty script.
if (i == CODE_SPACE && i::FLAG_debug_code) continue; if (i == CODE_SPACE) continue;
CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages()); CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment