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

Unified Diff: src/globals.h

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/flag-definitions.h ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index f01c10044e9815d02c861075058e399b5a4356a7..912f22117d984b557fc5a4d988c4e2528ca881e6 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -253,6 +253,17 @@ enum LanguageMode {
};
+enum AsmMode {
+ ASM_FUNCTION_BIT = 1 << 0,
+ ASM_MODULE_BIT = 1 << 1,
+ ASM_END,
+
+ ASM_NO = 0,
+ ASM_FUNCTION = ASM_FUNCTION_BIT,
+ ASM_MODULE = ASM_MODULE_BIT
+};
+
+
inline std::ostream& operator<<(std::ostream& os, const LanguageMode& mode) {
switch (mode) {
case SLOPPY:
@@ -297,6 +308,21 @@ inline LanguageMode construct_language_mode(bool strict_bit, bool strong_bit) {
}
+inline bool is_valid_asm_mode(int asm_mode) {
+ return asm_mode == ASM_NO || asm_mode == ASM_FUNCTION ||
+ asm_mode == ASM_MODULE;
+}
+
+
+inline AsmMode construct_asm_mode(bool asm_function, bool asm_module) {
+ int asm_mode = 0;
+ if (asm_function) asm_mode |= ASM_FUNCTION_BIT;
+ if (asm_module) asm_mode |= ASM_MODULE_BIT;
+ DCHECK(is_valid_asm_mode(asm_mode));
+ return static_cast<AsmMode>(asm_mode);
+}
+
+
inline ObjectStrength strength(LanguageMode language_mode) {
return is_strong(language_mode) ? FIRM : WEAK;
}
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698