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

Side by Side Diff: runtime/vm/native_api_impl.cc

Issue 139043003: - Address warnings about 64-bit to 32-bit conversions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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/heap_profiler_test.cc ('k') | runtime/vm/raw_object.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "include/dart_native_api.h" 5 #include "include/dart_native_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_api_message.h" 9 #include "vm/dart_api_message.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // pprof profiling. Then these symbols should be removed. 73 // pprof profiling. Then these symbols should be removed.
74 74
75 DART_EXPORT void Dart_InitPprofSupport() { } 75 DART_EXPORT void Dart_InitPprofSupport() { }
76 76
77 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size) { 77 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size) {
78 *buffer = NULL; 78 *buffer = NULL;
79 *buffer_size = 0; 79 *buffer_size = 0;
80 } 80 }
81 81
82 82
83 // --- Heap Profiler ---
84
85 DART_EXPORT Dart_Handle Dart_HeapProfile(Dart_FileWriteCallback callback,
86 void* stream) {
87 Isolate* isolate = Isolate::Current();
88 CHECK_ISOLATE(isolate);
89 if (callback == NULL) {
90 RETURN_NULL_ERROR(callback);
91 }
92 isolate->heap()->Profile(callback, stream);
93 return Api::Success();
94 }
95
96
97 // --- Verification tools --- 83 // --- Verification tools ---
98 84
99 static void CompileAll(Isolate* isolate, Dart_Handle* result) { 85 static void CompileAll(Isolate* isolate, Dart_Handle* result) {
100 ASSERT(isolate != NULL); 86 ASSERT(isolate != NULL);
101 const Error& error = Error::Handle(isolate, Library::CompileAll()); 87 const Error& error = Error::Handle(isolate, Library::CompileAll());
102 if (error.IsNull()) { 88 if (error.IsNull()) {
103 *result = Api::Success(); 89 *result = Api::Success();
104 } else { 90 } else {
105 *result = Api::NewHandle(isolate, error.raw()); 91 *result = Api::NewHandle(isolate, error.raw());
106 } 92 }
107 } 93 }
108 94
109 95
110 DART_EXPORT Dart_Handle Dart_CompileAll() { 96 DART_EXPORT Dart_Handle Dart_CompileAll() {
111 Isolate* isolate = Isolate::Current(); 97 Isolate* isolate = Isolate::Current();
112 DARTSCOPE(isolate); 98 DARTSCOPE(isolate);
113 Dart_Handle result = Api::CheckIsolateState(isolate); 99 Dart_Handle result = Api::CheckIsolateState(isolate);
114 if (::Dart_IsError(result)) { 100 if (::Dart_IsError(result)) {
115 return result; 101 return result;
116 } 102 }
117 CHECK_CALLBACK_STATE(isolate); 103 CHECK_CALLBACK_STATE(isolate);
118 CompileAll(isolate, &result); 104 CompileAll(isolate, &result);
119 return result; 105 return result;
120 } 106 }
121 107
122 } // namespace dart 108 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/heap_profiler_test.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698