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

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

Issue 10824209: - Allow patching of top-level methods and accessors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/patch_test.dart » ('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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 kImplicitGetter, // represents an implicit getter for fields. 551 kImplicitGetter, // represents an implicit getter for fields.
552 kImplicitSetter, // represents an implicit setter for fields. 552 kImplicitSetter, // represents an implicit setter for fields.
553 kConstImplicitGetter, // represents an implicit const getter for fields. 553 kConstImplicitGetter, // represents an implicit const getter for fields.
554 }; 554 };
555 555
556 private: 556 private:
557 RAW_HEAP_OBJECT_IMPLEMENTATION(Function); 557 RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
558 558
559 enum KindTagBits { 559 enum KindTagBits {
560 kStaticBit = 1, 560 kStaticBit = 1,
561 kConstBit = 2, 561 kConstBit,
562 kOptimizableBit = 3, 562 kOptimizableBit,
563 kHasFinallyBit = 4, 563 kHasFinallyBit,
564 kNativeBit = 5, 564 kNativeBit,
565 kAbstractBit = 6, 565 kAbstractBit,
566 kExternalBit = 6, 566 kExternalBit,
567 kKindTagBit = 7, 567 kKindTagBit,
568 kKindTagSize = 4, 568 kKindTagSize = 4,
569 }; 569 };
570 class StaticBit : public BitField<bool, kStaticBit, 1> {}; 570 class StaticBit : public BitField<bool, kStaticBit, 1> {};
571 class ConstBit : public BitField<bool, kConstBit, 1> {}; 571 class ConstBit : public BitField<bool, kConstBit, 1> {};
572 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; 572 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {};
573 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; 573 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {};
574 class NativeBit : public BitField<bool, kNativeBit, 1> {}; 574 class NativeBit : public BitField<bool, kNativeBit, 1> {};
575 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; 575 class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
576 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; 576 class ExternalBit : public BitField<bool, kExternalBit, 1> {};
577 class KindBits : public BitField<Kind, kKindTagBit, kKindTagSize> {}; 577 class KindBits : public BitField<Kind, kKindTagBit, kKindTagSize> {};
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 712
713 friend class SnapshotReader; 713 friend class SnapshotReader;
714 }; 714 };
715 715
716 716
717 class RawScript : public RawObject { 717 class RawScript : public RawObject {
718 public: 718 public:
719 enum Kind { 719 enum Kind {
720 kScriptTag = 0, 720 kScriptTag = 0,
721 kLibraryTag, 721 kLibraryTag,
722 kSourceTag 722 kSourceTag,
723 kPatchTag,
723 }; 724 };
724 725
725 private: 726 private:
726 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); 727 RAW_HEAP_OBJECT_IMPLEMENTATION(Script);
727 728
728 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } 729 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); }
729 RawString* url_; 730 RawString* url_;
730 RawString* source_; 731 RawString* source_;
731 RawTokenStream* tokens_; 732 RawTokenStream* tokens_;
732 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); } 733 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); }
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 kExternalUint64Array == kByteArray + 18 && 1608 kExternalUint64Array == kByteArray + 18 &&
1608 kExternalFloat32Array == kByteArray + 19 && 1609 kExternalFloat32Array == kByteArray + 19 &&
1609 kExternalFloat64Array == kByteArray + 20 && 1610 kExternalFloat64Array == kByteArray + 20 &&
1610 kClosure == kByteArray + 21); 1611 kClosure == kByteArray + 21);
1611 return (index >= kByteArray && index <= kClosure); 1612 return (index >= kByteArray && index <= kClosure);
1612 } 1613 }
1613 1614
1614 } // namespace dart 1615 } // namespace dart
1615 1616
1616 #endif // VM_RAW_OBJECT_H_ 1617 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/patch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698