OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 ASSERT(var != NULL); | 1040 ASSERT(var != NULL); |
1041 } | 1041 } |
1042 | 1042 |
1043 virtual void Accept(AstVisitor* v); | 1043 virtual void Accept(AstVisitor* v); |
1044 | 1044 |
1045 // Type testing & conversion | 1045 // Type testing & conversion |
1046 virtual Slot* AsSlot() { return this; } | 1046 virtual Slot* AsSlot() { return this; } |
1047 | 1047 |
1048 virtual bool IsLeaf() { return true; } | 1048 virtual bool IsLeaf() { return true; } |
1049 | 1049 |
| 1050 bool IsStackAllocated() { return type_ == PARAMETER || type_ == LOCAL; } |
| 1051 |
1050 // Accessors | 1052 // Accessors |
1051 Variable* var() const { return var_; } | 1053 Variable* var() const { return var_; } |
1052 Type type() const { return type_; } | 1054 Type type() const { return type_; } |
1053 int index() const { return index_; } | 1055 int index() const { return index_; } |
1054 bool is_arguments() const { return var_->is_arguments(); } | 1056 bool is_arguments() const { return var_->is_arguments(); } |
1055 | 1057 |
1056 private: | 1058 private: |
1057 Variable* var_; | 1059 Variable* var_; |
1058 Type type_; | 1060 Type type_; |
1059 int index_; | 1061 int index_; |
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 #undef DEF_VISIT | 1876 #undef DEF_VISIT |
1875 | 1877 |
1876 private: | 1878 private: |
1877 bool stack_overflow_; | 1879 bool stack_overflow_; |
1878 }; | 1880 }; |
1879 | 1881 |
1880 | 1882 |
1881 } } // namespace v8::internal | 1883 } } // namespace v8::internal |
1882 | 1884 |
1883 #endif // V8_AST_H_ | 1885 #endif // V8_AST_H_ |
OLD | NEW |