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

Side by Side Diff: vm/dart_api_state.h

Issue 9939014: Temp hax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 | « vm/dart_api_impl_test.cc ('k') | vm/native_arguments.h » ('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_DART_API_STATE_H_ 5 #ifndef VM_DART_API_STATE_H_
6 #define VM_DART_API_STATE_H_ 6 #define VM_DART_API_STATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/thread.h" 10 #include "platform/thread.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 57 };
58 58
59 59
60 // Implementation of local handles which are handed out from every 60 // Implementation of local handles which are handed out from every
61 // dart API call, these handles are valid only in the present scope 61 // dart API call, these handles are valid only in the present scope
62 // and are destroyed when a Dart_ExitScope() is called. 62 // and are destroyed when a Dart_ExitScope() is called.
63 class LocalHandle { 63 class LocalHandle {
64 public: 64 public:
65 // Accessors. 65 // Accessors.
66 RawObject* raw() const { return raw_; } 66 RawObject* raw() const { return raw_; }
67 void set_raw(RawObject* object) { raw_ = object; }
67 void set_raw(const Object& object) { raw_ = object.raw(); } 68 void set_raw(const Object& object) { raw_ = object.raw(); }
68 static intptr_t raw_offset() { return OFFSET_OF(LocalHandle, raw_); } 69 static intptr_t raw_offset() { return OFFSET_OF(LocalHandle, raw_); }
69 70
70 private: 71 private:
71 LocalHandle() { } 72 LocalHandle() { }
72 ~LocalHandle() { } 73 ~LocalHandle() { }
73 74
74 RawObject* raw_; 75 RawObject* raw_;
75 DISALLOW_ALLOCATION(); // Allocated through AllocateHandle methods. 76 DISALLOW_ALLOCATION(); // Allocated through AllocateHandle methods.
76 DISALLOW_COPY_AND_ASSIGN(LocalHandle); 77 DISALLOW_COPY_AND_ASSIGN(LocalHandle);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 ApiNativeScope::Current()->zone()->GetBaseZone()) {} 656 ApiNativeScope::Current()->zone()->GetBaseZone()) {}
656 ApiGrowableArray() 657 ApiGrowableArray()
657 : BaseGrowableArray<T, ValueObject>( 658 : BaseGrowableArray<T, ValueObject>(
658 ApiNativeScope::Current()->zone()->GetBaseZone()) {} 659 ApiNativeScope::Current()->zone()->GetBaseZone()) {}
659 }; 660 };
660 661
661 662
662 } // namespace dart 663 } // namespace dart
663 664
664 #endif // VM_DART_API_STATE_H_ 665 #endif // VM_DART_API_STATE_H_
OLDNEW
« no previous file with comments | « vm/dart_api_impl_test.cc ('k') | vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698