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

Unified Diff: src/globals.h

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index c6a5444d8ac94fa2d29cefa2a5350b6033a27f51..e624315af00d8942dc46223d87fb8d50f3ccdc29 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -755,6 +755,23 @@ inline std::ostream& operator<<(std::ostream& os, ConvertReceiverMode mode) {
}
+// Defines whether tail call optimization is allowed.
+enum class TailCallMode : unsigned { kAllow, kDisallow };
+
+inline size_t hash_value(TailCallMode mode) { return bit_cast<unsigned>(mode); }
+
+inline std::ostream& operator<<(std::ostream& os, TailCallMode mode) {
+ switch (mode) {
+ case TailCallMode::kAllow:
+ return os << "ALLOW_TAIL_CALLS";
+ case TailCallMode::kDisallow:
+ return os << "DISALLOW_TAIL_CALLS";
+ }
+ UNREACHABLE();
+ return os;
+}
+
+
// Used to specify if a macro instruction must perform a smi check on tagged
// values.
enum SmiCheckType {
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/ic/ic.h » ('j') | src/x64/builtins-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698