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

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: xxx Created 4 years, 6 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/intrinsifier_x64.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/jit_optimizer.cc
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index dd23e57bd19715f01ea4ce4c9e97d6df971f4cff..36eee23ef8526bb69ffdf6cce5834e009284359d 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -1897,6 +1897,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;
}
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698