| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 int symbol_count() { | 125 int symbol_count() { |
| 126 return (store_.length() > kHeaderSize) ? store_[kSymbolCountOffset] : 0; | 126 return (store_.length() > kHeaderSize) ? store_[kSymbolCountOffset] : 0; |
| 127 } | 127 } |
| 128 // The following functions should only be called if SanityCheck has | 128 // The following functions should only be called if SanityCheck has |
| 129 // returned true. | 129 // returned true. |
| 130 bool has_error() { return store_[kHasErrorOffset]; } | 130 bool has_error() { return store_[kHasErrorOffset]; } |
| 131 unsigned magic() { return store_[kMagicOffset]; } | 131 unsigned magic() { return store_[kMagicOffset]; } |
| 132 unsigned version() { return store_[kVersionOffset]; } | 132 unsigned version() { return store_[kVersionOffset]; } |
| 133 | 133 |
| 134 static const unsigned kMagicNumber = 0xBadDead; | 134 static const unsigned kMagicNumber = 0xBadDead; |
| 135 static const unsigned kCurrentVersion = 4; | 135 static const unsigned kCurrentVersion = 5; |
| 136 | 136 |
| 137 static const int kMagicOffset = 0; | 137 static const int kMagicOffset = 0; |
| 138 static const int kVersionOffset = 1; | 138 static const int kVersionOffset = 1; |
| 139 static const int kHasErrorOffset = 2; | 139 static const int kHasErrorOffset = 2; |
| 140 static const int kFunctionsSizeOffset = 3; | 140 static const int kFunctionsSizeOffset = 3; |
| 141 static const int kSymbolCountOffset = 4; | 141 static const int kSymbolCountOffset = 4; |
| 142 static const int kSizeOffset = 5; | 142 static const int kSizeOffset = 5; |
| 143 static const int kHeaderSize = 6; | 143 static const int kHeaderSize = 6; |
| 144 | 144 |
| 145 // If encoding a message, the following positions are fixed. | 145 // If encoding a message, the following positions are fixed. |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 // return a null handle. Primarily for readability. | 850 // return a null handle. Primarily for readability. |
| 851 Handle<Object> ReportUnexpectedToken() { return Handle<Object>::null(); } | 851 Handle<Object> ReportUnexpectedToken() { return Handle<Object>::null(); } |
| 852 // Converts the currently parsed literal to a JavaScript String. | 852 // Converts the currently parsed literal to a JavaScript String. |
| 853 Handle<String> GetString(); | 853 Handle<String> GetString(); |
| 854 | 854 |
| 855 Scanner scanner_; | 855 Scanner scanner_; |
| 856 }; | 856 }; |
| 857 } } // namespace v8::internal | 857 } } // namespace v8::internal |
| 858 | 858 |
| 859 #endif // V8_PARSER_H_ | 859 #endif // V8_PARSER_H_ |
| OLD | NEW |