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

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

Issue 10451006: - Rename NativeLoadField/NativeStoreField to LoadVMField/StoreVMField. (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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 M(LoadInstanceField, LoadInstanceFieldComp) \ 48 M(LoadInstanceField, LoadInstanceFieldComp) \
49 M(StoreInstanceField, StoreInstanceFieldComp) \ 49 M(StoreInstanceField, StoreInstanceFieldComp) \
50 M(LoadStaticField, LoadStaticFieldComp) \ 50 M(LoadStaticField, LoadStaticFieldComp) \
51 M(StoreStaticField, StoreStaticFieldComp) \ 51 M(StoreStaticField, StoreStaticFieldComp) \
52 M(BooleanNegate, BooleanNegateComp) \ 52 M(BooleanNegate, BooleanNegateComp) \
53 M(InstanceOf, InstanceOfComp) \ 53 M(InstanceOf, InstanceOfComp) \
54 M(CreateArray, CreateArrayComp) \ 54 M(CreateArray, CreateArrayComp) \
55 M(CreateClosure, CreateClosureComp) \ 55 M(CreateClosure, CreateClosureComp) \
56 M(AllocateObject, AllocateObjectComp) \ 56 M(AllocateObject, AllocateObjectComp) \
57 M(AllocateObjectWithBoundsCheck, AllocateObjectWithBoundsCheckComp) \ 57 M(AllocateObjectWithBoundsCheck, AllocateObjectWithBoundsCheckComp) \
58 M(NativeLoadField, NativeLoadFieldComp) \ 58 M(LoadVMField, LoadVMFieldComp) \
59 M(NativeStoreField, NativeStoreFieldComp) \ 59 M(StoreVMField, StoreVMFieldComp) \
60 M(InstantiateTypeArguments, InstantiateTypeArgumentsComp) \ 60 M(InstantiateTypeArguments, InstantiateTypeArgumentsComp) \
61 M(ExtractConstructorTypeArguments, ExtractConstructorTypeArgumentsComp) \ 61 M(ExtractConstructorTypeArguments, ExtractConstructorTypeArgumentsComp) \
62 M(ExtractConstructorInstantiator, ExtractConstructorInstantiatorComp) \ 62 M(ExtractConstructorInstantiator, ExtractConstructorInstantiatorComp) \
63 M(AllocateContext, AllocateContextComp) \ 63 M(AllocateContext, AllocateContextComp) \
64 M(ChainContext, ChainContextComp) \ 64 M(ChainContext, ChainContextComp) \
65 M(CloneContext, CloneContextComp) \ 65 M(CloneContext, CloneContextComp) \
66 M(CatchEntry, CatchEntryComp) \ 66 M(CatchEntry, CatchEntryComp) \
67 67
68 68
69 #define FORWARD_DECLARATION(ShortName, ClassName) class ClassName; 69 #define FORWARD_DECLARATION(ShortName, ClassName) class ClassName;
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1036
1037 private: 1037 private:
1038 const ClosureNode& ast_node_; 1038 const ClosureNode& ast_node_;
1039 const intptr_t try_index_; 1039 const intptr_t try_index_;
1040 Value* type_arguments_; 1040 Value* type_arguments_;
1041 1041
1042 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp); 1042 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp);
1043 }; 1043 };
1044 1044
1045 1045
1046 class NativeLoadFieldComp : public TemplateComputation<1> { 1046 class LoadVMFieldComp : public TemplateComputation<1> {
1047 public: 1047 public:
1048 NativeLoadFieldComp(Value* value, 1048 LoadVMFieldComp(Value* value,
1049 intptr_t offset_in_bytes, 1049 intptr_t offset_in_bytes,
1050 const AbstractType& type) 1050 const AbstractType& type)
1051 : offset_in_bytes_(offset_in_bytes), type_(type) { 1051 : offset_in_bytes_(offset_in_bytes), type_(type) {
1052 ASSERT(value != NULL); 1052 ASSERT(value != NULL);
1053 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. 1053 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
1054 inputs_[0] = value; 1054 inputs_[0] = value;
1055 } 1055 }
1056 1056
1057 DECLARE_COMPUTATION(NativeLoadField) 1057 DECLARE_COMPUTATION(LoadVMField)
1058 1058
1059 Value* value() const { return inputs_[0]; } 1059 Value* value() const { return inputs_[0]; }
1060 intptr_t offset_in_bytes() const { return offset_in_bytes_; } 1060 intptr_t offset_in_bytes() const { return offset_in_bytes_; }
1061 const AbstractType& type() const { return type_; } 1061 const AbstractType& type() const { return type_; }
1062 1062
1063 virtual void PrintOperandsTo(BufferFormatter* f) const; 1063 virtual void PrintOperandsTo(BufferFormatter* f) const;
1064 1064
1065 private: 1065 private:
1066 const intptr_t offset_in_bytes_; 1066 const intptr_t offset_in_bytes_;
1067 const AbstractType& type_; 1067 const AbstractType& type_;
1068 1068
1069 DISALLOW_COPY_AND_ASSIGN(NativeLoadFieldComp); 1069 DISALLOW_COPY_AND_ASSIGN(LoadVMFieldComp);
1070 }; 1070 };
1071 1071
1072 1072
1073 class NativeStoreFieldComp : public TemplateComputation<2> { 1073 class StoreVMFieldComp : public TemplateComputation<2> {
1074 public: 1074 public:
1075 NativeStoreFieldComp(Value* dest, 1075 StoreVMFieldComp(Value* dest,
1076 intptr_t offset_in_bytes, 1076 intptr_t offset_in_bytes,
1077 Value* value, 1077 Value* value,
1078 const AbstractType& type) 1078 const AbstractType& type)
1079 : offset_in_bytes_(offset_in_bytes), type_(type) { 1079 : offset_in_bytes_(offset_in_bytes), type_(type) {
1080 ASSERT(value != NULL); 1080 ASSERT(value != NULL);
1081 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. 1081 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
1082 inputs_[0] = dest; 1082 inputs_[0] = value;
1083 inputs_[1] = value; 1083 inputs_[1] = dest;
1084 } 1084 }
1085 1085
1086 DECLARE_COMPUTATION(NativeStoreField) 1086 DECLARE_COMPUTATION(StoreVMField)
1087 1087
1088 Value* dest() const { return inputs_[0]; } 1088 Value* value() const { return inputs_[0]; }
1089 Value* value() const { return inputs_[1]; } 1089 Value* dest() const { return inputs_[1]; }
1090 intptr_t offset_in_bytes() const { return offset_in_bytes_; } 1090 intptr_t offset_in_bytes() const { return offset_in_bytes_; }
1091 const AbstractType& type() const { return type_; } 1091 const AbstractType& type() const { return type_; }
1092 1092
1093 virtual void PrintOperandsTo(BufferFormatter* f) const; 1093 virtual void PrintOperandsTo(BufferFormatter* f) const;
1094 1094
1095 private: 1095 private:
1096 const intptr_t offset_in_bytes_; 1096 const intptr_t offset_in_bytes_;
1097 const AbstractType& type_; 1097 const AbstractType& type_;
1098 1098
1099 DISALLOW_COPY_AND_ASSIGN(NativeStoreFieldComp); 1099 DISALLOW_COPY_AND_ASSIGN(StoreVMFieldComp);
1100 }; 1100 };
1101 1101
1102 1102
1103 class InstantiateTypeArgumentsComp : public TemplateComputation<1> { 1103 class InstantiateTypeArgumentsComp : public TemplateComputation<1> {
1104 public: 1104 public:
1105 InstantiateTypeArgumentsComp(intptr_t token_index, 1105 InstantiateTypeArgumentsComp(intptr_t token_index,
1106 intptr_t try_index, 1106 intptr_t try_index,
1107 const AbstractTypeArguments& type_arguments, 1107 const AbstractTypeArguments& type_arguments,
1108 Value* instantiator) 1108 Value* instantiator)
1109 : token_index_(token_index), 1109 : token_index_(token_index),
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 const GrowableArray<BlockEntryInstr*>& block_order_; 1864 const GrowableArray<BlockEntryInstr*>& block_order_;
1865 1865
1866 private: 1866 private:
1867 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 1867 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
1868 }; 1868 };
1869 1869
1870 1870
1871 } // namespace dart 1871 } // namespace dart
1872 1872
1873 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 1873 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698