Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 00665e3ffdde2dcd3b0b6d16d2d3af4594aaf018..4f664c60c9f695da2e744ec8df7e488fff6f1202 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -225,6 +225,11 @@ template <typename T, class P = FreeStoreAllocationPolicy> class List; |
// ----------------------------------------------------------------------------- |
// Declarations for use in both the preparser and the rest of V8. |
+enum ObjectStrength { |
+ WEAK, |
+ FIRM // strong object |
+}; |
+ |
// The Strict Mode (ECMA-262 5th edition, 4.2.2). |
enum LanguageMode { |
@@ -284,6 +289,11 @@ inline LanguageMode construct_language_mode(bool strict_bit, bool strong_bit) { |
} |
+inline ObjectStrength strength(LanguageMode language_mode) { |
+ return is_strong(language_mode) ? FIRM : WEAK; |
+} |
+ |
+ |
// Mask for the sign bit in a smi. |
const intptr_t kSmiSignMask = kIntptrSignBit; |