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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 1608
1608 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1609 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1609 ASSERT(sizeof(classid_t) == kInt16Size); 1610 ASSERT(sizeof(classid_t) == kInt16Size);
1610 __ Comment("GuardFieldClassInstr"); 1611 __ Comment("GuardFieldClassInstr");
1611 1612
1612 const intptr_t value_cid = value()->Type()->ToCid(); 1613 const intptr_t value_cid = value()->Type()->ToCid();
1613 const intptr_t field_cid = field().guarded_cid(); 1614 const intptr_t field_cid = field().guarded_cid();
1614 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; 1615 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid;
1615 1616
1616 if (field_cid == kDynamicCid) { 1617 if (field_cid == kDynamicCid) {
1618 if (Compiler::IsBackgroundCompilation()) {
1619 // Field state changed while compiling.
1620 Compiler::AbortBackgroundCompilation(deopt_id());
1621 }
1617 ASSERT(!compiler->is_optimizing()); 1622 ASSERT(!compiler->is_optimizing());
1618 return; // Nothing to emit. 1623 return; // Nothing to emit.
1619 } 1624 }
1620 1625
1621 const bool emit_full_guard = 1626 const bool emit_full_guard =
1622 !compiler->is_optimizing() || (field_cid == kIllegalCid); 1627 !compiler->is_optimizing() || (field_cid == kIllegalCid);
1623 1628
1624 const bool needs_value_cid_temp_reg = 1629 const bool needs_value_cid_temp_reg =
1625 (value_cid == kDynamicCid) && (emit_full_guard || (field_cid != kSmiCid)); 1630 (value_cid == kDynamicCid) && (emit_full_guard || (field_cid != kSmiCid));
1626 1631
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 zone, kNumInputs, 0, LocationSummary::kNoCall); 1766 zone, kNumInputs, 0, LocationSummary::kNoCall);
1762 summary->set_in(0, Location::RequiresRegister()); 1767 summary->set_in(0, Location::RequiresRegister());
1763 return summary; 1768 return summary;
1764 } 1769 }
1765 UNREACHABLE(); 1770 UNREACHABLE();
1766 } 1771 }
1767 1772
1768 1773
1769 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1774 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1770 if (field().guarded_list_length() == Field::kNoFixedLength) { 1775 if (field().guarded_list_length() == Field::kNoFixedLength) {
1776 if (Compiler::IsBackgroundCompilation()) {
1777 // Field state changed while compiling.
1778 Compiler::AbortBackgroundCompilation(deopt_id());
1779 }
1771 ASSERT(!compiler->is_optimizing()); 1780 ASSERT(!compiler->is_optimizing());
1772 return; // Nothing to emit. 1781 return; // Nothing to emit.
1773 } 1782 }
1774 1783
1775 Label* deopt = compiler->is_optimizing() ? 1784 Label* deopt = compiler->is_optimizing() ?
1776 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; 1785 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL;
1777 1786
1778 const Register value_reg = locs()->in(0).reg(); 1787 const Register value_reg = locs()->in(0).reg();
1779 1788
1780 if (!compiler->is_optimizing() || 1789 if (!compiler->is_optimizing() ||
(...skipping 3808 matching lines...) Expand 10 before | Expand all | Expand 10 after
5589 1, 5598 1,
5590 locs()); 5599 locs());
5591 __ lw(result, Address(SP, 1 * kWordSize)); 5600 __ lw(result, Address(SP, 1 * kWordSize));
5592 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5601 __ addiu(SP, SP, Immediate(2 * kWordSize));
5593 } 5602 }
5594 5603
5595 5604
5596 } // namespace dart 5605 } // namespace dart
5597 5606
5598 #endif // defined TARGET_ARCH_MIPS 5607 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698