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

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

Issue 1186353004: Move allocation of static API handles Dart_True, etc. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add LocalHandle::apiHandle Created 5 years, 6 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
« no previous file with comments | « no previous file | runtime/vm/dart.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_H_ 5 #ifndef VM_DART_H_
6 #define VM_DART_H_ 6 #define VM_DART_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 // Forward declarations. 13 // Forward declarations.
14 class DebugInfo; 14 class DebugInfo;
15 class Isolate; 15 class Isolate;
16 class LocalHandle;
16 class RawError; 17 class RawError;
17 class ReadOnlyHandles; 18 class ReadOnlyHandles;
18 class ThreadPool; 19 class ThreadPool;
19 20
20 class Dart : public AllStatic { 21 class Dart : public AllStatic {
21 public: 22 public:
22 static const char* InitOnce( 23 static const char* InitOnce(
23 const uint8_t* vm_isolate_snapshot, 24 const uint8_t* vm_isolate_snapshot,
24 Dart_IsolateCreateCallback create, 25 Dart_IsolateCreateCallback create,
25 Dart_IsolateInterruptCallback interrupt, 26 Dart_IsolateInterruptCallback interrupt,
(...skipping 13 matching lines...) Expand all
39 static void ShutdownIsolate(); 40 static void ShutdownIsolate();
40 41
41 static Isolate* vm_isolate() { return vm_isolate_; } 42 static Isolate* vm_isolate() { return vm_isolate_; }
42 static ThreadPool* thread_pool() { return thread_pool_; } 43 static ThreadPool* thread_pool() { return thread_pool_; }
43 44
44 static void set_pprof_symbol_generator(DebugInfo* value) { 45 static void set_pprof_symbol_generator(DebugInfo* value) {
45 pprof_symbol_generator_ = value; 46 pprof_symbol_generator_ = value;
46 } 47 }
47 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } 48 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; }
48 49
50 static LocalHandle* AllocateReadOnlyApiHandle();
51
49 static uword AllocateReadOnlyHandle(); 52 static uword AllocateReadOnlyHandle();
50 static bool IsReadOnlyHandle(uword address); 53 static bool IsReadOnlyHandle(uword address);
51 54
52 private: 55 private:
53 static Isolate* vm_isolate_; 56 static Isolate* vm_isolate_;
54 static ThreadPool* thread_pool_; 57 static ThreadPool* thread_pool_;
55 static DebugInfo* pprof_symbol_generator_; 58 static DebugInfo* pprof_symbol_generator_;
56 static ReadOnlyHandles* predefined_handles_; 59 static ReadOnlyHandles* predefined_handles_;
57 }; 60 };
58 61
59 } // namespace dart 62 } // namespace dart
60 63
61 #endif // VM_DART_H_ 64 #endif // VM_DART_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698