OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/base/compiler-specific.h" | 10 #include "src/base/compiler-specific.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 if (pd->IsSane()) return pd; | 95 if (pd->IsSane()) return pd; |
96 cached_data->Reject(); | 96 cached_data->Reject(); |
97 delete pd; | 97 delete pd; |
98 return NULL; | 98 return NULL; |
99 } | 99 } |
100 | 100 |
101 void Initialize(); | 101 void Initialize(); |
102 FunctionEntry GetFunctionEntry(int start); | 102 FunctionEntry GetFunctionEntry(int start); |
103 int FunctionCount(); | 103 int FunctionCount(); |
104 | 104 |
105 bool HasError(); | |
106 | |
107 unsigned* Data() { // Writable data as unsigned int array. | 105 unsigned* Data() { // Writable data as unsigned int array. |
108 return reinterpret_cast<unsigned*>(const_cast<byte*>(script_data_->data())); | 106 return reinterpret_cast<unsigned*>(const_cast<byte*>(script_data_->data())); |
109 } | 107 } |
110 | 108 |
111 void Reject() { script_data_->Reject(); } | 109 void Reject() { script_data_->Reject(); } |
112 | 110 |
113 bool rejected() const { return script_data_->rejected(); } | 111 bool rejected() const { return script_data_->rejected(); } |
114 | 112 |
115 private: | 113 private: |
116 explicit ParseData(ScriptData* script_data) : script_data_(script_data) {} | 114 explicit ParseData(ScriptData* script_data) : script_data_(script_data) {} |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 | 1191 |
1194 private: | 1192 private: |
1195 ParserTarget** variable_; | 1193 ParserTarget** variable_; |
1196 ParserTarget* previous_; | 1194 ParserTarget* previous_; |
1197 }; | 1195 }; |
1198 | 1196 |
1199 } // namespace internal | 1197 } // namespace internal |
1200 } // namespace v8 | 1198 } // namespace v8 |
1201 | 1199 |
1202 #endif // V8_PARSING_PARSER_H_ | 1200 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |