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

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

Issue 565513002: Optimize LocalVarDescriptor objects for functions that have no local variables (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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 } 1095 }
1096 }; 1096 };
1097 1097
1098 private: 1098 private:
1099 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors); 1099 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors);
1100 RawArray* names_; // Array of [length_] variable names. 1100 RawArray* names_; // Array of [length_] variable names.
1101 int32_t length_; // Number of descriptors. 1101 int32_t length_; // Number of descriptors.
1102 1102
1103 // Variable info with [length_] entries. 1103 // Variable info with [length_] entries.
1104 VarInfo* data() { OPEN_ARRAY_START(VarInfo, int32_t); } 1104 VarInfo* data() { OPEN_ARRAY_START(VarInfo, int32_t); }
1105
1106 friend class Object;
1105 }; 1107 };
1106 1108
1107 1109
1108 class RawExceptionHandlers : public RawObject { 1110 class RawExceptionHandlers : public RawObject {
1109 public: 1111 public:
1110 // The index into the ExceptionHandlers table corresponds to 1112 // The index into the ExceptionHandlers table corresponds to
1111 // the try_index of the handler. 1113 // the try_index of the handler.
1112 struct HandlerInfo { 1114 struct HandlerInfo {
1113 intptr_t handler_pc; // PC value of handler. 1115 intptr_t handler_pc; // PC value of handler.
1114 int16_t outer_try_index; // Try block index of enclosing try block. 1116 int16_t outer_try_index; // Try block index of enclosing try block.
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2036 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2035 kTypedDataInt8ArrayViewCid + 15); 2037 kTypedDataInt8ArrayViewCid + 15);
2036 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2038 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2037 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2039 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2038 return (kNullCid - kTypedDataInt8ArrayCid); 2040 return (kNullCid - kTypedDataInt8ArrayCid);
2039 } 2041 }
2040 2042
2041 } // namespace dart 2043 } // namespace dart
2042 2044
2043 #endif // VM_RAW_OBJECT_H_ 2045 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698