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

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

Issue 2490363002: Clean up encoding of size and single entry flag in Instructions. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « runtime/vm/precompiler.h ('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 RUNTIME_VM_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 Entry* first_entry() { return &ptr()->data()[0]; } 1155 Entry* first_entry() { return &ptr()->data()[0]; }
1156 1156
1157 friend class Object; 1157 friend class Object;
1158 }; 1158 };
1159 1159
1160 1160
1161 class RawInstructions : public RawObject { 1161 class RawInstructions : public RawObject {
1162 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); 1162 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions);
1163 1163
1164 int32_t size_; 1164 // Instructions size in bytes and flags.
1165 // Currently, only flag indicates 1 or 2 entry points.
1166 uint32_t size_and_flags_;
1165 1167
1166 // Variable length data follows here. 1168 // Variable length data follows here.
1167 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } 1169 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
1168 1170
1169 // Private helper function used while visiting stack frames. The 1171 // Private helper function used while visiting stack frames. The
1170 // code which iterates over dart frames is also called during GC and 1172 // code which iterates over dart frames is also called during GC and
1171 // is not allowed to create handles. 1173 // is not allowed to create handles.
1172 static bool ContainsPC(RawInstructions* raw_instr, uword pc); 1174 static bool ContainsPC(RawInstructions* raw_instr, uword pc);
1173 1175
1174 friend class RawCode; 1176 friend class RawCode;
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2376 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2375 kTypedDataInt8ArrayViewCid + 15); 2377 kTypedDataInt8ArrayViewCid + 15);
2376 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2378 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2377 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2379 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2378 return (kNullCid - kTypedDataInt8ArrayCid); 2380 return (kNullCid - kTypedDataInt8ArrayCid);
2379 } 2381 }
2380 2382
2381 } // namespace dart 2383 } // namespace dart
2382 2384
2383 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2385 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698