OLD | NEW |
---|---|
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 <set> | 5 #include <set> |
6 | 6 |
7 #include "vm/kernel_to_il.h" | 7 #include "vm/kernel_to_il.h" |
8 | 8 |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
(...skipping 4825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4836 void DartTypeTranslator::VisitDynamicType(DynamicType* node) { | 4836 void DartTypeTranslator::VisitDynamicType(DynamicType* node) { |
4837 result_ = Object::dynamic_type().raw(); | 4837 result_ = Object::dynamic_type().raw(); |
4838 } | 4838 } |
4839 | 4839 |
4840 | 4840 |
4841 void DartTypeTranslator::VisitVoidType(VoidType* node) { | 4841 void DartTypeTranslator::VisitVoidType(VoidType* node) { |
4842 result_ = Object::void_type().raw(); | 4842 result_ = Object::void_type().raw(); |
4843 } | 4843 } |
4844 | 4844 |
4845 | 4845 |
4846 void DartTypeTranslator::VisitBottomType(BottomType* node) { | |
4847 result_ = | |
4848 dart::Class::Handle(Z, I->object_store()->null_class()).CanonicalType(); | |
Kevin Millikin (Google)
2017/05/03 21:01:06
This is the only interesting code. Is this the ri
regis
2017/05/04 09:35:10
This should be fine.
| |
4849 } | |
4850 | |
4851 | |
4846 const TypeArguments& DartTypeTranslator::TranslateTypeArguments( | 4852 const TypeArguments& DartTypeTranslator::TranslateTypeArguments( |
4847 DartType** dart_types, | 4853 DartType** dart_types, |
4848 intptr_t length) { | 4854 intptr_t length) { |
4849 bool only_dynamic = true; | 4855 bool only_dynamic = true; |
4850 for (intptr_t i = 0; i < length; i++) { | 4856 for (intptr_t i = 0; i < length; i++) { |
4851 if (!dart_types[i]->IsDynamicType()) { | 4857 if (!dart_types[i]->IsDynamicType()) { |
4852 only_dynamic = false; | 4858 only_dynamic = false; |
4853 break; | 4859 break; |
4854 } | 4860 } |
4855 } | 4861 } |
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6865 thread->clear_sticky_error(); | 6871 thread->clear_sticky_error(); |
6866 return error.raw(); | 6872 return error.raw(); |
6867 } | 6873 } |
6868 } | 6874 } |
6869 | 6875 |
6870 | 6876 |
6871 } // namespace kernel | 6877 } // namespace kernel |
6872 } // namespace dart | 6878 } // namespace dart |
6873 | 6879 |
6874 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 6880 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |