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

Side by Side Diff: runtime/vm/aot_optimizer.cc

Issue 1773633002: Add fast path smi comparison operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: other platforms Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/aot_optimizer.h" 5 #include "vm/aot_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 Function::Handle(Z, unary_checks.GetTargetAt(0)).kind(); 2481 Function::Handle(Z, unary_checks.GetTargetAt(0)).kind();
2482 if (!InstanceCallNeedsClassCheck(instr, function_kind)) { 2482 if (!InstanceCallNeedsClassCheck(instr, function_kind)) {
2483 PolymorphicInstanceCallInstr* call = 2483 PolymorphicInstanceCallInstr* call =
2484 new(Z) PolymorphicInstanceCallInstr(instr, unary_checks, 2484 new(Z) PolymorphicInstanceCallInstr(instr, unary_checks,
2485 /* with_checks = */ false); 2485 /* with_checks = */ false);
2486 instr->ReplaceWith(call, current_iterator()); 2486 instr->ReplaceWith(call, current_iterator());
2487 return; 2487 return;
2488 } 2488 }
2489 } 2489 }
2490 switch (instr->token_kind()) { 2490 switch (instr->token_kind()) {
2491 case Token::kEQ:
2492 case Token::kLT:
2493 case Token::kLTE:
2494 case Token::kGT:
2495 case Token::kGTE:
2491 case Token::kBIT_OR: 2496 case Token::kBIT_OR:
2492 case Token::kBIT_XOR: 2497 case Token::kBIT_XOR:
2493 case Token::kBIT_AND: 2498 case Token::kBIT_AND:
2494 case Token::kADD: 2499 case Token::kADD:
2495 case Token::kSUB: { 2500 case Token::kSUB: {
2496 if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid)) { 2501 if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid)) {
2497 Definition* left = instr->ArgumentAt(0); 2502 Definition* left = instr->ArgumentAt(0);
2498 Definition* right = instr->ArgumentAt(1); 2503 Definition* right = instr->ArgumentAt(1);
2499 CheckedSmiOpInstr* smi_op = 2504 CheckedSmiOpInstr* smi_op =
2500 new(Z) CheckedSmiOpInstr(instr->token_kind(), 2505 new(Z) CheckedSmiOpInstr(instr->token_kind(),
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 2793
2789 // Discard the environment from the original instruction because the store 2794 // Discard the environment from the original instruction because the store
2790 // can't deoptimize. 2795 // can't deoptimize.
2791 instr->RemoveEnvironment(); 2796 instr->RemoveEnvironment();
2792 ReplaceCall(instr, store); 2797 ReplaceCall(instr, store);
2793 return true; 2798 return true;
2794 } 2799 }
2795 2800
2796 2801
2797 } // namespace dart 2802 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698