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

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

Issue 1859273002: Add flag to disable string externalization (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 unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.h » ('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/jit_optimizer.h" 5 #include "vm/jit_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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 91
92 bool JitOptimizer::TryCreateICData(InstanceCallInstr* call) { 92 bool JitOptimizer::TryCreateICData(InstanceCallInstr* call) {
93 ASSERT(call->HasICData()); 93 ASSERT(call->HasICData());
94 if (call->ic_data()->NumberOfUsedChecks() > 0) { 94 if (call->ic_data()->NumberOfUsedChecks() > 0) {
95 // This occurs when an instance call has too many checks, will be converted 95 // This occurs when an instance call has too many checks, will be converted
96 // to megamorphic call. 96 // to megamorphic call.
97 return false; 97 return false;
98 } 98 }
99
99 GrowableArray<intptr_t> class_ids(call->ic_data()->NumArgsTested()); 100 GrowableArray<intptr_t> class_ids(call->ic_data()->NumArgsTested());
100 ASSERT(call->ic_data()->NumArgsTested() <= call->ArgumentCount()); 101 ASSERT(call->ic_data()->NumArgsTested() <= call->ArgumentCount());
101 for (intptr_t i = 0; i < call->ic_data()->NumArgsTested(); i++) { 102 for (intptr_t i = 0; i < call->ic_data()->NumArgsTested(); i++) {
102 class_ids.Add(call->PushArgumentAt(i)->value()->Type()->ToCid()); 103 class_ids.Add(call->PushArgumentAt(i)->value()->Type()->ToCid());
103 } 104 }
104 105
105 const Token::Kind op_kind = call->token_kind(); 106 const Token::Kind op_kind = call->token_kind();
106 if (Token::IsRelationalOperator(op_kind) || 107 if (Token::IsRelationalOperator(op_kind) ||
107 Token::IsEqualityOperator(op_kind) || 108 Token::IsEqualityOperator(op_kind) ||
108 Token::IsBinaryOperator(op_kind)) { 109 Token::IsBinaryOperator(op_kind)) {
(...skipping 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3125 3126
3126 // Discard the environment from the original instruction because the store 3127 // Discard the environment from the original instruction because the store
3127 // can't deoptimize. 3128 // can't deoptimize.
3128 instr->RemoveEnvironment(); 3129 instr->RemoveEnvironment();
3129 ReplaceCall(instr, store); 3130 ReplaceCall(instr, store);
3130 return true; 3131 return true;
3131 } 3132 }
3132 3133
3133 3134
3134 } // namespace dart 3135 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698