| 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_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
| 6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void Initialize(); | 71 void Initialize(); |
| 72 FunctionEntry GetFunctionEntry(int start); | 72 FunctionEntry GetFunctionEntry(int start); |
| 73 int FunctionCount(); | 73 int FunctionCount(); |
| 74 | 74 |
| 75 bool HasError(); | 75 bool HasError(); |
| 76 | 76 |
| 77 unsigned* Data() { // Writable data as unsigned int array. | 77 unsigned* Data() { // Writable data as unsigned int array. |
| 78 return reinterpret_cast<unsigned*>(const_cast<byte*>(script_data_->data())); | 78 return reinterpret_cast<unsigned*>(const_cast<byte*>(script_data_->data())); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void Reject() { script_data_->Reject(); } |
| 82 |
| 83 bool rejected() const { return script_data_->rejected(); } |
| 84 |
| 81 private: | 85 private: |
| 82 explicit ParseData(ScriptData* script_data) : script_data_(script_data) {} | 86 explicit ParseData(ScriptData* script_data) : script_data_(script_data) {} |
| 83 | 87 |
| 84 bool IsSane(); | 88 bool IsSane(); |
| 85 unsigned Magic(); | 89 unsigned Magic(); |
| 86 unsigned Version(); | 90 unsigned Version(); |
| 87 int FunctionsSize(); | 91 int FunctionsSize(); |
| 88 int Length() const { | 92 int Length() const { |
| 89 // Script data length is already checked to be a multiple of unsigned size. | 93 // Script data length is already checked to be a multiple of unsigned size. |
| 90 return script_data_->length() / sizeof(unsigned); | 94 return script_data_->length() / sizeof(unsigned); |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 } | 1000 } |
| 997 | 1001 |
| 998 | 1002 |
| 999 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 1003 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
| 1000 int start, Expression* tag) { | 1004 int start, Expression* tag) { |
| 1001 return parser_->CloseTemplateLiteral(state, start, tag); | 1005 return parser_->CloseTemplateLiteral(state, start, tag); |
| 1002 } | 1006 } |
| 1003 } } // namespace v8::internal | 1007 } } // namespace v8::internal |
| 1004 | 1008 |
| 1005 #endif // V8_PARSER_H_ | 1009 #endif // V8_PARSER_H_ |
| OLD | NEW |