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

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

Issue 10441111: - Rename class index to class id. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_generator_ia32.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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 RawObject* raw = *(reinterpret_cast<RawObject**>(handle)); 116 RawObject* raw = *(reinterpret_cast<RawObject**>(handle));
117 return !raw->IsHeapObject(); 117 return !raw->IsHeapObject();
118 } 118 }
119 119
120 // Returns the value of a Smi. 120 // Returns the value of a Smi.
121 static intptr_t SmiValue(Dart_Handle handle) { 121 static intptr_t SmiValue(Dart_Handle handle) {
122 uword value = *(reinterpret_cast<uword*>(handle)); 122 uword value = *(reinterpret_cast<uword*>(handle));
123 return Smi::ValueFromRaw(value); 123 return Smi::ValueFromRaw(value);
124 } 124 }
125 125
126 static intptr_t ClassIndex(Dart_Handle handle) { 126 static intptr_t ClassId(Dart_Handle handle) {
127 RawObject* raw = *(reinterpret_cast<RawObject**>(handle)); 127 RawObject* raw = *(reinterpret_cast<RawObject**>(handle));
128 if (!raw->IsHeapObject()) { 128 if (!raw->IsHeapObject()) {
129 return kSmi; 129 return kSmi;
130 } 130 }
131 return raw->GetClassIndex(); 131 return raw->GetClassId();
132 } 132 }
133 133
134 // Generates a handle used to designate an error return. 134 // Generates a handle used to designate an error return.
135 static Dart_Handle NewError(const char* format, ...); 135 static Dart_Handle NewError(const char* format, ...);
136 136
137 // Gets a handle to Null. 137 // Gets a handle to Null.
138 static Dart_Handle Null(Isolate* isolate); 138 static Dart_Handle Null(Isolate* isolate);
139 139
140 // Gets a handle to True. 140 // Gets a handle to True.
141 static Dart_Handle True(Isolate* isolate); 141 static Dart_Handle True(Isolate* isolate);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/code_generator_ia32.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698