| OLD | NEW |
| 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 virtual void InheritDeoptTarget(Isolate* isolate, Instruction* other); | 833 virtual void InheritDeoptTarget(Isolate* isolate, Instruction* other); |
| 834 | 834 |
| 835 bool NeedsEnvironment() const { | 835 bool NeedsEnvironment() const { |
| 836 return CanDeoptimize() || CanBecomeDeoptimizationTarget(); | 836 return CanDeoptimize() || CanBecomeDeoptimizationTarget(); |
| 837 } | 837 } |
| 838 | 838 |
| 839 virtual bool CanBecomeDeoptimizationTarget() const { | 839 virtual bool CanBecomeDeoptimizationTarget() const { |
| 840 return false; | 840 return false; |
| 841 } | 841 } |
| 842 | 842 |
| 843 void InheritDeoptTargetAfter(Isolate* isolate, Instruction* other); | 843 void InheritDeoptTargetAfter(FlowGraph* flow_graph, |
| 844 Definition* call, |
| 845 Definition* result); |
| 844 | 846 |
| 845 virtual bool MayThrow() const = 0; | 847 virtual bool MayThrow() const = 0; |
| 846 | 848 |
| 847 bool IsDominatedBy(Instruction* dom); | 849 bool IsDominatedBy(Instruction* dom); |
| 848 | 850 |
| 849 protected: | 851 protected: |
| 850 // Fetch deopt id without checking if this computation can deoptimize. | 852 // Fetch deopt id without checking if this computation can deoptimize. |
| 851 intptr_t GetDeoptId() const { | 853 intptr_t GetDeoptId() const { |
| 852 return deopt_id_; | 854 return deopt_id_; |
| 853 } | 855 } |
| (...skipping 7049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7903 | 7905 |
| 7904 const Code& code() const { return parsed_function_->code(); } | 7906 const Code& code() const { return parsed_function_->code(); } |
| 7905 | 7907 |
| 7906 Environment* DeepCopy(Isolate* isolate) const { | 7908 Environment* DeepCopy(Isolate* isolate) const { |
| 7907 return DeepCopy(isolate, Length()); | 7909 return DeepCopy(isolate, Length()); |
| 7908 } | 7910 } |
| 7909 | 7911 |
| 7910 void DeepCopyTo(Isolate* isolate, Instruction* instr) const; | 7912 void DeepCopyTo(Isolate* isolate, Instruction* instr) const; |
| 7911 void DeepCopyToOuter(Isolate* isolate, Instruction* instr) const; | 7913 void DeepCopyToOuter(Isolate* isolate, Instruction* instr) const; |
| 7912 | 7914 |
| 7915 void DeepCopyAfterTo(Isolate* isolate, |
| 7916 Instruction* instr, |
| 7917 intptr_t argc, |
| 7918 Definition* dead, |
| 7919 Definition* result) const; |
| 7920 |
| 7913 void PrintTo(BufferFormatter* f) const; | 7921 void PrintTo(BufferFormatter* f) const; |
| 7914 const char* ToCString() const; | 7922 const char* ToCString() const; |
| 7915 | 7923 |
| 7916 // Deep copy an environment. The 'length' parameter may be less than the | 7924 // Deep copy an environment. The 'length' parameter may be less than the |
| 7917 // environment's length in order to drop values (e.g., passed arguments) | 7925 // environment's length in order to drop values (e.g., passed arguments) |
| 7918 // from the copy. | 7926 // from the copy. |
| 7919 Environment* DeepCopy(Isolate* isolate, intptr_t length) const; | 7927 Environment* DeepCopy(Isolate* isolate, intptr_t length) const; |
| 7920 | 7928 |
| 7921 private: | 7929 private: |
| 7922 friend class ShallowIterator; | 7930 friend class ShallowIterator; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7985 Isolate* isolate, bool opt) const { \ | 7993 Isolate* isolate, bool opt) const { \ |
| 7986 UNIMPLEMENTED(); \ | 7994 UNIMPLEMENTED(); \ |
| 7987 return NULL; \ | 7995 return NULL; \ |
| 7988 } \ | 7996 } \ |
| 7989 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 7997 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 7990 | 7998 |
| 7991 | 7999 |
| 7992 } // namespace dart | 8000 } // namespace dart |
| 7993 | 8001 |
| 7994 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8002 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |