OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_PARSING_PREPARSE_DATA_H_ | 5 #ifndef V8_PARSING_PREPARSE_DATA_H_ |
6 #define V8_PARSING_PREPARSE_DATA_H_ | 6 #define V8_PARSING_PREPARSE_DATA_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/hashmap.h" | 9 #include "src/hashmap.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 bool rejected_ : 1; | 41 bool rejected_ : 1; |
42 const byte* data_; | 42 const byte* data_; |
43 int length_; | 43 int length_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(ScriptData); | 45 DISALLOW_COPY_AND_ASSIGN(ScriptData); |
46 }; | 46 }; |
47 | 47 |
48 // Abstract interface for preparse data recorder. | 48 // Abstract interface for preparse data recorder. |
49 class ParserRecorder { | 49 class ParserRecorder { |
50 public: | 50 public: |
51 ParserRecorder() { } | 51 ParserRecorder() {} |
52 virtual ~ParserRecorder() { } | 52 virtual ~ParserRecorder() {} |
53 | 53 |
54 // Logs the scope and some details of a function literal in the source. | 54 // Logs the scope and some details of a function literal in the source. |
55 virtual void LogFunction(int start, int end, int literals, int properties, | 55 virtual void LogFunction(int start, int end, int literals, int properties, |
56 LanguageMode language_mode, bool uses_super_property, | 56 LanguageMode language_mode, bool uses_super_property, |
57 bool calls_eval) = 0; | 57 bool calls_eval) = 0; |
58 | 58 |
59 // Logs an error message and marks the log as containing an error. | 59 // Logs an error message and marks the log as containing an error. |
60 // Further logging will be ignored, and ExtractData will return a vector | 60 // Further logging will be ignored, and ExtractData will return a vector |
61 // representing the error only. | 61 // representing the error only. |
62 virtual void LogMessage(int start, int end, MessageTemplate::Template message, | 62 virtual void LogMessage(int start, int end, MessageTemplate::Template message, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 #ifdef DEBUG | 203 #ifdef DEBUG |
204 int prev_start_; | 204 int prev_start_; |
205 #endif | 205 #endif |
206 }; | 206 }; |
207 | 207 |
208 | 208 |
209 } // namespace internal | 209 } // namespace internal |
210 } // namespace v8. | 210 } // namespace v8. |
211 | 211 |
212 #endif // V8_PARSING_PREPARSE_DATA_H_ | 212 #endif // V8_PARSING_PREPARSE_DATA_H_ |
OLD | NEW |