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

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

Issue 10828318: Disable using CompileType for class check elimination. (Closed) Base URL: http://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
« no previous file with comments | « no previous file | 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) 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_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 } 1035 }
1036 1036
1037 1037
1038 void StoreContextComp::EmitNativeCode(FlowGraphCompiler* compiler) { 1038 void StoreContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
1039 // Nothing to do. Context register were loaded by register allocator. 1039 // Nothing to do. Context register were loaded by register allocator.
1040 ASSERT(locs()->in(0).reg() == CTX); 1040 ASSERT(locs()->in(0).reg() == CTX);
1041 } 1041 }
1042 1042
1043 1043
1044 Definition* StrictCompareComp::TryReplace(BindInstr* instr) { 1044 Definition* StrictCompareComp::TryReplace(BindInstr* instr) {
1045 // TODO(srdjan): Do not use CompileType for class check elimination.
1045 return NULL; 1046 return NULL;
1046 UseVal* left_use = left()->AsUse(); 1047 UseVal* left_use = left()->AsUse();
1047 UseVal* right_use = right()->AsUse(); 1048 UseVal* right_use = right()->AsUse();
1048 if ((right_use == NULL) || (left_use == NULL)) return NULL; 1049 if ((right_use == NULL) || (left_use == NULL)) return NULL;
1049 Definition* left = left_use->definition(); 1050 Definition* left = left_use->definition();
1050 BindInstr* right = right_use->definition()->AsBind(); 1051 BindInstr* right = right_use->definition()->AsBind();
1051 if (right == NULL) return NULL; 1052 if (right == NULL) return NULL;
1052 ConstantVal* right_constant = right->computation()->AsConstant(); 1053 ConstantVal* right_constant = right->computation()->AsConstant();
1053 if (right_constant == NULL) return NULL; 1054 if (right_constant == NULL) return NULL;
1054 // TODO(fschneider): Handle other cases: e === false and e !== true/false. 1055 // TODO(fschneider): Handle other cases: e === false and e !== true/false.
1055 // Handles e === true. 1056 // Handles e === true.
1056 // const AbstractType& left_type = AbstractType::Handle(left->CompileType());
1057 if ((kind() == Token::kEQ_STRICT) && 1057 if ((kind() == Token::kEQ_STRICT) &&
1058 (right_constant->value().raw() == Bool::True()) && 1058 (right_constant->value().raw() == Bool::True()) &&
1059 left_use->CompileTypeIsMoreSpecificThan( 1059 left_use->CompileTypeIsMoreSpecificThan(
1060 Type::Handle(Type::BoolInterface()))) { 1060 Type::Handle(Type::BoolInterface()))) {
1061 // Remove the constant from the graph. 1061 // Remove the constant from the graph.
1062 right->RemoveFromGraph(); 1062 right->RemoveFromGraph();
1063 // Return left subexpression as the replacement for this instruction. 1063 // Return left subexpression as the replacement for this instruction.
1064 return left; 1064 return left;
1065 } 1065 }
1066 return NULL; 1066 return NULL;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 if (compiler->is_ssa()) { 1309 if (compiler->is_ssa()) {
1310 ASSERT(locs()->in(0).IsRegister()); 1310 ASSERT(locs()->in(0).IsRegister());
1311 __ PushRegister(locs()->in(0).reg()); 1311 __ PushRegister(locs()->in(0).reg());
1312 } 1312 }
1313 } 1313 }
1314 1314
1315 1315
1316 #undef __ 1316 #undef __
1317 1317
1318 } // namespace dart 1318 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698