| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "vm/dart_api_message.h" | 5 #include "vm/dart_api_message.h" |
| 6 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/snapshot_ids.h" | 7 #include "vm/snapshot_ids.h" |
| 8 #include "vm/symbols.h" | 8 #include "vm/symbols.h" |
| 9 #include "vm/unicode.h" | 9 #include "vm/unicode.h" |
| 10 | 10 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 { "_ByteDataView", Dart_CObject::kUint8Array }, | 237 { "_ByteDataView", Dart_CObject::kUint8Array }, |
| 238 { "_Float32ArrayView", Dart_CObject::kFloat32Array }, | 238 { "_Float32ArrayView", Dart_CObject::kFloat32Array }, |
| 239 { "_Float64ArrayView", Dart_CObject::kFloat64Array }, | 239 { "_Float64ArrayView", Dart_CObject::kFloat64Array }, |
| 240 { NULL, Dart_CObject::kNumberOfTypedDataTypes }, | 240 { NULL, Dart_CObject::kNumberOfTypedDataTypes }, |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 char* library_url = | 243 char* library_url = |
| 244 object->cls->internal.as_class.library_url->value.as_string; | 244 object->cls->internal.as_class.library_url->value.as_string; |
| 245 char* class_name = | 245 char* class_name = |
| 246 object->cls->internal.as_class.class_name->value.as_string; | 246 object->cls->internal.as_class.class_name->value.as_string; |
| 247 if (strcmp("dart:typeddata", library_url) != 0) { | 247 if (strcmp("dart:typed_data", library_url) != 0) { |
| 248 return Dart_CObject::kNumberOfTypedDataTypes; | 248 return Dart_CObject::kNumberOfTypedDataTypes; |
| 249 } | 249 } |
| 250 int i = 0; | 250 int i = 0; |
| 251 while (view_class_names[i].name != NULL) { | 251 while (view_class_names[i].name != NULL) { |
| 252 if (strncmp(view_class_names[i].name, | 252 if (strncmp(view_class_names[i].name, |
| 253 class_name, | 253 class_name, |
| 254 strlen(view_class_names[i].name)) == 0) { | 254 strlen(view_class_names[i].name)) == 0) { |
| 255 return view_class_names[i].type; | 255 return view_class_names[i].type; |
| 256 } | 256 } |
| 257 i++; | 257 i++; |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 if (!success) { | 1114 if (!success) { |
| 1115 UnmarkAllCObjects(object); | 1115 UnmarkAllCObjects(object); |
| 1116 return false; | 1116 return false; |
| 1117 } | 1117 } |
| 1118 } | 1118 } |
| 1119 UnmarkAllCObjects(object); | 1119 UnmarkAllCObjects(object); |
| 1120 return true; | 1120 return true; |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 } // namespace dart | 1123 } // namespace dart |
| OLD | NEW |