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

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

Issue 9114008: Introduce runtime/platform directory for code shared between vm (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Windows fixes. Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_CODE_INDEX_TABLE_H_ 5 #ifndef VM_CODE_INDEX_TABLE_H_
6 #define VM_CODE_INDEX_TABLE_H_ 6 #define VM_CODE_INDEX_TABLE_H_
7 7
8 #include "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 length_ += 1; 85 length_ += 1;
86 } 86 }
87 void Resize(int new_capacity) { 87 void Resize(int new_capacity) {
88 ASSERT(new_capacity > capacity_); 88 ASSERT(new_capacity > capacity_);
89 T* new_data = reinterpret_cast<T*>(realloc(reinterpret_cast<void*>(data_), 89 T* new_data = reinterpret_cast<T*>(realloc(reinterpret_cast<void*>(data_),
90 new_capacity * sizeof(T))); 90 new_capacity * sizeof(T)));
91 ASSERT(new_data != NULL); 91 ASSERT(new_data != NULL);
92 data_ = new_data; 92 data_ = new_data;
93 capacity_ = new_capacity; 93 capacity_ = new_capacity;
94 } 94 }
95
95 private: 96 private:
96 intptr_t length_; 97 intptr_t length_;
97 intptr_t capacity_; 98 intptr_t capacity_;
98 T* data_; 99 T* data_;
99 DISALLOW_COPY_AND_ASSIGN(IndexArray); 100 DISALLOW_COPY_AND_ASSIGN(IndexArray);
100 }; 101 };
101 102
102 // PC range for a function. 103 // PC range for a function.
103 typedef struct { 104 typedef struct {
104 uword entrypoint; // Entry point for the function. 105 uword entrypoint; // Entry point for the function.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 RawArray* code_lists_; // Array of pointers to code lists (arrays). 162 RawArray* code_lists_; // Array of pointers to code lists (arrays).
162 IndexArray<PcRange>* largecode_pc_ranges_; // pc ranges of large codes. 163 IndexArray<PcRange>* largecode_pc_ranges_; // pc ranges of large codes.
163 RawArray* largecode_list_; // Array of pointer to large code objects. 164 RawArray* largecode_list_; // Array of pointer to large code objects.
164 165
165 DISALLOW_COPY_AND_ASSIGN(CodeIndexTable); 166 DISALLOW_COPY_AND_ASSIGN(CodeIndexTable);
166 }; 167 };
167 168
168 } // namespace dart 169 } // namespace dart
169 170
170 #endif // VM_CODE_INDEX_TABLE_H_ 171 #endif // VM_CODE_INDEX_TABLE_H_
OLDNEW
« runtime/platform/globals.h ('K') | « runtime/vm/assembler.h ('k') | runtime/vm/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698