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

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

Issue 1259123009: Initial tree-shaking for precompilation: only selective compilation, no removal of unused Functions… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync + more dart:io roots Created 5 years, 4 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
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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 bool is_fields_marked_nullable() const { 1275 bool is_fields_marked_nullable() const {
1276 return FieldsMarkedNullableBit::decode(raw_ptr()->state_bits_); 1276 return FieldsMarkedNullableBit::decode(raw_ptr()->state_bits_);
1277 } 1277 }
1278 void set_is_fields_marked_nullable() const; 1278 void set_is_fields_marked_nullable() const;
1279 1279
1280 bool is_cycle_free() const { 1280 bool is_cycle_free() const {
1281 return CycleFreeBit::decode(raw_ptr()->state_bits_); 1281 return CycleFreeBit::decode(raw_ptr()->state_bits_);
1282 } 1282 }
1283 void set_is_cycle_free() const; 1283 void set_is_cycle_free() const;
1284 1284
1285 bool is_allocated() const {
1286 return IsAllocatedBit::decode(raw_ptr()->state_bits_);
1287 }
1288 void set_is_allocated() const;
1289
1285 uint16_t num_native_fields() const { 1290 uint16_t num_native_fields() const {
1286 return raw_ptr()->num_native_fields_; 1291 return raw_ptr()->num_native_fields_;
1287 } 1292 }
1288 void set_num_native_fields(uint16_t value) const { 1293 void set_num_native_fields(uint16_t value) const {
1289 StoreNonPointer(&raw_ptr()->num_native_fields_, value); 1294 StoreNonPointer(&raw_ptr()->num_native_fields_, value);
1290 } 1295 }
1291 1296
1292 RawCode* allocation_stub() const { 1297 RawCode* allocation_stub() const {
1293 return raw_ptr()->allocation_stub_; 1298 return raw_ptr()->allocation_stub_;
1294 } 1299 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 kAbstractBit = kClassFinalizedPos + kClassFinalizedSize, // = 5 1397 kAbstractBit = kClassFinalizedPos + kClassFinalizedSize, // = 5
1393 kPatchBit = 6, 1398 kPatchBit = 6,
1394 kSynthesizedClassBit = 7, 1399 kSynthesizedClassBit = 7,
1395 kMarkedForParsingBit = 8, 1400 kMarkedForParsingBit = 8,
1396 kMixinAppAliasBit = 9, 1401 kMixinAppAliasBit = 9,
1397 kMixinTypeAppliedBit = 10, 1402 kMixinTypeAppliedBit = 10,
1398 kFieldsMarkedNullableBit = 11, 1403 kFieldsMarkedNullableBit = 11,
1399 kCycleFreeBit = 12, 1404 kCycleFreeBit = 12,
1400 kEnumBit = 13, 1405 kEnumBit = 13,
1401 kTraceAllocationBit = 14, 1406 kTraceAllocationBit = 14,
1407 kIsAllocatedBit = 15,
1402 }; 1408 };
1403 class ConstBit : public BitField<bool, kConstBit, 1> {}; 1409 class ConstBit : public BitField<bool, kConstBit, 1> {};
1404 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {}; 1410 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
1405 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {}; 1411 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {};
1406 class ClassFinalizedBits : public BitField<RawClass::ClassFinalizedState, 1412 class ClassFinalizedBits : public BitField<RawClass::ClassFinalizedState,
1407 kClassFinalizedPos, kClassFinalizedSize> {}; // NOLINT 1413 kClassFinalizedPos, kClassFinalizedSize> {}; // NOLINT
1408 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; 1414 class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
1409 class PatchBit : public BitField<bool, kPatchBit, 1> {}; 1415 class PatchBit : public BitField<bool, kPatchBit, 1> {};
1410 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {}; 1416 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {};
1411 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {}; 1417 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {};
1412 class MixinAppAliasBit : public BitField<bool, kMixinAppAliasBit, 1> {}; 1418 class MixinAppAliasBit : public BitField<bool, kMixinAppAliasBit, 1> {};
1413 class MixinTypeAppliedBit : public BitField<bool, kMixinTypeAppliedBit, 1> {}; 1419 class MixinTypeAppliedBit : public BitField<bool, kMixinTypeAppliedBit, 1> {};
1414 class FieldsMarkedNullableBit : public BitField<bool, 1420 class FieldsMarkedNullableBit : public BitField<bool,
1415 kFieldsMarkedNullableBit, 1> {}; // NOLINT 1421 kFieldsMarkedNullableBit, 1> {}; // NOLINT
1416 class CycleFreeBit : public BitField<bool, kCycleFreeBit, 1> {}; 1422 class CycleFreeBit : public BitField<bool, kCycleFreeBit, 1> {};
1417 class EnumBit : public BitField<bool, kEnumBit, 1> {}; 1423 class EnumBit : public BitField<bool, kEnumBit, 1> {};
1418 class TraceAllocationBit : public BitField<bool, kTraceAllocationBit, 1> {}; 1424 class TraceAllocationBit : public BitField<bool, kTraceAllocationBit, 1> {};
1425 class IsAllocatedBit : public BitField<bool, kIsAllocatedBit, 1> {};
1419 1426
1420 void set_name(const String& value) const; 1427 void set_name(const String& value) const;
1421 void set_pretty_name(const String& value) const; 1428 void set_pretty_name(const String& value) const;
1422 void set_user_name(const String& value) const; 1429 void set_user_name(const String& value) const;
1423 RawString* GeneratePrettyName() const; 1430 RawString* GeneratePrettyName() const;
1424 RawString* GenerateUserVisibleName() const; 1431 RawString* GenerateUserVisibleName() const;
1425 void set_signature_function(const Function& value) const; 1432 void set_signature_function(const Function& value) const;
1426 void set_signature_type(const AbstractType& value) const; 1433 void set_signature_type(const AbstractType& value) const;
1427 void set_state_bits(intptr_t bits) const; 1434 void set_state_bits(intptr_t bits) const;
1428 1435
(...skipping 6593 matching lines...) Expand 10 before | Expand all | Expand 10 after
8022 8029
8023 8030
8024 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8031 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8025 intptr_t index) { 8032 intptr_t index) {
8026 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8033 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8027 } 8034 }
8028 8035
8029 } // namespace dart 8036 } // namespace dart
8030 8037
8031 #endif // VM_OBJECT_H_ 8038 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/precompiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698