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

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

Issue 2454513003: Revert of [compiler] Properly validate stable map assumption for globals. (Closed)
Patch Set: 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-instructions.h ('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 147efed092a742724f66013147e76ee4d1b66d0f..0d84354f4424d456a758a6c1e8ca182d2f598a96 100644
--- a/src/runtime/runtime-utils.h
+++ b/src/runtime/runtime-utils.h
@@ -69,11 +69,9 @@
// 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]->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);
+ CHECK(args[index]->IsSmi()); \
+ CHECK(is_valid_language_mode(args.smi_at(index))); \
+ LanguageMode name = static_cast<LanguageMode>(args.smi_at(index));
// 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-instructions.h ('k') | test/mjsunit/regress/regress-crbug-659475-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698