blob: 90893cb1556e9a64b4f423f926c767801fa06275 [file] [log] [blame]
Carl Shapiro1fb86202011-06-27 17:43:13 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
Brian Carlstrom578bbdc2011-07-21 14:07:47 -07003#include "dex_file.h"
Brian Carlstrom7e49dca2011-07-22 18:07:34 -07004
5#include <fcntl.h>
Brian Carlstromb0460ea2011-07-29 10:08:05 -07006#include <map>
7#include <stdio.h>
Brian Carlstrom7e49dca2011-07-22 18:07:34 -07008#include <string.h>
Brian Carlstromb0460ea2011-07-29 10:08:05 -07009#include <sys/file.h>
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070010#include <sys/mman.h>
11#include <sys/stat.h>
12#include <sys/types.h>
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070013
Brian Carlstrom578bbdc2011-07-21 14:07:47 -070014#include "globals.h"
15#include "logging.h"
16#include "object.h"
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070017#include "scoped_ptr.h"
Brian Carlstromb0460ea2011-07-29 10:08:05 -070018#include "stringprintf.h"
19#include "thread.h"
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070020#include "utils.h"
Brian Carlstromb0460ea2011-07-29 10:08:05 -070021#include "zip_archive.h"
Carl Shapiro1fb86202011-06-27 17:43:13 -070022
23namespace art {
24
Brian Carlstromf615a612011-07-23 12:50:34 -070025const byte DexFile::kDexMagic[] = { 'd', 'e', 'x', '\n' };
26const byte DexFile::kDexMagicVersion[] = { '0', '3', '5', '\0' };
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070027
Brian Carlstrom74eb46a2011-08-02 20:10:14 -070028DexFile::ClassPathEntry DexFile::FindInClassPath(const StringPiece& descriptor,
29 ClassPath& class_path) {
30 for (size_t i = 0; i != class_path.size(); ++i) {
31 const DexFile* dex_file = class_path[i];
32 const DexFile::ClassDef* dex_class_def = dex_file->FindClassDef(descriptor);
33 if (dex_class_def != NULL) {
34 return ClassPathEntry(dex_file, dex_class_def);
35 }
36 }
Brian Carlstrom7e93b502011-08-04 14:16:22 -070037 // TODO remove reinterpret_cast when issue with -std=gnu++0x host issue resolved
38 return ClassPathEntry(reinterpret_cast<const DexFile*>(NULL),
39 reinterpret_cast<const DexFile::ClassDef*>(NULL));
Brian Carlstrom74eb46a2011-08-02 20:10:14 -070040}
41
Brian Carlstromf615a612011-07-23 12:50:34 -070042DexFile::Closer::~Closer() {}
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070043
Brian Carlstromf615a612011-07-23 12:50:34 -070044DexFile::MmapCloser::MmapCloser(void* addr, size_t length) : addr_(addr), length_(length) {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070045 CHECK(addr != NULL);
46}
Brian Carlstromf615a612011-07-23 12:50:34 -070047DexFile::MmapCloser::~MmapCloser() {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070048 if (munmap(addr_, length_) == -1) {
49 PLOG(INFO) << "munmap failed";
50 }
51}
52
Brian Carlstromf615a612011-07-23 12:50:34 -070053DexFile::PtrCloser::PtrCloser(byte* addr) : addr_(addr) {}
54DexFile::PtrCloser::~PtrCloser() { delete[] addr_; }
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070055
Brian Carlstromb0460ea2011-07-29 10:08:05 -070056DexFile* DexFile::OpenFile(const std::string& filename) {
57 int fd = open(filename.c_str(), O_RDONLY); // TODO: scoped_fd
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070058 if (fd == -1) {
59 PLOG(ERROR) << "open(\"" << filename << "\", O_RDONLY) failed";
60 return NULL;
61 }
62 struct stat sbuf;
63 memset(&sbuf, 0, sizeof(sbuf));
64 if (fstat(fd, &sbuf) == -1) {
65 PLOG(ERROR) << "fstat \"" << filename << "\" failed";
66 close(fd);
67 return NULL;
68 }
69 size_t length = sbuf.st_size;
70 void* addr = mmap(NULL, length, PROT_READ, MAP_SHARED, fd, 0);
71 if (addr == MAP_FAILED) {
72 PLOG(ERROR) << "mmap \"" << filename << "\" failed";
73 close(fd);
74 return NULL;
75 }
76 close(fd);
77 byte* dex_file = reinterpret_cast<byte*>(addr);
78 Closer* closer = new MmapCloser(addr, length);
79 return Open(dex_file, length, closer);
80}
81
Brian Carlstromb0460ea2011-07-29 10:08:05 -070082static const char* kClassesDex = "classes.dex";
83
84class LockedFd {
85 public:
86 static LockedFd* CreateAndLock(std::string& name, mode_t mode) {
87 int fd = open(name.c_str(), O_CREAT | O_RDWR, mode);
88 if (fd == -1) {
89 PLOG(ERROR) << "Can't open file '" << name;
90 return NULL;
91 }
92 fchmod(fd, mode);
93
94 LOG(INFO) << "locking file " << name << " (fd=" << fd << ")";
95 int result = flock(fd, LOCK_EX | LOCK_NB);
96 if (result == -1) {
97 LOG(WARNING) << "sleeping while locking file " << name;
98 result = flock(fd, LOCK_EX);
99 }
100 if (result == -1 ) {
101 close(fd);
102 PLOG(ERROR) << "Can't lock file '" << name;
103 return NULL;
104 }
105 return new LockedFd(fd);
106 }
107
108 int GetFd() const {
109 return fd_;
110 }
111
112 ~LockedFd() {
113 if (fd_ != -1) {
114 int result = flock(fd_, LOCK_UN);
115 if (result == -1) {
116 PLOG(WARNING) << "flock(" << fd_ << ", LOCK_UN) failed";
117 }
118 close(fd_);
119 }
120 }
121
122 private:
123 LockedFd(int fd) : fd_(fd) {}
124
125 int fd_;
126};
127
128class TmpFile {
129 public:
130 TmpFile(const std::string name) : name_(name) {}
131 ~TmpFile() {
132 unlink(name_.c_str());
133 }
134 private:
135 const std::string name_;
136};
137
138// Open classes.dex from within a .zip, .jar, .apk, ...
139DexFile* DexFile::OpenZip(const std::string& filename) {
140
141 // First, look for a ".dex" alongside the jar file. It will have
142 // the same name/path except for the extension.
143
144 // Example filename = dir/foo.jar
145 std::string adjacent_dex_filename(filename);
146 size_t found = adjacent_dex_filename.find_last_of(".");
147 if (found == std::string::npos) {
148 LOG(WARNING) << "No . in filename" << filename;
149 }
150 adjacent_dex_filename.replace(adjacent_dex_filename.begin() + found,
151 adjacent_dex_filename.end(),
152 ".dex");
153 // Example adjacent_dex_filename = dir/foo.dex
154 DexFile* adjacent_dex_file = DexFile::OpenFile(adjacent_dex_filename);
155 if (adjacent_dex_file != NULL) {
156 // We don't verify anything in this case, because we aren't in
157 // the cache and typically the file is in the readonly /system
158 // area, so if something is wrong, there is nothing we can do.
159 return adjacent_dex_file;
160 }
161
162 char resolved[PATH_MAX];
163 char* absolute_path = realpath(filename.c_str(), resolved);
164 if (absolute_path == NULL) {
165 LOG(WARNING) << "Could not create absolute path for " << filename
166 << " when looking for classes.dex";
167 return NULL;
168 }
169 std::string cache_file(absolute_path+1); // skip leading slash
170 std::replace(cache_file.begin(), cache_file.end(), '/', '@');
171 cache_file.push_back('@');
172 cache_file.append(kClassesDex);
173 // Example cache_file = parent@dir@foo.jar@classes.dex
174
175 const char* data_root = getenv("ANDROID_DATA");
176 if (data_root == NULL) {
177 data_root = "/data";
178 }
179
180 std::string cache_path_tmp = StringPrintf("%s/art-cache/%s", data_root, cache_file.c_str());
181 // Example cache_path_tmp = /data/art-cache/parent@dir@foo.jar@classes.dex
182
183 scoped_ptr<ZipArchive> zip_archive(ZipArchive::Open(filename));
184 if (zip_archive == NULL) {
185 LOG(WARNING) << "Could not open " << filename << " when looking for classes.dex";
186 return NULL;
187 }
188 scoped_ptr<ZipEntry> zip_entry(zip_archive->Find(kClassesDex));
189 if (zip_entry == NULL) {
190 LOG(WARNING) << "Could not find classes.dex within " << filename;
191 return NULL;
192 }
193
194 std::string cache_path = StringPrintf("%s.%08x", cache_path_tmp.c_str(), zip_entry->GetCrc32());
195 // Example cache_path = /data/art-cache/parent@dir@foo.jar@classes.dex.1a2b3c4d
196
197 while (true) {
198 DexFile* cached_dex_file = DexFile::OpenFile(cache_path);
199 if (cached_dex_file != NULL) {
200 return cached_dex_file;
201 }
202
203 // Try to open the temporary cache file, grabbing an exclusive
204 // lock. If somebody else is working on it, we'll block here until
205 // they complete. Because we're waiting on an external resource,
206 // we go into native mode.
207 Thread* current_thread = Thread::Current();
208 Thread::State old = current_thread->GetState();
209 current_thread->SetState(Thread::kNative);
210 scoped_ptr<LockedFd> fd(LockedFd::CreateAndLock(cache_path_tmp, 0644));
211 current_thread->SetState(old);
212 if (fd == NULL) {
213 return NULL;
214 }
215
216 // Check to see if the fd we opened and locked matches the file in
217 // the filesystem. If they don't, then somebody else unlinked
218 // ours and created a new file, and we need to use that one
219 // instead. (If we caught them between the unlink and the create,
220 // we'll get an ENOENT from the file stat.)
221 struct stat fd_stat;
222 int fd_stat_result = fstat(fd->GetFd(), &fd_stat);
223 if (fd_stat_result == -1) {
224 PLOG(ERROR) << "Can't stat open file '" << cache_path_tmp << "'";
225 return NULL;
226 }
227 struct stat file_stat;
228 int file_stat_result = stat(cache_path_tmp.c_str(), &file_stat);
229 if (file_stat_result == -1 ||
230 fd_stat.st_dev != file_stat.st_dev || fd_stat.st_ino != file_stat.st_ino) {
231 LOG(WARNING) << "our open cache file is stale; sleeping and retrying";
232 usleep(250 * 1000); // if something is hosed, don't peg machine
233 continue;
234 }
235
236 // We have the correct file open and locked. Extract classes.dex
237 TmpFile tmp_file(cache_path_tmp);
238 bool success = zip_entry->Extract(fd->GetFd());
239 if (!success) {
240 return NULL;
241 }
242
243 // TODO restat and check length against zip_entry->GetUncompressedLength()?
244
245 // Compute checksum and compare to zip. If things look okay, rename from tmp.
246 off_t lseek_result = lseek(fd->GetFd(), 0, SEEK_SET);
247 if (lseek_result == -1) {
248 return NULL;
249 }
250 const size_t kBufSize = 32768;
251 scoped_ptr<uint8_t> buf(new uint8_t[kBufSize]);
252 if (buf == NULL) {
253 return NULL;
254 }
255 uint32_t computed_crc = crc32(0L, Z_NULL, 0);
256 while (true) {
257 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd->GetFd(), buf.get(), kBufSize));
258 if (bytes_read == 0) {
259 break;
260 }
261 computed_crc = crc32(computed_crc, buf.get(), bytes_read);
262 }
263 if (computed_crc != zip_entry->GetCrc32()) {
264 return NULL;
265 }
266 int rename_result = rename(cache_path_tmp.c_str(), cache_path.c_str());
267 if (rename_result == -1) {
268 PLOG(ERROR) << "Can't install dex cache file '" << cache_path << "' from '" << cache_path_tmp;
269 unlink(cache_path.c_str());
270 }
271 }
272 // NOTREACHED
273}
274
Brian Carlstromf615a612011-07-23 12:50:34 -0700275DexFile* DexFile::OpenPtr(byte* ptr, size_t length) {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700276 CHECK(ptr != NULL);
Brian Carlstromf615a612011-07-23 12:50:34 -0700277 DexFile::Closer* closer = new PtrCloser(ptr);
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700278 return Open(ptr, length, closer);
279}
280
Brian Carlstromf615a612011-07-23 12:50:34 -0700281DexFile* DexFile::Open(const byte* dex_bytes, size_t length,
282 Closer* closer) {
283 scoped_ptr<DexFile> dex_file(new DexFile(dex_bytes, length, closer));
284 if (!dex_file->Init()) {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700285 return NULL;
286 } else {
Brian Carlstromf615a612011-07-23 12:50:34 -0700287 return dex_file.release();
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700288 }
289}
290
Brian Carlstromf615a612011-07-23 12:50:34 -0700291DexFile::~DexFile() {}
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700292
Brian Carlstromf615a612011-07-23 12:50:34 -0700293bool DexFile::Init() {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700294 InitMembers();
295 if (!IsMagicValid()) {
296 return false;
297 }
298 InitIndex();
299 return true;
300}
301
Brian Carlstromf615a612011-07-23 12:50:34 -0700302void DexFile::InitMembers() {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700303 const byte* b = base_;
304 header_ = reinterpret_cast<const Header*>(b);
305 const Header* h = header_;
306 string_ids_ = reinterpret_cast<const StringId*>(b + h->string_ids_off_);
307 type_ids_ = reinterpret_cast<const TypeId*>(b + h->type_ids_off_);
308 field_ids_ = reinterpret_cast<const FieldId*>(b + h->field_ids_off_);
309 method_ids_ = reinterpret_cast<const MethodId*>(b + h->method_ids_off_);
310 proto_ids_ = reinterpret_cast<const ProtoId*>(b + h->proto_ids_off_);
311 class_defs_ = reinterpret_cast<const ClassDef*>(b + h->class_defs_off_);
312}
313
Brian Carlstromf615a612011-07-23 12:50:34 -0700314bool DexFile::IsMagicValid() {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700315 return CheckMagic(header_->magic_);
316}
317
Brian Carlstromf615a612011-07-23 12:50:34 -0700318bool DexFile::CheckMagic(const byte* magic) {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700319 CHECK(magic != NULL);
320 if (memcmp(magic, kDexMagic, sizeof(kDexMagic)) != 0) {
321 LOG(WARNING) << "Unrecognized magic number:"
322 << " " << magic[0]
323 << " " << magic[1]
324 << " " << magic[2]
325 << " " << magic[3];
326 return false;
327 }
328 const byte* version = &magic[sizeof(kDexMagic)];
329 if (memcmp(version, kDexMagicVersion, sizeof(kDexMagicVersion)) != 0) {
330 LOG(WARNING) << "Unrecognized version number:"
331 << " " << version[0]
332 << " " << version[1]
333 << " " << version[2]
334 << " " << version[3];
335 return false;
336 }
337 return true;
338}
339
Brian Carlstromf615a612011-07-23 12:50:34 -0700340void DexFile::InitIndex() {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700341 CHECK_EQ(index_.size(), 0U);
342 for (size_t i = 0; i < NumClassDefs(); ++i) {
343 const ClassDef& class_def = GetClassDef(i);
344 const char* descriptor = GetClassDescriptor(class_def);
345 index_[descriptor] = &class_def;
346 }
347}
348
Brian Carlstromf615a612011-07-23 12:50:34 -0700349const DexFile::ClassDef* DexFile::FindClassDef(const StringPiece& descriptor) const {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700350 CHECK(descriptor != NULL);
351 Index::const_iterator it = index_.find(descriptor);
352 if (it == index_.end()) {
353 return NULL;
354 } else {
355 return it->second;
356 }
357}
358
Carl Shapiro419ec7b2011-08-03 14:48:33 -0700359// Materializes the method descriptor for a method prototype. Method
360// descriptors are not stored directly in the dex file. Instead, one
361// must assemble the descriptor from references in the prototype.
362char* DexFile::CreateMethodDescriptor(uint32_t proto_idx,
363 int32_t* unicode_length) const {
364 CHECK(unicode_length != NULL);
365 const ProtoId& proto_id = GetProtoId(proto_idx);
366 std::string descriptor;
367 descriptor.push_back('(');
368 const TypeList* type_list = GetProtoParameters(proto_id);
369 size_t parameter_length = 0;
370 if (type_list != NULL) {
371 // A non-zero number of arguments. Append the type names.
372 for (size_t i = 0; i < type_list->Size(); ++i) {
373 const TypeItem& type_item = type_list->GetTypeItem(i);
374 uint32_t type_idx = type_item.type_idx_;
375 int32_t type_length;
376 const char* name = dexStringByTypeIdx(type_idx, &type_length);
377 parameter_length += type_length;
378 descriptor.append(name);
379 }
380 }
381 descriptor.push_back(')');
382 uint32_t return_type_idx = proto_id.return_type_idx_;
383 int32_t return_type_length;
384 const char* name = dexStringByTypeIdx(return_type_idx, &return_type_length);
385 descriptor.append(name);
386 // TODO: should this just return a std::string?
387 scoped_ptr<char> c_string(new char[descriptor.size() + 1]);
388 strcpy(c_string.get(), descriptor.c_str());
389 *unicode_length = parameter_length + return_type_length + 2; // 2 for ( and )
390 return c_string.release();
391}
392
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700393// Read a signed integer. "zwidth" is the zero-based byte count.
394static int32_t ReadSignedInt(const byte* ptr, int zwidth)
395{
396 int32_t val = 0;
397 for (int i = zwidth; i >= 0; --i) {
398 val = ((uint32_t)val >> 8) | (((int32_t)*ptr++) << 24);
399 }
400 val >>= (3 - zwidth) * 8;
401 return val;
402}
403
404// Read an unsigned integer. "zwidth" is the zero-based byte count,
405// "fill_on_right" indicates which side we want to zero-fill from.
406static uint32_t ReadUnsignedInt(const byte* ptr, int zwidth,
407 bool fill_on_right) {
408 uint32_t val = 0;
409 if (!fill_on_right) {
410 for (int i = zwidth; i >= 0; --i) {
411 val = (val >> 8) | (((uint32_t)*ptr++) << 24);
412 }
413 val >>= (3 - zwidth) * 8;
414 } else {
415 for (int i = zwidth; i >= 0; --i) {
416 val = (val >> 8) | (((uint32_t)*ptr++) << 24);
417 }
418 }
419 return val;
420}
421
422// Read a signed long. "zwidth" is the zero-based byte count.
423static int64_t ReadSignedLong(const byte* ptr, int zwidth) {
424 int64_t val = 0;
425 for (int i = zwidth; i >= 0; --i) {
426 val = ((uint64_t)val >> 8) | (((int64_t)*ptr++) << 56);
427 }
428 val >>= (7 - zwidth) * 8;
429 return val;
430}
431
432// Read an unsigned long. "zwidth" is the zero-based byte count,
433// "fill_on_right" indicates which side we want to zero-fill from.
434static uint64_t ReadUnsignedLong(const byte* ptr, int zwidth,
435 bool fill_on_right) {
436 uint64_t val = 0;
437 if (!fill_on_right) {
438 for (int i = zwidth; i >= 0; --i) {
439 val = (val >> 8) | (((uint64_t)*ptr++) << 56);
440 }
441 val >>= (7 - zwidth) * 8;
442 } else {
443 for (int i = zwidth; i >= 0; --i) {
444 val = (val >> 8) | (((uint64_t)*ptr++) << 56);
445 }
446 }
447 return val;
448}
449
Brian Carlstromf615a612011-07-23 12:50:34 -0700450DexFile::ValueType DexFile::ReadEncodedValue(const byte** stream,
451 JValue* value) const {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700452 const byte* ptr = *stream;
453 byte value_type = *ptr++;
454 byte value_arg = value_type >> kEncodedValueArgShift;
455 size_t width = value_arg + 1; // assume and correct later
456 int type = value_type & kEncodedValueTypeMask;
457 switch (type) {
Brian Carlstromf615a612011-07-23 12:50:34 -0700458 case DexFile::kByte: {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700459 int32_t b = ReadSignedInt(ptr, value_arg);
460 CHECK(IsInt(8, b));
461 value->i = b;
462 break;
463 }
Brian Carlstromf615a612011-07-23 12:50:34 -0700464 case DexFile::kShort: {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700465 int32_t s = ReadSignedInt(ptr, value_arg);
466 CHECK(IsInt(16, s));
467 value->i = s;
468 break;
469 }
Brian Carlstromf615a612011-07-23 12:50:34 -0700470 case DexFile::kChar: {
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700471 uint32_t c = ReadUnsignedInt(ptr, value_arg, false);
472 CHECK(IsUint(16, c));
473 value->i = c;
474 break;
475 }
Brian Carlstromf615a612011-07-23 12:50:34 -0700476 case DexFile::kInt:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700477 value->i = ReadSignedInt(ptr, value_arg);
478 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700479 case DexFile::kLong:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700480 value->j = ReadSignedLong(ptr, value_arg);
481 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700482 case DexFile::kFloat:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700483 value->i = ReadUnsignedInt(ptr, value_arg, true);
484 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700485 case DexFile::kDouble:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700486 value->j = ReadUnsignedLong(ptr, value_arg, true);
487 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700488 case DexFile::kBoolean:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700489 value->i = (value_arg != 0);
490 width = 0;
491 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700492 case DexFile::kString:
493 case DexFile::kType:
494 case DexFile::kMethod:
495 case DexFile::kEnum:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700496 value->i = ReadUnsignedInt(ptr, value_arg, false);
497 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700498 case DexFile::kField:
499 case DexFile::kArray:
500 case DexFile::kAnnotation:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700501 LOG(FATAL) << "Unimplemented";
502 break;
Brian Carlstromf615a612011-07-23 12:50:34 -0700503 case DexFile::kNull:
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700504 value->i = 0;
505 width = 0;
506 break;
507 default:
508 LOG(FATAL) << "Unreached";
509 }
510 ptr += width;
511 *stream = ptr;
512 return static_cast<ValueType>(type);
Carl Shapiro1fb86202011-06-27 17:43:13 -0700513}
514
Carl Shapiro1fb86202011-06-27 17:43:13 -0700515} // namespace art