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

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

Issue 1526123002: VM: Const-correctness fixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/dart_api_message.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 // Returns set of effects created by this instruction. 803 // Returns set of effects created by this instruction.
804 virtual EffectSet Effects() const = 0; 804 virtual EffectSet Effects() const = 0;
805 805
806 // Returns set of effects that affect this instruction. 806 // Returns set of effects that affect this instruction.
807 virtual EffectSet Dependencies() const { 807 virtual EffectSet Dependencies() const {
808 UNREACHABLE(); 808 UNREACHABLE();
809 return EffectSet::All(); 809 return EffectSet::All();
810 } 810 }
811 811
812 // Get the block entry for this instruction. 812 // Get the block entry for this instruction.
813 virtual BlockEntryInstr* GetBlock() const; 813 virtual BlockEntryInstr* GetBlock();
814 814
815 // Place identifiers used by the load optimization pass. 815 // Place identifiers used by the load optimization pass.
816 intptr_t place_id() const { return place_id_; } 816 intptr_t place_id() const { return place_id_; }
817 void set_place_id(intptr_t place_id) { place_id_ = place_id; } 817 void set_place_id(intptr_t place_id) { place_id_ = place_id; }
818 bool HasPlaceId() const { return place_id_ != kNoPlaceId; } 818 bool HasPlaceId() const { return place_id_ != kNoPlaceId; }
819 819
820 intptr_t inlining_id() const { return inlining_id_; } 820 intptr_t inlining_id() const { return inlining_id_; }
821 void set_inlining_id(intptr_t value) { 821 void set_inlining_id(intptr_t value) {
822 ASSERT(value >= 0); 822 ASSERT(value >= 0);
823 inlining_id_ = value; 823 inlining_id_ = value;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 // True for blocks inside a try { } region. 1174 // True for blocks inside a try { } region.
1175 bool InsideTryBlock() const { 1175 bool InsideTryBlock() const {
1176 return try_index_ != CatchClauseNode::kInvalidTryIndex; 1176 return try_index_ != CatchClauseNode::kInvalidTryIndex;
1177 } 1177 }
1178 1178
1179 BitVector* loop_info() const { return loop_info_; } 1179 BitVector* loop_info() const { return loop_info_; }
1180 void set_loop_info(BitVector* loop_info) { 1180 void set_loop_info(BitVector* loop_info) {
1181 loop_info_ = loop_info; 1181 loop_info_ = loop_info;
1182 } 1182 }
1183 1183
1184 virtual BlockEntryInstr* GetBlock() const { 1184 virtual BlockEntryInstr* GetBlock() {
1185 return const_cast<BlockEntryInstr*>(this); 1185 return this;
1186 } 1186 }
1187 1187
1188 // Helper to mutate the graph during inlining. This block should be 1188 // Helper to mutate the graph during inlining. This block should be
1189 // replaced with new_block as a predecessor of all of this block's 1189 // replaced with new_block as a predecessor of all of this block's
1190 // successors. 1190 // successors.
1191 void ReplaceAsPredecessorWith(BlockEntryInstr* new_block); 1191 void ReplaceAsPredecessorWith(BlockEntryInstr* new_block);
1192 1192
1193 void set_block_id(intptr_t block_id) { block_id_ = block_id; } 1193 void set_block_id(intptr_t block_id) { block_id_ = block_id; }
1194 1194
1195 intptr_t offset() const { return offset_; } 1195 intptr_t offset() const { return offset_; }
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 is_alive_(false), 1879 is_alive_(false),
1880 representation_(kTagged), 1880 representation_(kTagged),
1881 reaching_defs_(NULL), 1881 reaching_defs_(NULL),
1882 loop_variable_info_(NULL) { 1882 loop_variable_info_(NULL) {
1883 for (intptr_t i = 0; i < num_inputs; ++i) { 1883 for (intptr_t i = 0; i < num_inputs; ++i) {
1884 inputs_.Add(NULL); 1884 inputs_.Add(NULL);
1885 } 1885 }
1886 } 1886 }
1887 1887
1888 // Get the block entry for that instruction. 1888 // Get the block entry for that instruction.
1889 virtual BlockEntryInstr* GetBlock() const { return block(); } 1889 virtual BlockEntryInstr* GetBlock() { return block(); }
1890 JoinEntryInstr* block() const { return block_; } 1890 JoinEntryInstr* block() const { return block_; }
1891 1891
1892 virtual CompileType ComputeType() const; 1892 virtual CompileType ComputeType() const;
1893 virtual bool RecomputeType(); 1893 virtual bool RecomputeType();
1894 1894
1895 intptr_t InputCount() const { return inputs_.length(); } 1895 intptr_t InputCount() const { return inputs_.length(); }
1896 1896
1897 Value* InputAt(intptr_t i) const { return inputs_[i]; } 1897 Value* InputAt(intptr_t i) const { return inputs_[i]; }
1898 1898
1899 virtual bool CanDeoptimize() const { return false; } 1899 virtual bool CanDeoptimize() const { return false; }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 BlockEntryInstr* block, 1974 BlockEntryInstr* block,
1975 Register base_reg = FPREG) 1975 Register base_reg = FPREG)
1976 : index_(index), base_reg_(base_reg), block_(block) { } 1976 : index_(index), base_reg_(base_reg), block_(block) { }
1977 1977
1978 DECLARE_INSTRUCTION(Parameter) 1978 DECLARE_INSTRUCTION(Parameter)
1979 1979
1980 intptr_t index() const { return index_; } 1980 intptr_t index() const { return index_; }
1981 Register base_reg() const { return base_reg_; } 1981 Register base_reg() const { return base_reg_; }
1982 1982
1983 // Get the block entry for that instruction. 1983 // Get the block entry for that instruction.
1984 virtual BlockEntryInstr* GetBlock() const { return block_; } 1984 virtual BlockEntryInstr* GetBlock() { return block_; }
1985 1985
1986 intptr_t InputCount() const { return 0; } 1986 intptr_t InputCount() const { return 0; }
1987 Value* InputAt(intptr_t i) const { 1987 Value* InputAt(intptr_t i) const {
1988 UNREACHABLE(); 1988 UNREACHABLE();
1989 return NULL; 1989 return NULL;
1990 } 1990 }
1991 1991
1992 virtual bool CanDeoptimize() const { return false; } 1992 virtual bool CanDeoptimize() const { return false; }
1993 1993
1994 virtual EffectSet Effects() const { return EffectSet::None(); } 1994 virtual EffectSet Effects() const { return EffectSet::None(); }
(...skipping 6128 matching lines...) Expand 10 before | Expand all | Expand 10 after
8123 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8123 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8124 UNIMPLEMENTED(); \ 8124 UNIMPLEMENTED(); \
8125 return NULL; \ 8125 return NULL; \
8126 } \ 8126 } \
8127 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8127 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8128 8128
8129 8129
8130 } // namespace dart 8130 } // namespace dart
8131 8131
8132 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8132 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698