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

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

Issue 1726063002: Fix assertion in precompiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | no next file » | 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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 } 1394 }
1395 AddReceiverCheck(call); 1395 AddReceiverCheck(call);
1396 } 1396 }
1397 LoadFieldInstr* load = new(Z) LoadFieldInstr( 1397 LoadFieldInstr* load = new(Z) LoadFieldInstr(
1398 new(Z) Value(call->ArgumentAt(0)), 1398 new(Z) Value(call->ArgumentAt(0)),
1399 &field, 1399 &field,
1400 AbstractType::ZoneHandle(Z, field.type()), 1400 AbstractType::ZoneHandle(Z, field.type()),
1401 call->token_pos()); 1401 call->token_pos());
1402 load->set_is_immutable(field.is_final()); 1402 load->set_is_immutable(field.is_final());
1403 1403
1404 // No guarded cid in precompiled mode.
1405 ASSERT(field.guarded_cid() == kDynamicCid);
1406
1407 // Discard the environment from the original instruction because the load 1404 // Discard the environment from the original instruction because the load
1408 // can't deoptimize. 1405 // can't deoptimize.
1409 call->RemoveEnvironment(); 1406 call->RemoveEnvironment();
1410 ReplaceCall(call, load); 1407 ReplaceCall(call, load);
1411 1408
1412 if (load->result_cid() != kDynamicCid) { 1409 if (load->result_cid() != kDynamicCid) {
1413 // Reset value types if guarded_cid was used. 1410 // Reset value types if guarded_cid was used.
1414 for (Value::Iterator it(load->input_use_list()); 1411 for (Value::Iterator it(load->input_use_list());
1415 !it.Done(); 1412 !it.Done();
1416 it.Advance()) { 1413 it.Advance()) {
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 2844
2848 // Discard the environment from the original instruction because the store 2845 // Discard the environment from the original instruction because the store
2849 // can't deoptimize. 2846 // can't deoptimize.
2850 instr->RemoveEnvironment(); 2847 instr->RemoveEnvironment();
2851 ReplaceCall(instr, store); 2848 ReplaceCall(instr, store);
2852 return true; 2849 return true;
2853 } 2850 }
2854 2851
2855 2852
2856 } // namespace dart 2853 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698