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

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

Issue 11665005: Support scalar lists in array bounds check elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 4119 matching lines...) Expand 10 before | Expand all | Expand 10 after
4130 4130
4131 virtual bool AffectedBySideEffect() const { return false; } 4131 virtual bool AffectedBySideEffect() const { return false; }
4132 4132
4133 Value* array() const { return inputs_[0]; } 4133 Value* array() const { return inputs_[0]; }
4134 Value* index() const { return inputs_[1]; } 4134 Value* index() const { return inputs_[1]; }
4135 4135
4136 intptr_t array_type() const { return array_type_; } 4136 intptr_t array_type() const { return array_type_; }
4137 4137
4138 bool IsRedundant(RangeBoundary length); 4138 bool IsRedundant(RangeBoundary length);
4139 4139
4140 // Returns the length offset for array and string types.
4141 static intptr_t LengthOffsetFor(intptr_t class_id);
4142
4143 static bool IsFixedLengthArrayType(intptr_t class_id);
4144
4140 private: 4145 private:
4141 intptr_t array_type_; 4146 intptr_t array_type_;
4142 4147
4143 // Returns the length offset for array and string types.
4144 static intptr_t LengthOffsetFor(intptr_t class_id);
4145
4146 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr); 4148 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr);
4147 }; 4149 };
4148 4150
4149 4151
4150 #undef DECLARE_INSTRUCTION 4152 #undef DECLARE_INSTRUCTION
4151 4153
4152 class Environment : public ZoneAllocated { 4154 class Environment : public ZoneAllocated {
4153 public: 4155 public:
4154 // Iterate the non-NULL values in the innermost level of an environment. 4156 // Iterate the non-NULL values in the innermost level of an environment.
4155 class ShallowIterator : public ValueObject { 4157 class ShallowIterator : public ValueObject {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
4354 ForwardInstructionIterator* current_iterator_; 4356 ForwardInstructionIterator* current_iterator_;
4355 4357
4356 private: 4358 private:
4357 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4359 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4358 }; 4360 };
4359 4361
4360 4362
4361 } // namespace dart 4363 } // namespace dart
4362 4364
4363 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4365 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698