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

Unified Diff: runtime/vm/intermediate_language_x64.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_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index e9db8d86521273ddf1c1dff6b307f853d81a45a8..24ba11602f38a04c5fae6e3e84830873c95b98c3 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -6070,8 +6070,7 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (locs()->in(1).IsConstant()) {
// Code for a constant shift amount.
ASSERT(locs()->in(1).constant().IsSmi());
- const int64_t shift =
- reinterpret_cast<int64_t>(locs()->in(1).constant().raw()) >> 1;
+ const int64_t shift = Smi::Cast(locs()->in(1).constant()).Value();
ASSERT(shift >= 0);
switch (op_kind()) {
case Token::kSHR:
« runtime/vm/intermediate_language_arm.cc ('K') | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698