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

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

Issue 10407026: Address a few TODOs related to type propagation. (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
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.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 #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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 private: 945 private:
946 const intptr_t offset_in_bytes_; 946 const intptr_t offset_in_bytes_;
947 const AbstractType& type_; 947 const AbstractType& type_;
948 948
949 DISALLOW_COPY_AND_ASSIGN(NativeLoadFieldComp); 949 DISALLOW_COPY_AND_ASSIGN(NativeLoadFieldComp);
950 }; 950 };
951 951
952 952
953 class NativeStoreFieldComp : public TemplateComputation<2> { 953 class NativeStoreFieldComp : public TemplateComputation<2> {
954 public: 954 public:
955 NativeStoreFieldComp(Value* dest, intptr_t offset_in_bytes, Value* value) 955 NativeStoreFieldComp(Value* dest,
956 : offset_in_bytes_(offset_in_bytes) { 956 intptr_t offset_in_bytes,
957 Value* value,
958 const AbstractType& type)
959 : offset_in_bytes_(offset_in_bytes), type_(type) {
957 ASSERT(value != NULL); 960 ASSERT(value != NULL);
961 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
958 inputs_[0] = dest; 962 inputs_[0] = dest;
959 inputs_[1] = value; 963 inputs_[1] = value;
960 } 964 }
961 965
962 DECLARE_COMPUTATION(NativeStoreField) 966 DECLARE_COMPUTATION(NativeStoreField)
963 967
964 Value* dest() const { return inputs_[0]; } 968 Value* dest() const { return inputs_[0]; }
965 Value* value() const { return inputs_[1]; } 969 Value* value() const { return inputs_[1]; }
966 intptr_t offset_in_bytes() const { return offset_in_bytes_; } 970 intptr_t offset_in_bytes() const { return offset_in_bytes_; }
971 const AbstractType& type() const { return type_; }
967 972
968 private: 973 private:
969 const intptr_t offset_in_bytes_; 974 const intptr_t offset_in_bytes_;
975 const AbstractType& type_;
970 976
971 DISALLOW_COPY_AND_ASSIGN(NativeStoreFieldComp); 977 DISALLOW_COPY_AND_ASSIGN(NativeStoreFieldComp);
972 }; 978 };
973 979
974 980
975 class InstantiateTypeArgumentsComp : public TemplateComputation<1> { 981 class InstantiateTypeArgumentsComp : public TemplateComputation<1> {
976 public: 982 public:
977 InstantiateTypeArgumentsComp(intptr_t token_index, 983 InstantiateTypeArgumentsComp(intptr_t token_index,
978 intptr_t try_index, 984 intptr_t try_index,
979 const AbstractTypeArguments& type_arguments, 985 const AbstractTypeArguments& type_arguments,
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 const GrowableArray<BlockEntryInstr*>& block_order_; 1693 const GrowableArray<BlockEntryInstr*>& block_order_;
1688 1694
1689 private: 1695 private:
1690 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 1696 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
1691 }; 1697 };
1692 1698
1693 1699
1694 } // namespace dart 1700 } // namespace dart
1695 1701
1696 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 1702 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698