| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 bool Is(Kind kind) const { return kind_ == kind; } | 76 bool Is(Kind kind) const { return kind_ == kind; } |
| 77 | 77 |
| 78 bool IsKnown() const { return !Is(UNKNOWN); } | 78 bool IsKnown() const { return !Is(UNKNOWN); } |
| 79 bool IsUnknown() const { return Is(UNKNOWN); } | 79 bool IsUnknown() const { return Is(UNKNOWN); } |
| 80 bool IsLikelySmi() const { return Is(LIKELY_SMI); } | 80 bool IsLikelySmi() const { return Is(LIKELY_SMI); } |
| 81 | 81 |
| 82 void CopyFrom(StaticType* other) { | 82 void CopyFrom(StaticType* other) { |
| 83 kind_ = other->kind_; | 83 kind_ = other->kind_; |
| 84 } | 84 } |
| 85 | 85 |
| 86 static char* Type2String(StaticType* type); | 86 static const char* Type2String(StaticType* type); |
| 87 | 87 |
| 88 // LIKELY_SMI accessors | 88 // LIKELY_SMI accessors |
| 89 void SetAsLikelySmi() { | 89 void SetAsLikelySmi() { |
| 90 kind_ = LIKELY_SMI; | 90 kind_ = LIKELY_SMI; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void SetAsLikelySmiIfUnknown() { | 93 void SetAsLikelySmiIfUnknown() { |
| 94 if (IsUnknown()) { | 94 if (IsUnknown()) { |
| 95 SetAsLikelySmi(); | 95 SetAsLikelySmi(); |
| 96 } | 96 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 friend class VariableProxy; | 183 friend class VariableProxy; |
| 184 friend class Scope; | 184 friend class Scope; |
| 185 friend class LocalsMap; | 185 friend class LocalsMap; |
| 186 friend class AstBuildingParser; | 186 friend class AstBuildingParser; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 | 189 |
| 190 } } // namespace v8::internal | 190 } } // namespace v8::internal |
| 191 | 191 |
| 192 #endif // V8_VARIABLES_H_ | 192 #endif // V8_VARIABLES_H_ |
| OLD | NEW |