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

Side by Side Diff: vm/code_descriptors.h

Issue 10785007: Minor changes based on the profile while running dart2js compile all. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 | « no previous file | vm/flow_graph_compiler.cc » ('j') | vm/object.h » ('J')
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_CODE_DESCRIPTORS_H_ 5 #ifndef VM_CODE_DESCRIPTORS_H_
6 #define VM_CODE_DESCRIPTORS_H_ 6 #define VM_CODE_DESCRIPTORS_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 class DescriptorList : public ZoneAllocated { 14 class DescriptorList : public ZoneAllocated {
15 public: 15 public:
16 struct PcDesc { 16 struct PcDesc {
17 intptr_t pc_offset; // PC offset value of the descriptor. 17 intptr_t pc_offset; // PC offset value of the descriptor.
18 PcDescriptors::Kind kind; // Descriptor kind (kDeopt, kOther). 18 PcDescriptors::Kind kind; // Descriptor kind (kDeopt, kOther).
19 intptr_t node_id; // AST node id. 19 intptr_t node_id; // AST node id.
20 intptr_t token_index; // Token position in source of PC. 20 intptr_t token_index; // Token position in source of PC.
21 intptr_t try_index; // Try block index of PC. 21 intptr_t try_index; // Try block index of PC.
22 }; 22 };
23 23
24 DescriptorList() : list_() { 24 explicit DescriptorList(intptr_t initial_capacity) : list_(initial_capacity) {
25 } 25 }
26 ~DescriptorList() { } 26 ~DescriptorList() { }
27 27
28 intptr_t Length() const { 28 intptr_t Length() const {
29 return list_.length(); 29 return list_.length();
30 } 30 }
31 31
32 intptr_t PcOffset(int index) const { 32 intptr_t PcOffset(int index) const {
33 return list_[index].pc_offset; 33 return list_[index].pc_offset;
34 } 34 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 private: 156 private:
157 GrowableArray<struct HandlerDesc> list_; 157 GrowableArray<struct HandlerDesc> list_;
158 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); 158 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList);
159 }; 159 };
160 160
161 } // namespace dart 161 } // namespace dart
162 162
163 #endif // VM_CODE_DESCRIPTORS_H_ 163 #endif // VM_CODE_DESCRIPTORS_H_
OLDNEW
« no previous file with comments | « no previous file | vm/flow_graph_compiler.cc » ('j') | vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698