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

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

Issue 575663002: Eliminate 99% of allocated ExceptionHandler objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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) 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_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 intptr_t handler_pc; // PC value of handler. 1131 intptr_t handler_pc; // PC value of handler.
1132 int16_t outer_try_index; // Try block index of enclosing try block. 1132 int16_t outer_try_index; // Try block index of enclosing try block.
1133 int8_t needs_stacktrace; // True if a stacktrace is needed. 1133 int8_t needs_stacktrace; // True if a stacktrace is needed.
1134 int8_t has_catch_all; // Catches all exceptions. 1134 int8_t has_catch_all; // Catches all exceptions.
1135 }; 1135 };
1136 1136
1137 private: 1137 private:
1138 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); 1138 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers);
1139 1139
1140 // Number of exception handler entries. 1140 // Number of exception handler entries.
1141 int32_t length_; 1141 int32_t num_entries_;
1142 1142
1143 // Array with [length_] entries. Each entry is an array of all handled 1143 // Array with [num_entries_] entries. Each entry is an array of all handled
1144 // exception types. 1144 // exception types.
1145 RawArray* handled_types_data_; 1145 RawArray* handled_types_data_;
1146 1146
1147 // Exception handler info of length [length_]. 1147 // Exception handler info of length [num_entries_].
1148 HandlerInfo* data() { OPEN_ARRAY_START(HandlerInfo, intptr_t); } 1148 HandlerInfo* data() { OPEN_ARRAY_START(HandlerInfo, intptr_t); }
1149
1150 friend class Object;
1149 }; 1151 };
1150 1152
1151 1153
1152 // Contains an array of deoptimization commands, e.g., move a specific register 1154 // Contains an array of deoptimization commands, e.g., move a specific register
1153 // into a specific slot of unoptimized frame. 1155 // into a specific slot of unoptimized frame.
1154 class RawDeoptInfo : public RawObject { 1156 class RawDeoptInfo : public RawObject {
1155 RAW_HEAP_OBJECT_IMPLEMENTATION(DeoptInfo); 1157 RAW_HEAP_OBJECT_IMPLEMENTATION(DeoptInfo);
1156 1158
1157 RawSmi* length_; // Number of deoptimization commands 1159 RawSmi* length_; // Number of deoptimization commands
1158 1160
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2054 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2053 kTypedDataInt8ArrayViewCid + 15); 2055 kTypedDataInt8ArrayViewCid + 15);
2054 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2056 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2055 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2057 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2056 return (kNullCid - kTypedDataInt8ArrayCid); 2058 return (kNullCid - kTypedDataInt8ArrayCid);
2057 } 2059 }
2058 2060
2059 } // namespace dart 2061 } // namespace dart
2060 2062
2061 #endif // VM_RAW_OBJECT_H_ 2063 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698