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

Unified Diff: src/runtime/runtime-utils.h

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 5 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/runtime/runtime-utils.h
diff --git a/src/runtime/runtime-utils.h b/src/runtime/runtime-utils.h
index 95d75f5084fb2348eabefd0b2b0fe62ffbfd1ffe..6f0f6f203ae3805ec0f644f2bf013a81d20364ef 100644
--- a/src/runtime/runtime-utils.h
+++ b/src/runtime/runtime-utils.h
@@ -70,13 +70,14 @@ namespace internal {
PropertyDetails name = PropertyDetails(Smi::cast(args[index]));
-// Assert that the given argument has a valid value for a StrictMode
-// and store it in a StrictMode variable with the given name.
-#define CONVERT_STRICT_MODE_ARG_CHECKED(name, index) \
- RUNTIME_ASSERT(args[index]->IsSmi()); \
- RUNTIME_ASSERT(args.smi_at(index) == STRICT || \
- args.smi_at(index) == SLOPPY); \
- StrictMode name = static_cast<StrictMode>(args.smi_at(index));
+// Assert that the given argument has a valid value for a LanguageMode
+// and store it in a LanguageMode variable with the given name.
+#define CONVERT_LANGUAGE_MODE_ARG_CHECKED(name, index) \
+ RUNTIME_ASSERT(args[index]->IsSmi()); \
+ STATIC_ASSERT(LANGUAGE_END == 2); \
+ RUNTIME_ASSERT(args.smi_at(index) == STRICT || \
rossberg 2015/02/03 12:26:20 same here
marja 2015/02/03 14:45:02 Done.
+ args.smi_at(index) == SLOPPY); \
+ LanguageMode name = static_cast<LanguageMode>(args.smi_at(index));
// Assert that the given argument is a number within the Int32 range

Powered by Google App Engine
This is Rietveld 408576698