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

Side by Side Diff: vm/dart_api_impl.h

Issue 10827209: Unify class ids and snapshot object ids list so that we don't have disparate and sometimes confusin… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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/class_table.cc ('k') | 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 // Returns the value of a Smi. 121 // Returns the value of a Smi.
122 static intptr_t SmiValue(Dart_Handle handle) { 122 static intptr_t SmiValue(Dart_Handle handle) {
123 uword value = *(reinterpret_cast<uword*>(handle)); 123 uword value = *(reinterpret_cast<uword*>(handle));
124 return Smi::ValueFromRaw(value); 124 return Smi::ValueFromRaw(value);
125 } 125 }
126 126
127 static intptr_t ClassId(Dart_Handle handle) { 127 static intptr_t ClassId(Dart_Handle handle) {
128 RawObject* raw = *(reinterpret_cast<RawObject**>(handle)); 128 RawObject* raw = *(reinterpret_cast<RawObject**>(handle));
129 if (!raw->IsHeapObject()) { 129 if (!raw->IsHeapObject()) {
130 return kSmi; 130 return kSmiCid;
131 } 131 }
132 return raw->GetClassId(); 132 return raw->GetClassId();
133 } 133 }
134 134
135 // Generates a handle used to designate an error return. 135 // Generates a handle used to designate an error return.
136 static Dart_Handle NewError(const char* format, ...); 136 static Dart_Handle NewError(const char* format, ...);
137 137
138 // Gets a handle to Null. 138 // Gets a handle to Null.
139 static Dart_Handle Null(Isolate* isolate); 139 static Dart_Handle Null(Isolate* isolate);
140 140
(...skipping 27 matching lines...) Expand all
168 } 168 }
169 private: 169 private:
170 Isolate* saved_isolate_; 170 Isolate* saved_isolate_;
171 171
172 DISALLOW_COPY_AND_ASSIGN(IsolateSaver); 172 DISALLOW_COPY_AND_ASSIGN(IsolateSaver);
173 }; 173 };
174 174
175 } // namespace dart. 175 } // namespace dart.
176 176
177 #endif // VM_DART_API_IMPL_H_ 177 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « vm/class_table.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698