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

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

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 years, 3 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/dart.cc ('k') | runtime/vm/dart_api_impl.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_API_IMPL_H_ 5 #ifndef VM_DART_API_IMPL_H_
6 #define VM_DART_API_IMPL_H_ 6 #define VM_DART_API_IMPL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static intptr_t ClassId(Dart_Handle handle) { 128 static intptr_t ClassId(Dart_Handle handle) {
129 // TODO(turnidge): Assumes RawObject* is at offset zero. Fix. 129 // TODO(turnidge): Assumes RawObject* is at offset zero. Fix.
130 RawObject* raw = *(reinterpret_cast<RawObject**>(handle)); 130 RawObject* raw = *(reinterpret_cast<RawObject**>(handle));
131 if (!raw->IsHeapObject()) { 131 if (!raw->IsHeapObject()) {
132 return kSmiCid; 132 return kSmiCid;
133 } 133 }
134 return raw->GetClassId(); 134 return raw->GetClassId();
135 } 135 }
136 136
137 // Generates a handle used to designate an error return. 137 // Generates a handle used to designate an error return.
138 static Dart_Handle NewError(const char* format, ...); 138 static Dart_Handle NewError(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
139 139
140 // Gets a handle to Null. 140 // Gets a handle to Null.
141 static Dart_Handle Null(Isolate* isolate); 141 static Dart_Handle Null(Isolate* isolate);
142 142
143 // Gets a handle to True. 143 // Gets a handle to True.
144 static Dart_Handle True(Isolate* isolate); 144 static Dart_Handle True(Isolate* isolate);
145 145
146 // Gets a handle to False 146 // Gets a handle to False
147 static Dart_Handle False(Isolate* isolate); 147 static Dart_Handle False(Isolate* isolate);
148 148
(...skipping 24 matching lines...) Expand all
173 } 173 }
174 private: 174 private:
175 Isolate* saved_isolate_; 175 Isolate* saved_isolate_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(IsolateSaver); 177 DISALLOW_COPY_AND_ASSIGN(IsolateSaver);
178 }; 178 };
179 179
180 } // namespace dart. 180 } // namespace dart.
181 181
182 #endif // VM_DART_API_IMPL_H_ 182 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698