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

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

Issue 10407018: Start porting fast typechecks to x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 }; 225 };
226 226
227 #undef DECLARE_VALUE 227 #undef DECLARE_VALUE
228 228
229 229
230 class AssertAssignableComp : public Computation { 230 class AssertAssignableComp : public Computation {
231 public: 231 public:
232 AssertAssignableComp(intptr_t token_index, 232 AssertAssignableComp(intptr_t token_index,
233 intptr_t try_index, 233 intptr_t try_index,
234 Value* value, 234 Value* value,
235 Value* instantiator, // Can be NULL.
235 Value* instantiator_type_arguments, // Can be NULL. 236 Value* instantiator_type_arguments, // Can be NULL.
236 const AbstractType& dst_type, 237 const AbstractType& dst_type,
237 const String& dst_name) 238 const String& dst_name)
238 : token_index_(token_index), 239 : token_index_(token_index),
239 try_index_(try_index), 240 try_index_(try_index),
240 value_(value), 241 value_(value),
242 instantiator_(instantiator),
241 instantiator_type_arguments_(instantiator_type_arguments), 243 instantiator_type_arguments_(instantiator_type_arguments),
242 dst_type_(dst_type), 244 dst_type_(dst_type),
243 dst_name_(dst_name) { 245 dst_name_(dst_name) {
244 ASSERT(value_ != NULL); 246 ASSERT(value_ != NULL);
245 ASSERT(!dst_type.IsNull()); 247 ASSERT(!dst_type.IsNull());
246 ASSERT(!dst_name.IsNull()); 248 ASSERT(!dst_name.IsNull());
247 } 249 }
248 250
249 DECLARE_COMPUTATION(AssertAssignable) 251 DECLARE_COMPUTATION(AssertAssignable)
250 252
251 intptr_t token_index() const { return token_index_; } 253 intptr_t token_index() const { return token_index_; }
252 intptr_t try_index() const { return try_index_; } 254 intptr_t try_index() const { return try_index_; }
253 Value* value() const { return value_; } 255 Value* value() const { return value_; }
256 Value* instantiator() const { return instantiator_; }
254 Value* instantiator_type_arguments() const { 257 Value* instantiator_type_arguments() const {
255 return instantiator_type_arguments_; 258 return instantiator_type_arguments_;
256 } 259 }
257 const AbstractType& dst_type() const { return dst_type_; } 260 const AbstractType& dst_type() const { return dst_type_; }
258 const String& dst_name() const { return dst_name_; } 261 const String& dst_name() const { return dst_name_; }
259 262
260 virtual intptr_t InputCount() const; 263 virtual intptr_t InputCount() const;
261 264
262 private: 265 private:
263 const intptr_t token_index_; 266 const intptr_t token_index_;
264 const intptr_t try_index_; 267 const intptr_t try_index_;
265 Value* value_; 268 Value* value_;
269 Value* instantiator_;
266 Value* instantiator_type_arguments_; 270 Value* instantiator_type_arguments_;
267 const AbstractType& dst_type_; 271 const AbstractType& dst_type_;
268 const String& dst_name_; 272 const String& dst_name_;
269 273
270 DISALLOW_COPY_AND_ASSIGN(AssertAssignableComp); 274 DISALLOW_COPY_AND_ASSIGN(AssertAssignableComp);
271 }; 275 };
272 276
273 277
274 class AssertBooleanComp : public TemplateComputation<1> { 278 class AssertBooleanComp : public TemplateComputation<1> {
275 public: 279 public:
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 private: 766 private:
763 DISALLOW_COPY_AND_ASSIGN(BooleanNegateComp); 767 DISALLOW_COPY_AND_ASSIGN(BooleanNegateComp);
764 }; 768 };
765 769
766 770
767 class InstanceOfComp : public Computation { 771 class InstanceOfComp : public Computation {
768 public: 772 public:
769 InstanceOfComp(intptr_t token_index, 773 InstanceOfComp(intptr_t token_index,
770 intptr_t try_index, 774 intptr_t try_index,
771 Value* value, 775 Value* value,
776 Value* instantiator, // Can be NULL.
772 Value* type_arguments, // Can be NULL. 777 Value* type_arguments, // Can be NULL.
773 const AbstractType& type, 778 const AbstractType& type,
774 bool negate_result) 779 bool negate_result)
775 : token_index_(token_index), 780 : token_index_(token_index),
776 try_index_(try_index), 781 try_index_(try_index),
777 value_(value), 782 value_(value),
783 instantiator_(instantiator),
778 type_arguments_(type_arguments), 784 type_arguments_(type_arguments),
779 type_(type), 785 type_(type),
780 negate_result_(negate_result) { 786 negate_result_(negate_result) {
781 ASSERT(value_ != NULL); 787 ASSERT(value_ != NULL);
782 ASSERT(!type.IsNull()); 788 ASSERT(!type.IsNull());
783 } 789 }
784 790
785 DECLARE_COMPUTATION(InstanceOf) 791 DECLARE_COMPUTATION(InstanceOf)
786 792
787 Value* value() const { return value_; } 793 Value* value() const { return value_; }
794 Value* instantiator() const { return instantiator_; }
788 Value* type_arguments() const { return type_arguments_; } 795 Value* type_arguments() const { return type_arguments_; }
789 bool negate_result() const { return negate_result_; } 796 bool negate_result() const { return negate_result_; }
790 const AbstractType& type() const { return type_; } 797 const AbstractType& type() const { return type_; }
791 intptr_t token_index() const { return token_index_; } 798 intptr_t token_index() const { return token_index_; }
792 intptr_t try_index() const { return try_index_; } 799 intptr_t try_index() const { return try_index_; }
793 800
794 virtual intptr_t InputCount() const; 801 virtual intptr_t InputCount() const;
795 802
796 private: 803 private:
797 const intptr_t token_index_; 804 const intptr_t token_index_;
798 const intptr_t try_index_; 805 const intptr_t try_index_;
799 Value* value_; 806 Value* value_;
807 Value* instantiator_;
800 Value* type_arguments_; 808 Value* type_arguments_;
801 const AbstractType& type_; 809 const AbstractType& type_;
802 const bool negate_result_; 810 const bool negate_result_;
803 811
804 DISALLOW_COPY_AND_ASSIGN(InstanceOfComp); 812 DISALLOW_COPY_AND_ASSIGN(InstanceOfComp);
805 }; 813 };
806 814
807 815
808 class AllocateObjectComp : public Computation { 816 class AllocateObjectComp : public Computation {
809 public: 817 public:
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 const GrowableArray<BlockEntryInstr*>& block_order_; 1701 const GrowableArray<BlockEntryInstr*>& block_order_;
1694 1702
1695 private: 1703 private:
1696 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 1704 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
1697 }; 1705 };
1698 1706
1699 1707
1700 } // namespace dart 1708 } // namespace dart
1701 1709
1702 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 1710 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698