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

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

Issue 23766021: Fix a bug in block reordering/block compaction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4752 matching lines...) Expand 10 before | Expand all | Expand 10 after
4763 compiler->SetNeedsStacktrace(catch_try_index()); 4763 compiler->SetNeedsStacktrace(catch_try_index());
4764 compiler->GenerateCallRuntime(token_pos(), 4764 compiler->GenerateCallRuntime(token_pos(),
4765 deopt_id(), 4765 deopt_id(),
4766 kReThrowRuntimeEntry, 4766 kReThrowRuntimeEntry,
4767 2, 4767 2,
4768 locs()); 4768 locs());
4769 __ int3(); 4769 __ int3();
4770 } 4770 }
4771 4771
4772 4772
4773 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4774 if (!compiler->CanFallThroughTo(normal_entry())) {
4775 __ jmp(compiler->GetJumpLabel(normal_entry()));
4776 }
4777 }
4778
4779
4773 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4780 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4774 __ Bind(compiler->GetJumpLabel(this)); 4781 __ Bind(compiler->GetJumpLabel(this));
4775 if (!compiler->is_optimizing()) { 4782 if (!compiler->is_optimizing()) {
4776 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4783 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4777 deopt_id_, 4784 deopt_id_,
4778 Scanner::kDummyTokenIndex); 4785 Scanner::kDummyTokenIndex);
4779 // Add an edge counter. 4786 // Add an edge counter.
4780 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); 4787 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld));
4781 counter.SetAt(0, Smi::Handle(Smi::New(0))); 4788 counter.SetAt(0, Smi::Handle(Smi::New(0)));
4782 Label done; 4789 Label done;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
4857 __ jmp(compiler->GetJumpLabel(true_successor())); 4864 __ jmp(compiler->GetJumpLabel(true_successor()));
4858 } else if (!value && !compiler->CanFallThroughTo(false_successor())) { 4865 } else if (!value && !compiler->CanFallThroughTo(false_successor())) {
4859 __ jmp(compiler->GetJumpLabel(false_successor())); 4866 __ jmp(compiler->GetJumpLabel(false_successor()));
4860 } 4867 }
4861 } 4868 }
4862 4869
4863 4870
4864 void ControlInstruction::EmitBranchOnCondition(FlowGraphCompiler* compiler, 4871 void ControlInstruction::EmitBranchOnCondition(FlowGraphCompiler* compiler,
4865 Condition true_condition) { 4872 Condition true_condition) {
4866 if (compiler->CanFallThroughTo(false_successor())) { 4873 if (compiler->CanFallThroughTo(false_successor())) {
4867 // If the next block is the false successor we will fall through to it. 4874 // If the next block is the false successor, fall through to it.
4868 __ j(true_condition, compiler->GetJumpLabel(true_successor())); 4875 __ j(true_condition, compiler->GetJumpLabel(true_successor()));
4869 } else { 4876 } else {
4870 // If the next block is the true successor we negate comparison and fall 4877 // If the next block is not the false successor, branch to it.
4871 // through to it.
4872 Condition false_condition = NegateCondition(true_condition); 4878 Condition false_condition = NegateCondition(true_condition);
4873 __ j(false_condition, compiler->GetJumpLabel(false_successor())); 4879 __ j(false_condition, compiler->GetJumpLabel(false_successor()));
4874 4880
4875 // Fall through or jump to the true successor. 4881 // Fall through or jump to the true successor.
4876 if (!compiler->CanFallThroughTo(true_successor())) { 4882 if (!compiler->CanFallThroughTo(true_successor())) {
4877 __ jmp(compiler->GetJumpLabel(true_successor())); 4883 __ jmp(compiler->GetJumpLabel(true_successor()));
4878 } 4884 }
4879 } 4885 }
4880 } 4886 }
4881 4887
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 PcDescriptors::kOther, 5233 PcDescriptors::kOther,
5228 locs()); 5234 locs());
5229 __ Drop(2); // Discard type arguments and receiver. 5235 __ Drop(2); // Discard type arguments and receiver.
5230 } 5236 }
5231 5237
5232 } // namespace dart 5238 } // namespace dart
5233 5239
5234 #undef __ 5240 #undef __
5235 5241
5236 #endif // defined TARGET_ARCH_IA32 5242 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698