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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 2b9b76252667df7db260b279a63281291af8a2ce..897ee3fec66db6faceb23ca88dcf808922aafb38 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -810,7 +810,7 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
}
// Get the block entry for this instruction.
- virtual BlockEntryInstr* GetBlock() const;
+ virtual BlockEntryInstr* GetBlock();
// Place identifiers used by the load optimization pass.
intptr_t place_id() const { return place_id_; }
@@ -1181,8 +1181,8 @@ class BlockEntryInstr : public Instruction {
loop_info_ = loop_info;
}
- virtual BlockEntryInstr* GetBlock() const {
- return const_cast<BlockEntryInstr*>(this);
+ virtual BlockEntryInstr* GetBlock() {
+ return this;
}
// Helper to mutate the graph during inlining. This block should be
@@ -1886,7 +1886,7 @@ class PhiInstr : public Definition {
}
// Get the block entry for that instruction.
- virtual BlockEntryInstr* GetBlock() const { return block(); }
+ virtual BlockEntryInstr* GetBlock() { return block(); }
JoinEntryInstr* block() const { return block_; }
virtual CompileType ComputeType() const;
@@ -1981,7 +1981,7 @@ class ParameterInstr : public Definition {
Register base_reg() const { return base_reg_; }
// Get the block entry for that instruction.
- virtual BlockEntryInstr* GetBlock() const { return block_; }
+ virtual BlockEntryInstr* GetBlock() { return block_; }
intptr_t InputCount() const { return 0; }
Value* InputAt(intptr_t i) const {
« 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