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

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

Issue 10821108: Ensure that we never try to split range at its end position. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 945
946 #define __ compiler->assembler()-> 946 #define __ compiler->assembler()->
947 947
948 void GraphEntryInstr::PrepareEntry(FlowGraphCompiler* compiler) { 948 void GraphEntryInstr::PrepareEntry(FlowGraphCompiler* compiler) {
949 // Nothing to do. 949 // Nothing to do.
950 } 950 }
951 951
952 952
953 void JoinEntryInstr::PrepareEntry(FlowGraphCompiler* compiler) { 953 void JoinEntryInstr::PrepareEntry(FlowGraphCompiler* compiler) {
954 __ Bind(compiler->GetBlockLabel(this)); 954 __ Bind(compiler->GetBlockLabel(this));
955 if (HasParallelMove()) {
956 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
957 }
955 } 958 }
956 959
957 960
958 void TargetEntryInstr::PrepareEntry(FlowGraphCompiler* compiler) { 961 void TargetEntryInstr::PrepareEntry(FlowGraphCompiler* compiler) {
959 __ Bind(compiler->GetBlockLabel(this)); 962 __ Bind(compiler->GetBlockLabel(this));
960 if (HasTryIndex()) { 963 if (HasTryIndex()) {
961 compiler->AddExceptionHandler(try_index(), 964 compiler->AddExceptionHandler(try_index(),
962 compiler->assembler()->CodeSize()); 965 compiler->assembler()->CodeSize());
963 } 966 }
967 if (HasParallelMove()) {
968 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
969 }
964 } 970 }
965 971
966 972
967 LocationSummary* StoreInstanceFieldComp::MakeLocationSummary() const { 973 LocationSummary* StoreInstanceFieldComp::MakeLocationSummary() const {
968 const intptr_t kNumInputs = 2; 974 const intptr_t kNumInputs = 2;
969 const intptr_t num_temps = HasICData() ? 1 : 0; 975 const intptr_t num_temps = HasICData() ? 1 : 0;
970 LocationSummary* summary = new LocationSummary(kNumInputs, num_temps); 976 LocationSummary* summary = new LocationSummary(kNumInputs, num_temps);
971 summary->set_in(0, Location::RequiresRegister()); 977 summary->set_in(0, Location::RequiresRegister());
972 summary->set_in(1, Location::RequiresRegister()); 978 summary->set_in(1, Location::RequiresRegister());
973 if (HasICData()) { 979 if (HasICData()) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 __ int3(); 1042 __ int3();
1037 } 1043 }
1038 1044
1039 1045
1040 LocationSummary* GotoInstr::MakeLocationSummary() const { 1046 LocationSummary* GotoInstr::MakeLocationSummary() const {
1041 return new LocationSummary(0, 0); 1047 return new LocationSummary(0, 0);
1042 } 1048 }
1043 1049
1044 1050
1045 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1051 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1052 if (HasParallelMove()) {
1053 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
1054 }
1055
1046 // We can fall through if the successor is the next block in the list. 1056 // We can fall through if the successor is the next block in the list.
1047 // Otherwise, we need a jump. 1057 // Otherwise, we need a jump.
1048 if (!compiler->IsNextBlock(successor())) { 1058 if (!compiler->IsNextBlock(successor())) {
1049 __ jmp(compiler->GetBlockLabel(successor())); 1059 __ jmp(compiler->GetBlockLabel(successor()));
1050 } 1060 }
1051 } 1061 }
1052 1062
1053 1063
1054 static Condition NegateCondition(Condition condition) { 1064 static Condition NegateCondition(Condition condition) {
1055 switch (condition) { 1065 switch (condition) {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 if (compiler->is_ssa()) { 1346 if (compiler->is_ssa()) {
1337 ASSERT(locs()->in(0).IsRegister()); 1347 ASSERT(locs()->in(0).IsRegister());
1338 __ PushRegister(locs()->in(0).reg()); 1348 __ PushRegister(locs()->in(0).reg());
1339 } 1349 }
1340 } 1350 }
1341 1351
1342 1352
1343 #undef __ 1353 #undef __
1344 1354
1345 } // namespace dart 1355 } // namespace dart
OLDNEW
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698