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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 1148943004: VM: Fix bugs with missing deoptimization environment and int32x4 constructor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comment Created 5 years, 7 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 | « runtime/vm/intermediate_language_arm64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 689f7e2e1a7948c2ee5b9fa050d6480984c8c66f..a7bad0ae93136a7c569365d3d94ff6d3a4c3ca1d 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -3437,6 +3437,17 @@ void UnboxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ SmiUntag(value);
} else if (value_cid == kMintCid) {
__ movq(value, FieldAddress(value, Mint::value_offset()));
+ } else if (!CanDeoptimize()) {
+ // Type information is not conclusive, but range analysis found
+ // the value to be in int64 range. Therefore it must be a smi
+ // or mint value.
+ ASSERT(is_truncating());
+ Label done;
+ __ SmiUntag(value);
+ __ j(NOT_CARRY, &done, Assembler::kNearJump);
+ __ movq(value, Address(value, TIMES_2, Mint::value_offset()));
+ __ Bind(&done);
+ return;
} else {
Label done;
// Optimistically untag value.
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698