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

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

Issue 2444233004: [compiler] Properly validate stable map assumption for globals. (Closed)
Patch Set: Unsmartify Crankshaft Created 4 years, 2 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/crankshaft/hydrogen.cc ('k') | test/mjsunit/regress/regress-crbug-659475-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-utils.h
diff --git a/src/runtime/runtime-utils.h b/src/runtime/runtime-utils.h
index 0d84354f4424d456a758a6c1e8ca182d2f598a96..147efed092a742724f66013147e76ee4d1b66d0f 100644
--- a/src/runtime/runtime-utils.h
+++ b/src/runtime/runtime-utils.h
@@ -69,9 +69,11 @@ namespace internal {
// 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) \
- CHECK(args[index]->IsSmi()); \
- CHECK(is_valid_language_mode(args.smi_at(index))); \
- LanguageMode name = static_cast<LanguageMode>(args.smi_at(index));
+ CHECK(args[index]->IsNumber()); \
+ int32_t __tmp_##name = 0; \
+ CHECK(args[index]->ToInt32(&__tmp_##name)); \
+ CHECK(is_valid_language_mode(__tmp_##name)); \
+ LanguageMode name = static_cast<LanguageMode>(__tmp_##name);
// Assert that the given argument is a number within the Int32 range
// and convert it to int32_t. If the argument is not an Int32 we crash safely.
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | test/mjsunit/regress/regress-crbug-659475-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698