OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "platform/json.h" | 5 #include "platform/json.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "platform/globals.h" |
8 #include "platform/utils.h" | 9 #include "platform/utils.h" |
9 #include "vm/os.h" | 10 #include "vm/os.h" |
10 | 11 |
11 namespace dart { | 12 namespace dart { |
12 | 13 |
13 | 14 |
14 JSONScanner::JSONScanner(const char* json_text) { | 15 JSONScanner::JSONScanner(const char* json_text) { |
15 SetText(json_text); | 16 SetText(json_text); |
16 } | 17 } |
17 | 18 |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 385 |
385 void TextBuffer::GrowBuffer(intptr_t len) { | 386 void TextBuffer::GrowBuffer(intptr_t len) { |
386 intptr_t new_size = buf_size_ + len; | 387 intptr_t new_size = buf_size_ + len; |
387 char* new_buf = reinterpret_cast<char*>(realloc(buf_, new_size)); | 388 char* new_buf = reinterpret_cast<char*>(realloc(buf_, new_size)); |
388 ASSERT(new_buf != NULL); | 389 ASSERT(new_buf != NULL); |
389 buf_ = new_buf; | 390 buf_ = new_buf; |
390 buf_size_ = new_size; | 391 buf_size_ = new_size; |
391 } | 392 } |
392 | 393 |
393 } // namespace dart | 394 } // namespace dart |
OLD | NEW |