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

Unified Diff: src/bootstrapper.cc

Issue 71713002: Preliminary promise implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/flag-definitions.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 234a2118bdd7002189906df3e21f6446869f594e..dcf4f4390a53fc02e0210a04511c5b45eb4c8521 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2023,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();
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698