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

Unified Diff: runtime/vm/intermediate_language_arm.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
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 995c1cd866cb947eb2d25850a61dac94d9bcb201..7af5dade7f23147802be7d8574e418bc6bf78877 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -6544,8 +6544,7 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (locs()->in(1).IsConstant()) {
// Code for a constant shift amount.
ASSERT(locs()->in(1).constant().IsSmi());
Vyacheslav Egorov (Google) 2017/07/12 16:56:27 I think this ASSERT can be deleted because Smi::Ca
alexmarkov 2017/07/12 17:37:37 You are right, it can be deleted. However, I think
- 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: {
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698