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

Unified Diff: runtime/vm/parser.cc

Issue 1900863004: VM: Remove _leftShiftWithMask32. (Closed) Base URL: git@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
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 30a735e9de1bcd93b3c2bf8a102dd0a665482ed9..14446d997566b961a762f96e7cb7dd5bff590864 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -10524,7 +10524,6 @@ LocalVariable* Parser::CreateTempConstVariable(TokenPosition token_pos,
}
-// TODO(srdjan): Implement other optimizations.
AstNode* Parser::OptimizeBinaryOpNode(TokenPosition op_pos,
Token::Kind binary_op,
AstNode* lhs,
@@ -10551,20 +10550,6 @@ AstNode* Parser::OptimizeBinaryOpNode(TokenPosition op_pos,
rhs_literal = lhs_literal;
lhs_literal = temp;
}
- if ((rhs_literal != NULL) &&
- (rhs_literal->literal().IsSmi() || rhs_literal->literal().IsMint())) {
- const int64_t val = Integer::Cast(rhs_literal->literal()).AsInt64Value();
- if ((0 <= val) && (Utils::IsUint(32, val))) {
- if (lhs->IsBinaryOpNode() &&
- (lhs->AsBinaryOpNode()->kind() == Token::kSHL)) {
- // Merge SHL and BIT_AND into one "SHL with mask" node.
- BinaryOpNode* old = lhs->AsBinaryOpNode();
- BinaryOpWithMask32Node* binop = new(Z) BinaryOpWithMask32Node(
- old->token_pos(), old->kind(), old->left(), old->right(), val);
- return binop;
- }
- }
- }
}
if (binary_op == Token::kIFNULL) {
// Handle a ?? b.
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698