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

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

Issue 10911214: Split array loads/stores for growable arrays into two IL instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 8 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.h ('k') | 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 67
68 bool CheckArrayBoundInstr::AttributesEqual(Definition* other) const { 68 bool CheckArrayBoundInstr::AttributesEqual(Definition* other) const {
69 CheckArrayBoundInstr* other_check = other->AsCheckArrayBound(); 69 CheckArrayBoundInstr* other_check = other->AsCheckArrayBound();
70 ASSERT(other_check != NULL); 70 ASSERT(other_check != NULL);
71 return array_type() == other_check->array_type(); 71 return array_type() == other_check->array_type();
72 } 72 }
73 73
74 74
75 bool LoadVMFieldInstr::AttributesEqual(Definition* other) const {
76 LoadVMFieldInstr* other_load = other->AsLoadVMField();
77 ASSERT(other_load != NULL);
78 ASSERT((offset_in_bytes() != other_load->offset_in_bytes()) ||
79 ((immutable_ == other_load->immutable_) &&
80 (ResultCid() == other_load->ResultCid())));
81 return offset_in_bytes() == other_load->offset_in_bytes();
82 }
83
84
75 // Returns true if the value represents a constant. 85 // Returns true if the value represents a constant.
76 bool Value::BindsToConstant() const { 86 bool Value::BindsToConstant() const {
77 return definition()->IsConstant(); 87 return definition()->IsConstant();
78 } 88 }
79 89
80 90
81 // Returns true if the value represents constant null. 91 // Returns true if the value represents constant null.
82 bool Value::BindsToConstantNull() const { 92 bool Value::BindsToConstantNull() const {
83 ConstantInstr* constant = definition()->AsConstant(); 93 ConstantInstr* constant = definition()->AsConstant();
84 return (constant != NULL) && constant->value().IsNull(); 94 return (constant != NULL) && constant->value().IsNull();
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 value->set_use_index(use_index++); 1664 value->set_use_index(use_index++);
1655 value->AddToEnvUseList(); 1665 value->AddToEnvUseList();
1656 } 1666 }
1657 instr->set_env(copy); 1667 instr->set_env(copy);
1658 } 1668 }
1659 1669
1660 1670
1661 #undef __ 1671 #undef __
1662 1672
1663 } // namespace dart 1673 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698