| 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 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 Representation representation_; | 1902 Representation representation_; |
| 1903 | 1903 |
| 1904 BitVector* reaching_defs_; | 1904 BitVector* reaching_defs_; |
| 1905 | 1905 |
| 1906 DISALLOW_COPY_AND_ASSIGN(PhiInstr); | 1906 DISALLOW_COPY_AND_ASSIGN(PhiInstr); |
| 1907 }; | 1907 }; |
| 1908 | 1908 |
| 1909 | 1909 |
| 1910 class ParameterInstr : public Definition { | 1910 class ParameterInstr : public Definition { |
| 1911 public: | 1911 public: |
| 1912 ParameterInstr(intptr_t index, BlockEntryInstr* block) | 1912 ParameterInstr(intptr_t index, |
| 1913 : index_(index), block_(block) { } | 1913 BlockEntryInstr* block, |
| 1914 Register base_reg = FPREG) |
| 1915 : index_(index), base_reg_(base_reg), block_(block) { } |
| 1914 | 1916 |
| 1915 DECLARE_INSTRUCTION(Parameter) | 1917 DECLARE_INSTRUCTION(Parameter) |
| 1916 | 1918 |
| 1917 intptr_t index() const { return index_; } | 1919 intptr_t index() const { return index_; } |
| 1920 Register base_reg() const { return base_reg_; } |
| 1918 | 1921 |
| 1919 // Get the block entry for that instruction. | 1922 // Get the block entry for that instruction. |
| 1920 virtual BlockEntryInstr* GetBlock() const { return block_; } | 1923 virtual BlockEntryInstr* GetBlock() const { return block_; } |
| 1921 | 1924 |
| 1922 virtual intptr_t ArgumentCount() const { return 0; } | 1925 virtual intptr_t ArgumentCount() const { return 0; } |
| 1923 | 1926 |
| 1924 intptr_t InputCount() const { return 0; } | 1927 intptr_t InputCount() const { return 0; } |
| 1925 Value* InputAt(intptr_t i) const { | 1928 Value* InputAt(intptr_t i) const { |
| 1926 UNREACHABLE(); | 1929 UNREACHABLE(); |
| 1927 return NULL; | 1930 return NULL; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1940 virtual void PrintOperandsTo(BufferFormatter* f) const; | 1943 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 1941 | 1944 |
| 1942 virtual CompileType ComputeType() const; | 1945 virtual CompileType ComputeType() const; |
| 1943 | 1946 |
| 1944 virtual bool MayThrow() const { return false; } | 1947 virtual bool MayThrow() const { return false; } |
| 1945 | 1948 |
| 1946 private: | 1949 private: |
| 1947 virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); } | 1950 virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); } |
| 1948 | 1951 |
| 1949 const intptr_t index_; | 1952 const intptr_t index_; |
| 1953 const Register base_reg_; |
| 1950 BlockEntryInstr* block_; | 1954 BlockEntryInstr* block_; |
| 1951 | 1955 |
| 1952 DISALLOW_COPY_AND_ASSIGN(ParameterInstr); | 1956 DISALLOW_COPY_AND_ASSIGN(ParameterInstr); |
| 1953 }; | 1957 }; |
| 1954 | 1958 |
| 1955 | 1959 |
| 1956 class PushArgumentInstr : public TemplateDefinition<1> { | 1960 class PushArgumentInstr : public TemplateDefinition<1> { |
| 1957 public: | 1961 public: |
| 1958 explicit PushArgumentInstr(Value* value) { | 1962 explicit PushArgumentInstr(Value* value) { |
| 1959 SetInputAt(0, value); | 1963 SetInputAt(0, value); |
| (...skipping 5708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7668 const intptr_t token_pos_; | 7672 const intptr_t token_pos_; |
| 7669 | 7673 |
| 7670 DISALLOW_COPY_AND_ASSIGN(CheckClassInstr); | 7674 DISALLOW_COPY_AND_ASSIGN(CheckClassInstr); |
| 7671 }; | 7675 }; |
| 7672 | 7676 |
| 7673 | 7677 |
| 7674 class CheckSmiInstr : public TemplateInstruction<1> { | 7678 class CheckSmiInstr : public TemplateInstruction<1> { |
| 7675 public: | 7679 public: |
| 7676 CheckSmiInstr(Value* value, intptr_t original_deopt_id, intptr_t token_pos) | 7680 CheckSmiInstr(Value* value, intptr_t original_deopt_id, intptr_t token_pos) |
| 7677 : token_pos_(token_pos) { | 7681 : token_pos_(token_pos) { |
| 7678 ASSERT(original_deopt_id != Isolate::kNoDeoptId); | |
| 7679 SetInputAt(0, value); | 7682 SetInputAt(0, value); |
| 7680 deopt_id_ = original_deopt_id; | 7683 deopt_id_ = original_deopt_id; |
| 7681 } | 7684 } |
| 7682 | 7685 |
| 7683 Value* value() const { return inputs_[0]; } | 7686 Value* value() const { return inputs_[0]; } |
| 7684 virtual intptr_t token_pos() const { return token_pos_; } | 7687 virtual intptr_t token_pos() const { return token_pos_; } |
| 7685 | 7688 |
| 7686 DECLARE_INSTRUCTION(CheckSmi) | 7689 DECLARE_INSTRUCTION(CheckSmi) |
| 7687 | 7690 |
| 7688 virtual intptr_t ArgumentCount() const { return 0; } | 7691 virtual intptr_t ArgumentCount() const { return 0; } |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8399 Isolate* isolate, bool opt) const { \ | 8402 Isolate* isolate, bool opt) const { \ |
| 8400 UNIMPLEMENTED(); \ | 8403 UNIMPLEMENTED(); \ |
| 8401 return NULL; \ | 8404 return NULL; \ |
| 8402 } \ | 8405 } \ |
| 8403 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8406 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8404 | 8407 |
| 8405 | 8408 |
| 8406 } // namespace dart | 8409 } // namespace dart |
| 8407 | 8410 |
| 8408 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8411 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |