Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Side by Side Diff: runtime/vm/debuginfo.h

Issue 16378004: Revert change 23636 as it is causing issues on dartium. Will resubmit after investigating the darti… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/megamorphic_cache_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef VM_DEBUGINFO_H_ 5 #ifndef VM_DEBUGINFO_H_
6 #define VM_DEBUGINFO_H_ 6 #define VM_DEBUGINFO_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Append an element. 43 // Append an element.
44 void Add(const uint8_t value) { 44 void Add(const uint8_t value) {
45 Resize(size() + 1); 45 Resize(size() + 1);
46 data_[size() - 1] = value; 46 data_[size() - 1] = value;
47 } 47 }
48 48
49 private: 49 private:
50 void Resize(int new_size) { 50 void Resize(int new_size) {
51 if (new_size > capacity_) { 51 if (new_size > capacity_) {
52 int new_capacity = Utils::RoundUpToPowerOfTwo(new_size); 52 int new_capacity = Utils::RoundUpToPowerOfTwo(new_size);
53 uint8_t* new_data = Utils::Realloc(data_, capacity_, new_capacity); 53 uint8_t* new_data =
54 reinterpret_cast<uint8_t*>(realloc(data_, new_capacity));
54 ASSERT(new_data != NULL); 55 ASSERT(new_data != NULL);
55 data_ = new_data; 56 data_ = new_data;
56 capacity_ = new_capacity; 57 capacity_ = new_capacity;
57 } 58 }
58 size_ = new_size; 59 size_ = new_size;
59 } 60 }
60 61
61 int size_; 62 int size_;
62 int capacity_; 63 int capacity_;
63 uint8_t* data_; 64 uint8_t* data_;
(...skipping 28 matching lines...) Expand all
92 private: 93 private:
93 void* handle_; 94 void* handle_;
94 DebugInfo(); 95 DebugInfo();
95 96
96 DISALLOW_COPY_AND_ASSIGN(DebugInfo); 97 DISALLOW_COPY_AND_ASSIGN(DebugInfo);
97 }; 98 };
98 99
99 } // namespace dart 100 } // namespace dart
100 101
101 #endif // VM_DEBUGINFO_H_ 102 #endif // VM_DEBUGINFO_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/megamorphic_cache_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698