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 #include "src/parsing/scanner-character-streams.h" | 5 #include "src/parsing/scanner-character-streams.h" |
6 | 6 |
7 #include "include/v8.h" | 7 #include "include/v8.h" |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/list-inl.h" // TODO(mstarzinger): Temporary cycle breaker! | |
11 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
12 #include "src/unicode-inl.h" | 11 #include "src/unicode-inl.h" |
13 | 12 |
14 namespace v8 { | 13 namespace v8 { |
15 namespace internal { | 14 namespace internal { |
16 | 15 |
17 namespace { | 16 namespace { |
18 | 17 |
19 size_t CopyUtf8CharsToUtf16Chars(uint16_t* dest, size_t length, const byte* src, | 18 size_t CopyUtf8CharsToUtf16Chars(uint16_t* dest, size_t length, const byte* src, |
20 size_t* src_pos, size_t src_length) { | 19 size_t* src_pos, size_t src_length) { |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 if (from_pos >= length_) return 0; | 502 if (from_pos >= length_) return 0; |
504 size_t length = Min(kBufferSize, length_ - from_pos); | 503 size_t length = Min(kBufferSize, length_ - from_pos); |
505 for (size_t i = 0; i < length; ++i) { | 504 for (size_t i = 0; i < length; ++i) { |
506 buffer_[i] = static_cast<uc16>(raw_data_[from_pos + i]); | 505 buffer_[i] = static_cast<uc16>(raw_data_[from_pos + i]); |
507 } | 506 } |
508 return length; | 507 return length; |
509 } | 508 } |
510 | 509 |
511 } // namespace internal | 510 } // namespace internal |
512 } // namespace v8 | 511 } // namespace v8 |
OLD | NEW |