| 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_SCANNER_CHARACTER_STREAMS_H_ | 5 #ifndef V8_PARSING_SCANNER_CHARACTER_STREAMS_H_ |
| 6 #define V8_PARSING_SCANNER_CHARACTER_STREAMS_H_ | 6 #define V8_PARSING_SCANNER_CHARACTER_STREAMS_H_ |
| 7 | 7 |
| 8 #include "include/v8.h" // for v8::ScriptCompiler | 8 #include "include/v8.h" // for v8::ScriptCompiler |
| 9 #include "src/handles.h" | 9 #include "src/handles.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 class Utf16CharacterStream; | 14 class Utf16CharacterStream; |
| 15 class RuntimeCallStats; |
| 15 | 16 |
| 16 class ScannerStream { | 17 class ScannerStream { |
| 17 public: | 18 public: |
| 18 static Utf16CharacterStream* For(Handle<String> data); | 19 static Utf16CharacterStream* For(Handle<String> data); |
| 19 static Utf16CharacterStream* For(Handle<String> data, int start_pos, | 20 static Utf16CharacterStream* For(Handle<String> data, int start_pos, |
| 20 int end_pos); | 21 int end_pos); |
| 21 static Utf16CharacterStream* For( | 22 static Utf16CharacterStream* For( |
| 22 ScriptCompiler::ExternalSourceStream* source_stream, | 23 ScriptCompiler::ExternalSourceStream* source_stream, |
| 23 ScriptCompiler::StreamedSource::Encoding encoding); | 24 ScriptCompiler::StreamedSource::Encoding encoding, |
| 25 RuntimeCallStats* stats); |
| 24 | 26 |
| 25 // For testing: | 27 // For testing: |
| 26 static std::unique_ptr<Utf16CharacterStream> ForTesting(const char* data); | 28 static std::unique_ptr<Utf16CharacterStream> ForTesting(const char* data); |
| 27 static std::unique_ptr<Utf16CharacterStream> ForTesting(const char* data, | 29 static std::unique_ptr<Utf16CharacterStream> ForTesting(const char* data, |
| 28 size_t length); | 30 size_t length); |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 } // namespace internal | 33 } // namespace internal |
| 32 } // namespace v8 | 34 } // namespace v8 |
| 33 | 35 |
| 34 #endif // V8_PARSING_SCANNER_CHARACTER_STREAMS_H_ | 36 #endif // V8_PARSING_SCANNER_CHARACTER_STREAMS_H_ |
| OLD | NEW |