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

Unified Diff: runtime/vm/jit_optimizer.cc

Issue 1913663002: vm: Generate 'and' instruction for Smi values. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/jit_optimizer.cc
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index b0be614a3c0735411605ff31e0073ed474d39d27..8f961ce12a130e279cfd4597b7759aa43f75f62f 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -1881,6 +1881,18 @@ bool JitOptimizer::TryInlineInstanceMethod(InstanceCallInstr* call) {
return TryInlineFloat64x2Method(call, recognized_kind);
}
+ if (recognized_kind == MethodRecognizer::kSmi_bitAndFromSmi) {
+ AddReceiverCheck(call);
+ BinarySmiOpInstr* op =
+ new(Z) BinarySmiOpInstr(
+ Token::kBIT_AND,
+ new(Z) Value(call->ArgumentAt(0)),
+ new(Z) Value(call->ArgumentAt(1)),
+ call->deopt_id());
+ ReplaceCall(call, op);
+ return true;
+ }
+
return false;
}

Powered by Google App Engine
This is Rietveld 408576698