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 "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5447 return -1; | 5447 return -1; |
5448 } | 5448 } |
5449 | 5449 |
5450 void WriteIndex(intptr_t value) { | 5450 void WriteIndex(intptr_t value) { |
5451 stream_.WriteUnsigned(value + Token::kNumTokens); | 5451 stream_.WriteUnsigned(value + Token::kNumTokens); |
5452 } | 5452 } |
5453 | 5453 |
5454 static uint8_t* Reallocate(uint8_t* ptr, | 5454 static uint8_t* Reallocate(uint8_t* ptr, |
5455 intptr_t old_size, | 5455 intptr_t old_size, |
5456 intptr_t new_size) { | 5456 intptr_t new_size) { |
5457 void* new_ptr = ::realloc(reinterpret_cast<void*>(ptr), new_size); | 5457 return Utils::Realloc(ptr, old_size, new_size); |
5458 return reinterpret_cast<uint8_t*>(new_ptr); | |
5459 } | 5458 } |
5460 | 5459 |
5461 static const int kInitialTokenCount = 32; | 5460 static const int kInitialTokenCount = 32; |
5462 static const intptr_t kTableSize = 128; | 5461 static const intptr_t kTableSize = 128; |
5463 | 5462 |
5464 uint8_t* buffer_; | 5463 uint8_t* buffer_; |
5465 WriteStream stream_; | 5464 WriteStream stream_; |
5466 GrowableArray<intptr_t> ident_table_[kTableSize]; | 5465 GrowableArray<intptr_t> ident_table_[kTableSize]; |
5467 GrowableArray<intptr_t> literal_table_[kTableSize]; | 5466 GrowableArray<intptr_t> literal_table_[kTableSize]; |
5468 const GrowableObjectArray& token_objects_; | 5467 const GrowableObjectArray& token_objects_; |
(...skipping 7836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13305 space); | 13304 space); |
13306 return reinterpret_cast<RawWeakProperty*>(raw); | 13305 return reinterpret_cast<RawWeakProperty*>(raw); |
13307 } | 13306 } |
13308 | 13307 |
13309 | 13308 |
13310 const char* WeakProperty::ToCString() const { | 13309 const char* WeakProperty::ToCString() const { |
13311 return "_WeakProperty"; | 13310 return "_WeakProperty"; |
13312 } | 13311 } |
13313 | 13312 |
13314 } // namespace dart | 13313 } // namespace dart |
OLD | NEW |