| OLD | NEW |
| 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 #include "vm/object_store.h" | 5 #include "vm/object_store.h" |
| 6 | 6 |
| 7 #include "vm/exceptions.h" | 7 #include "vm/exceptions.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/longjump.h" | 9 #include "vm/longjump.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 four_byte_string_class_(Class::null()), | 29 four_byte_string_class_(Class::null()), |
| 30 external_one_byte_string_class_(Class::null()), | 30 external_one_byte_string_class_(Class::null()), |
| 31 external_two_byte_string_class_(Class::null()), | 31 external_two_byte_string_class_(Class::null()), |
| 32 external_four_byte_string_class_(Class::null()), | 32 external_four_byte_string_class_(Class::null()), |
| 33 bool_interface_(Type::null()), | 33 bool_interface_(Type::null()), |
| 34 bool_class_(Class::null()), | 34 bool_class_(Class::null()), |
| 35 list_interface_(Type::null()), | 35 list_interface_(Type::null()), |
| 36 array_class_(Class::null()), | 36 array_class_(Class::null()), |
| 37 immutable_array_class_(Class::null()), | 37 immutable_array_class_(Class::null()), |
| 38 byte_buffer_class_(Class::null()), | 38 byte_buffer_class_(Class::null()), |
| 39 unhandled_exception_class_(Class::null()), | |
| 40 stacktrace_class_(Class::null()), | 39 stacktrace_class_(Class::null()), |
| 41 jsregexp_class_(Class::null()), | 40 jsregexp_class_(Class::null()), |
| 42 true_value_(Bool::null()), | 41 true_value_(Bool::null()), |
| 43 false_value_(Bool::null()), | 42 false_value_(Bool::null()), |
| 44 empty_array_(Array::null()), | 43 empty_array_(Array::null()), |
| 45 symbol_table_(Array::null()), | 44 symbol_table_(Array::null()), |
| 46 canonical_type_arguments_(Array::null()), | 45 canonical_type_arguments_(Array::null()), |
| 47 core_library_(Library::null()), | 46 core_library_(Library::null()), |
| 48 core_impl_library_(Library::null()), | 47 core_impl_library_(Library::null()), |
| 49 native_wrappers_library_(Library::null()), | 48 native_wrappers_library_(Library::null()), |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 case kOneByteStringClass: return one_byte_string_class_; | 110 case kOneByteStringClass: return one_byte_string_class_; |
| 112 case kTwoByteStringClass: return two_byte_string_class_; | 111 case kTwoByteStringClass: return two_byte_string_class_; |
| 113 case kFourByteStringClass: return four_byte_string_class_; | 112 case kFourByteStringClass: return four_byte_string_class_; |
| 114 case kExternalOneByteStringClass: return external_one_byte_string_class_; | 113 case kExternalOneByteStringClass: return external_one_byte_string_class_; |
| 115 case kExternalTwoByteStringClass: return external_two_byte_string_class_; | 114 case kExternalTwoByteStringClass: return external_two_byte_string_class_; |
| 116 case kExternalFourByteStringClass: return external_four_byte_string_class_; | 115 case kExternalFourByteStringClass: return external_four_byte_string_class_; |
| 117 case kBoolClass: return bool_class_; | 116 case kBoolClass: return bool_class_; |
| 118 case kArrayClass: return array_class_; | 117 case kArrayClass: return array_class_; |
| 119 case kImmutableArrayClass: return immutable_array_class_; | 118 case kImmutableArrayClass: return immutable_array_class_; |
| 120 case kByteBufferClass: return byte_buffer_class_; | 119 case kByteBufferClass: return byte_buffer_class_; |
| 121 case kUnhandledExceptionClass: return unhandled_exception_class_; | |
| 122 case kStacktraceClass: return stacktrace_class_; | 120 case kStacktraceClass: return stacktrace_class_; |
| 123 case kJSRegExpClass: return jsregexp_class_; | 121 case kJSRegExpClass: return jsregexp_class_; |
| 124 default: break; | 122 default: break; |
| 125 } | 123 } |
| 126 UNREACHABLE(); | 124 UNREACHABLE(); |
| 127 return Class::null(); | 125 return Class::null(); |
| 128 } | 126 } |
| 129 | 127 |
| 130 | 128 |
| 131 int ObjectStore::GetClassIndex(const RawClass* raw_class) { | 129 int ObjectStore::GetClassIndex(const RawClass* raw_class) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 153 } else if (raw_class == external_four_byte_string_class_) { | 151 } else if (raw_class == external_four_byte_string_class_) { |
| 154 return kExternalFourByteStringClass; | 152 return kExternalFourByteStringClass; |
| 155 } else if (raw_class == bool_class_) { | 153 } else if (raw_class == bool_class_) { |
| 156 return kBoolClass; | 154 return kBoolClass; |
| 157 } else if (raw_class == array_class_) { | 155 } else if (raw_class == array_class_) { |
| 158 return kArrayClass; | 156 return kArrayClass; |
| 159 } else if (raw_class == immutable_array_class_) { | 157 } else if (raw_class == immutable_array_class_) { |
| 160 return kImmutableArrayClass; | 158 return kImmutableArrayClass; |
| 161 } else if (raw_class == byte_buffer_class_) { | 159 } else if (raw_class == byte_buffer_class_) { |
| 162 return kByteBufferClass; | 160 return kByteBufferClass; |
| 163 } else if (raw_class == unhandled_exception_class_) { | |
| 164 return kUnhandledExceptionClass; | |
| 165 } else if (raw_class == stacktrace_class_) { | 161 } else if (raw_class == stacktrace_class_) { |
| 166 return kStacktraceClass; | 162 return kStacktraceClass; |
| 167 } else if (raw_class == jsregexp_class_) { | 163 } else if (raw_class == jsregexp_class_) { |
| 168 return kJSRegExpClass; | 164 return kJSRegExpClass; |
| 169 } | 165 } |
| 170 return kInvalidIndex; | 166 return kInvalidIndex; |
| 171 } | 167 } |
| 172 | 168 |
| 173 | 169 |
| 174 RawType* ObjectStore::GetType(int index) { | 170 RawType* ObjectStore::GetType(int index) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return kBoolInterface; | 209 return kBoolInterface; |
| 214 } else if (raw_type == string_interface()) { | 210 } else if (raw_type == string_interface()) { |
| 215 return kStringInterface; | 211 return kStringInterface; |
| 216 } else if (raw_type == list_interface()) { | 212 } else if (raw_type == list_interface()) { |
| 217 return kListInterface; | 213 return kListInterface; |
| 218 } | 214 } |
| 219 return kInvalidIndex; | 215 return kInvalidIndex; |
| 220 } | 216 } |
| 221 | 217 |
| 222 } // namespace dart | 218 } // namespace dart |
| OLD | NEW |