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

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

Issue 23512004: Revert "Compress memory usage. Imprive speed of finding exception handle..." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.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_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/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 RawArray* object_table_; 830 RawArray* object_table_;
831 RawArray* static_calls_target_table_; // (code-offset, function, code). 831 RawArray* static_calls_target_table_; // (code-offset, function, code).
832 RawArray* stackmaps_; 832 RawArray* stackmaps_;
833 RawLocalVarDescriptors* var_descriptors_; 833 RawLocalVarDescriptors* var_descriptors_;
834 RawArray* comments_; 834 RawArray* comments_;
835 RawObject** to() { 835 RawObject** to() {
836 return reinterpret_cast<RawObject**>(&ptr()->comments_); 836 return reinterpret_cast<RawObject**>(&ptr()->comments_);
837 } 837 }
838 838
839 intptr_t pointer_offsets_length_; 839 intptr_t pointer_offsets_length_;
840 // Alive: If true, the embedded object pointers will be visited during GC. 840 // These fields cannot be boolean because of alignment issues on x64
841 // This field cannot be shorter because of alignment issues on x64
842 // architectures. 841 // architectures.
843 intptr_t state_bits_; // state, is_optimized, is_alive. 842 intptr_t is_optimized_;
843 // If true, the embedded object pointers will be visited during GC.
844 intptr_t is_alive_;
844 845
845 // Variable length data follows here. 846 // Variable length data follows here.
846 int32_t data_[0]; 847 int32_t data_[0];
847 848
848 friend class StackFrame; 849 friend class StackFrame;
849 }; 850 };
850 851
851 852
852 class RawInstructions : public RawObject { 853 class RawInstructions : public RawObject {
853 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); 854 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 936
936 VarInfo data_[0]; // Variable info with [length_] entries. 937 VarInfo data_[0]; // Variable info with [length_] entries.
937 }; 938 };
938 939
939 940
940 class RawExceptionHandlers : public RawObject { 941 class RawExceptionHandlers : public RawObject {
941 public: 942 public:
942 // The index into the ExceptionHandlers table corresponds to 943 // The index into the ExceptionHandlers table corresponds to
943 // the try_index of the handler. 944 // the try_index of the handler.
944 struct HandlerInfo { 945 struct HandlerInfo {
946 intptr_t outer_try_index; // Try block index of enclosing try block.
945 intptr_t handler_pc; // PC value of handler. 947 intptr_t handler_pc; // PC value of handler.
946 int16_t outer_try_index; // Try block index of enclosing try block. 948 bool needs_stacktrace; // True if a stacktrace is needed.
947 int16_t needs_stacktrace; // True if a stacktrace is needed.
948 }; 949 };
949 private: 950 private:
950 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); 951 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers);
951 952
952 // Number of exception handler entries. 953 // Number of exception handler entries.
953 intptr_t length_; 954 intptr_t length_;
954 955
955 // Array with [length_] entries. Each entry is an array of all handled 956 // Array with [length_] entries. Each entry is an array of all handled
956 // exception types. 957 // exception types.
957 RawArray* handled_types_data_; 958 RawArray* handled_types_data_;
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 // Make sure this is updated when new TypedData types are added. 1712 // Make sure this is updated when new TypedData types are added.
1712 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1713 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1714 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1715 return (kNullCid - kTypedDataInt8ArrayCid); 1716 return (kNullCid - kTypedDataInt8ArrayCid);
1716 } 1717 }
1717 1718
1718 } // namespace dart 1719 } // namespace dart
1719 1720
1720 #endif // VM_RAW_OBJECT_H_ 1721 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « 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