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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 2975073002: Replace manual untagging of smi with proper Smi methods (Closed)
Patch Set: Created 3 years, 5 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: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 1ee8f707340a455c8bfe7334c5cb08d0796022e0..f67900c7885b2a7b8d29ba35a62522b5d2c6a6c8 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -6083,8 +6083,7 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (locs()->in(1).IsConstant()) {
// Code for a constant shift amount.
ASSERT(locs()->in(1).constant().IsSmi());
- const int32_t shift =
- reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1;
+ const int32_t shift = Smi::Cast(locs()->in(1).constant()).Value();
ASSERT(shift >= 0);
switch (op_kind()) {
case Token::kSHR: {

Powered by Google App Engine
This is Rietveld 408576698