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

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

Issue 1672873003: Bailout if field state changed during background compilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comment 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 | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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/globals.h" // Needed here to get TARGET_ARCH_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 11 #include "vm/dart_entry.h"
11 #include "vm/flow_graph.h" 12 #include "vm/flow_graph.h"
12 #include "vm/flow_graph_compiler.h" 13 #include "vm/flow_graph_compiler.h"
13 #include "vm/flow_graph_range_analysis.h" 14 #include "vm/flow_graph_range_analysis.h"
14 #include "vm/locations.h" 15 #include "vm/locations.h"
15 #include "vm/object_store.h" 16 #include "vm/object_store.h"
16 #include "vm/parser.h" 17 #include "vm/parser.h"
17 #include "vm/simulator.h" 18 #include "vm/simulator.h"
18 #include "vm/stack_frame.h" 19 #include "vm/stack_frame.h"
19 #include "vm/stub_code.h" 20 #include "vm/stub_code.h"
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 } 1434 }
1434 1435
1435 1436
1436 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1437 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1437 ASSERT(sizeof(classid_t) == kInt32Size); 1438 ASSERT(sizeof(classid_t) == kInt32Size);
1438 const intptr_t value_cid = value()->Type()->ToCid(); 1439 const intptr_t value_cid = value()->Type()->ToCid();
1439 const intptr_t field_cid = field().guarded_cid(); 1440 const intptr_t field_cid = field().guarded_cid();
1440 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; 1441 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid;
1441 1442
1442 if (field_cid == kDynamicCid) { 1443 if (field_cid == kDynamicCid) {
1444 if (Compiler::IsBackgroundCompilation()) {
1445 // Field state changed while compiling.
1446 Compiler::AbortBackgroundCompilation(deopt_id());
1447 }
1443 ASSERT(!compiler->is_optimizing()); 1448 ASSERT(!compiler->is_optimizing());
1444 return; // Nothing to emit. 1449 return; // Nothing to emit.
1445 } 1450 }
1446 1451
1447 const bool emit_full_guard = 1452 const bool emit_full_guard =
1448 !compiler->is_optimizing() || (field_cid == kIllegalCid); 1453 !compiler->is_optimizing() || (field_cid == kIllegalCid);
1449 1454
1450 const bool needs_value_cid_temp_reg = emit_full_guard || 1455 const bool needs_value_cid_temp_reg = emit_full_guard ||
1451 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); 1456 ((value_cid == kDynamicCid) && (field_cid != kSmiCid));
1452 1457
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 zone, kNumInputs, 0, LocationSummary::kNoCall); 1589 zone, kNumInputs, 0, LocationSummary::kNoCall);
1585 summary->set_in(0, Location::RequiresRegister()); 1590 summary->set_in(0, Location::RequiresRegister());
1586 return summary; 1591 return summary;
1587 } 1592 }
1588 UNREACHABLE(); 1593 UNREACHABLE();
1589 } 1594 }
1590 1595
1591 1596
1592 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1597 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1593 if (field().guarded_list_length() == Field::kNoFixedLength) { 1598 if (field().guarded_list_length() == Field::kNoFixedLength) {
1599 if (Compiler::IsBackgroundCompilation()) {
1600 // Field state changed while compiling.
1601 Compiler::AbortBackgroundCompilation(deopt_id());
1602 }
1594 ASSERT(!compiler->is_optimizing()); 1603 ASSERT(!compiler->is_optimizing());
1595 return; // Nothing to emit. 1604 return; // Nothing to emit.
1596 } 1605 }
1597 1606
1598 Label* deopt = compiler->is_optimizing() ? 1607 Label* deopt = compiler->is_optimizing() ?
1599 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; 1608 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL;
1600 1609
1601 const Register value_reg = locs()->in(0).reg(); 1610 const Register value_reg = locs()->in(0).reg();
1602 1611
1603 if (!compiler->is_optimizing() || 1612 if (!compiler->is_optimizing() ||
(...skipping 4010 matching lines...) Expand 10 before | Expand all | Expand 10 after
5614 1, 5623 1,
5615 locs()); 5624 locs());
5616 __ Drop(1); 5625 __ Drop(1);
5617 __ Pop(result); 5626 __ Pop(result);
5618 } 5627 }
5619 5628
5620 5629
5621 } // namespace dart 5630 } // namespace dart
5622 5631
5623 #endif // defined TARGET_ARCH_ARM64 5632 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698