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

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

Issue 12473002: Complete implementation of bounds checking in the vm, by introducing a vm object (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/heap_profiler.cc ('k') | runtime/vm/object.h » ('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/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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (dst_type().IsInstantiated()) return this; 1199 if (dst_type().IsInstantiated()) return this;
1200 1200
1201 ConstantInstr* constant_type_args = 1201 ConstantInstr* constant_type_args =
1202 instantiator_type_arguments()->definition()->AsConstant(); 1202 instantiator_type_arguments()->definition()->AsConstant();
1203 if (constant_type_args != NULL && 1203 if (constant_type_args != NULL &&
1204 !constant_type_args->value().IsNull() && 1204 !constant_type_args->value().IsNull() &&
1205 constant_type_args->value().IsTypeArguments()) { 1205 constant_type_args->value().IsTypeArguments()) {
1206 const TypeArguments& instantiator_type_args = 1206 const TypeArguments& instantiator_type_args =
1207 TypeArguments::Cast(constant_type_args->value()); 1207 TypeArguments::Cast(constant_type_args->value());
1208 const AbstractType& new_dst_type = AbstractType::Handle( 1208 const AbstractType& new_dst_type = AbstractType::Handle(
1209 dst_type().InstantiateFrom(instantiator_type_args)); 1209 dst_type().InstantiateFrom(instantiator_type_args, NULL));
1210 set_dst_type(AbstractType::ZoneHandle(new_dst_type.Canonicalize())); 1210 set_dst_type(AbstractType::ZoneHandle(new_dst_type.Canonicalize()));
1211 ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle()); 1211 ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle());
1212 // It is ok to insert instructions before the current during 1212 // It is ok to insert instructions before the current during
1213 // forward iteration. 1213 // forward iteration.
1214 optimizer->InsertBefore(this, null_constant, NULL, Definition::kValue); 1214 optimizer->InsertBefore(this, null_constant, NULL, Definition::kValue);
1215 instantiator_type_arguments()->BindTo(null_constant); 1215 instantiator_type_arguments()->BindTo(null_constant);
1216 } 1216 }
1217 return this; 1217 return this;
1218 } 1218 }
1219 1219
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 default: 2272 default:
2273 UNREACHABLE(); 2273 UNREACHABLE();
2274 } 2274 }
2275 return kPowRuntimeEntry; 2275 return kPowRuntimeEntry;
2276 } 2276 }
2277 2277
2278 2278
2279 #undef __ 2279 #undef __
2280 2280
2281 } // namespace dart 2281 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/heap_profiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698