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

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

Issue 163683006: Simplify generated code for object allocation with type arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 15 matching lines...) Expand all
26 26
27 DEFINE_FLAG(bool, propagate_ic_data, true, 27 DEFINE_FLAG(bool, propagate_ic_data, true,
28 "Propagate IC data from unoptimized to optimized IC calls."); 28 "Propagate IC data from unoptimized to optimized IC calls.");
29 DEFINE_FLAG(bool, unbox_numeric_fields, true, 29 DEFINE_FLAG(bool, unbox_numeric_fields, true,
30 "Support unboxed double and float32x4 fields."); 30 "Support unboxed double and float32x4 fields.");
31 DECLARE_FLAG(bool, enable_type_checks); 31 DECLARE_FLAG(bool, enable_type_checks);
32 DECLARE_FLAG(bool, eliminate_type_checks); 32 DECLARE_FLAG(bool, eliminate_type_checks);
33 DECLARE_FLAG(bool, trace_optimization); 33 DECLARE_FLAG(bool, trace_optimization);
34 DECLARE_FLAG(bool, trace_constant_propagation); 34 DECLARE_FLAG(bool, trace_constant_propagation);
35 DECLARE_FLAG(bool, throw_on_javascript_int_overflow); 35 DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
36 DECLARE_FLAG(bool, enable_type_checks);
36 37
37 Definition::Definition() 38 Definition::Definition()
38 : range_(NULL), 39 : range_(NULL),
39 type_(NULL), 40 type_(NULL),
40 temp_index_(-1), 41 temp_index_(-1),
41 ssa_temp_index_(-1), 42 ssa_temp_index_(-1),
42 input_use_list_(NULL), 43 input_use_list_(NULL),
43 env_use_list_(NULL), 44 env_use_list_(NULL),
44 use_kind_(kValue), // Phis and parameters rely on this default. 45 use_kind_(kValue), // Phis and parameters rely on this default.
45 constant_value_(Object::ZoneHandle(ConstantPropagator::Unknown())) { 46 constant_value_(Object::ZoneHandle(ConstantPropagator::Unknown())) {
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 value()->Type()->IsAssignableTo(dst_type())) { 1492 value()->Type()->IsAssignableTo(dst_type())) {
1492 return value()->definition(); 1493 return value()->definition();
1493 } 1494 }
1494 ConstantInstr* null_constant = flow_graph->constant_null(); 1495 ConstantInstr* null_constant = flow_graph->constant_null();
1495 instantiator_type_arguments()->BindTo(null_constant); 1496 instantiator_type_arguments()->BindTo(null_constant);
1496 } 1497 }
1497 return this; 1498 return this;
1498 } 1499 }
1499 1500
1500 1501
1502 Definition* InstantiateTypeArgumentsInstr::Canonicalize(FlowGraph* flow_graph) {
1503 return (FLAG_enable_type_checks || HasUses()) ? this : NULL;
1504 }
1505
1506
1501 LocationSummary* DebugStepCheckInstr::MakeLocationSummary(bool opt) const { 1507 LocationSummary* DebugStepCheckInstr::MakeLocationSummary(bool opt) const {
1502 const intptr_t kNumInputs = 0; 1508 const intptr_t kNumInputs = 0;
1503 const intptr_t kNumTemps = 0; 1509 const intptr_t kNumTemps = 0;
1504 LocationSummary* locs = 1510 LocationSummary* locs =
1505 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 1511 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
1506 return locs; 1512 return locs;
1507 } 1513 }
1508 1514
1509 1515
1510 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1516 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 case Token::kTRUNCDIV: return 0; 3150 case Token::kTRUNCDIV: return 0;
3145 case Token::kMOD: return 1; 3151 case Token::kMOD: return 1;
3146 default: UNIMPLEMENTED(); return -1; 3152 default: UNIMPLEMENTED(); return -1;
3147 } 3153 }
3148 } 3154 }
3149 3155
3150 3156
3151 #undef __ 3157 #undef __
3152 3158
3153 } // namespace dart 3159 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698