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

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

Issue 1999043002: VM: Fix bug that can causes infinite opt/deopt loop. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.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 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after
3025 // TODO(srdjan): Modify ComparisonInstr to allow 1 or 2 arguments, since 3025 // TODO(srdjan): Modify ComparisonInstr to allow 1 or 2 arguments, since
3026 // TestCidInstr needs only one argument 3026 // TestCidInstr needs only one argument
3027 class TestCidsInstr : public ComparisonInstr { 3027 class TestCidsInstr : public ComparisonInstr {
3028 public: 3028 public:
3029 TestCidsInstr(TokenPosition token_pos, 3029 TestCidsInstr(TokenPosition token_pos,
3030 Token::Kind kind, 3030 Token::Kind kind,
3031 Value* value, 3031 Value* value,
3032 const ZoneGrowableArray<intptr_t>& cid_results, 3032 const ZoneGrowableArray<intptr_t>& cid_results,
3033 intptr_t deopt_id) 3033 intptr_t deopt_id)
3034 : ComparisonInstr(token_pos, kind, value, NULL, deopt_id), 3034 : ComparisonInstr(token_pos, kind, value, NULL, deopt_id),
3035 cid_results_(cid_results) { 3035 cid_results_(cid_results),
3036 licm_hoisted_(false) {
3036 ASSERT((kind == Token::kIS) || (kind == Token::kISNOT)); 3037 ASSERT((kind == Token::kIS) || (kind == Token::kISNOT));
3037 set_operation_cid(kObjectCid); 3038 set_operation_cid(kObjectCid);
3038 } 3039 }
3039 3040
3040 virtual intptr_t InputCount() const { return 1; } 3041 virtual intptr_t InputCount() const { return 1; }
3041 3042
3042 const ZoneGrowableArray<intptr_t>& cid_results() const { 3043 const ZoneGrowableArray<intptr_t>& cid_results() const {
3043 return cid_results_; 3044 return cid_results_;
3044 } 3045 }
3045 3046
(...skipping 14 matching lines...) Expand all
3060 } 3061 }
3061 3062
3062 virtual bool AttributesEqual(Instruction* other) const; 3063 virtual bool AttributesEqual(Instruction* other) const;
3063 3064
3064 virtual void EmitBranchCode(FlowGraphCompiler* compiler, 3065 virtual void EmitBranchCode(FlowGraphCompiler* compiler,
3065 BranchInstr* branch); 3066 BranchInstr* branch);
3066 3067
3067 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, 3068 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
3068 BranchLabels labels); 3069 BranchLabels labels);
3069 3070
3071 void set_licm_hoisted(bool value) { licm_hoisted_ = value; }
3072
3070 PRINT_OPERANDS_TO_SUPPORT 3073 PRINT_OPERANDS_TO_SUPPORT
3071 3074
3072 private: 3075 private:
3073 const ZoneGrowableArray<intptr_t>& cid_results_; 3076 const ZoneGrowableArray<intptr_t>& cid_results_;
3077 bool licm_hoisted_;
3074 DISALLOW_COPY_AND_ASSIGN(TestCidsInstr); 3078 DISALLOW_COPY_AND_ASSIGN(TestCidsInstr);
3075 }; 3079 };
3076 3080
3077 3081
3078 class EqualityCompareInstr : public ComparisonInstr { 3082 class EqualityCompareInstr : public ComparisonInstr {
3079 public: 3083 public:
3080 EqualityCompareInstr(TokenPosition token_pos, 3084 EqualityCompareInstr(TokenPosition token_pos,
3081 Token::Kind kind, 3085 Token::Kind kind,
3082 Value* left, 3086 Value* left,
3083 Value* right, 3087 Value* right,
(...skipping 5171 matching lines...) Expand 10 before | Expand all | Expand 10 after
8255 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8259 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8256 UNIMPLEMENTED(); \ 8260 UNIMPLEMENTED(); \
8257 return NULL; \ 8261 return NULL; \
8258 } \ 8262 } \
8259 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8263 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8260 8264
8261 8265
8262 } // namespace dart 8266 } // namespace dart
8263 8267
8264 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8268 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698