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

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

Issue 187503002: 1. Restructure reusable handles to make individual Scopes for each handle type (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/longjump.cc ('k') | runtime/vm/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_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 17 matching lines...) Expand all
28 #undef DEFINE_FORWARD_DECLARATION 28 #undef DEFINE_FORWARD_DECLARATION
29 class Api; 29 class Api;
30 class ArgumentsDescriptor; 30 class ArgumentsDescriptor;
31 class Assembler; 31 class Assembler;
32 class Closure; 32 class Closure;
33 class Code; 33 class Code;
34 class DisassemblyFormatter; 34 class DisassemblyFormatter;
35 class DeoptInstr; 35 class DeoptInstr;
36 class FinalizablePersistentHandle; 36 class FinalizablePersistentHandle;
37 class LocalScope; 37 class LocalScope;
38 class ReusableHandleScope; 38
39 class ReusableObjectHandleScope; 39 #define REUSABLE_FORWARD_DECLARATION(name) \
40 class Reusable##name##HandleScope;
41 REUSABLE_HANDLE_LIST(REUSABLE_FORWARD_DECLARATION)
42 #undef REUSABLE_FORWARD_DECLARATION
43
40 class Symbols; 44 class Symbols;
41 45
42 #if defined(DEBUG) 46 #if defined(DEBUG)
43 #define CHECK_HANDLE() CheckHandle(); 47 #define CHECK_HANDLE() CheckHandle();
44 #else 48 #else
45 #define CHECK_HANDLE() 49 #define CHECK_HANDLE()
46 #endif 50 #endif
47 51
48 #define BASE_OBJECT_IMPLEMENTATION(object, super) \ 52 #define BASE_OBJECT_IMPLEMENTATION(object, super) \
49 public: /* NOLINT */ \ 53 public: /* NOLINT */ \
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 636
633 friend void ClassTable::Register(const Class& cls); 637 friend void ClassTable::Register(const Class& cls);
634 friend void RawObject::Validate(Isolate* isolate) const; 638 friend void RawObject::Validate(Isolate* isolate) const;
635 friend class Closure; 639 friend class Closure;
636 friend class SnapshotReader; 640 friend class SnapshotReader;
637 friend class OneByteString; 641 friend class OneByteString;
638 friend class TwoByteString; 642 friend class TwoByteString;
639 friend class ExternalOneByteString; 643 friend class ExternalOneByteString;
640 friend class ExternalTwoByteString; 644 friend class ExternalTwoByteString;
641 friend class Isolate; 645 friend class Isolate;
642 friend class ReusableHandleScope; 646 #define REUSABLE_FRIEND_DECLARATION(name) \
643 friend class ReusableObjectHandleScope; 647 friend class Reusable##name##HandleScope;
648 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION)
649 #undef REUSABLE_FRIEND_DECLARATION
644 650
645 DISALLOW_ALLOCATION(); 651 DISALLOW_ALLOCATION();
646 DISALLOW_COPY_AND_ASSIGN(Object); 652 DISALLOW_COPY_AND_ASSIGN(Object);
647 }; 653 };
648 654
649 655
650 class Class : public Object { 656 class Class : public Object {
651 public: 657 public:
652 intptr_t instance_size() const { 658 intptr_t instance_size() const {
653 ASSERT(is_finalized() || is_prefinalized()); 659 ASSERT(is_finalized() || is_prefinalized());
(...skipping 6026 matching lines...) Expand 10 before | Expand all | Expand 10 after
6680 6686
6681 6687
6682 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6688 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6683 intptr_t index) { 6689 intptr_t index) {
6684 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6690 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6685 } 6691 }
6686 6692
6687 } // namespace dart 6693 } // namespace dart
6688 6694
6689 #endif // VM_OBJECT_H_ 6695 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/longjump.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698