| 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/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 12192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12203 // name, so we explicitly prevent lookup of private names here. | 12203 // name, so we explicitly prevent lookup of private names here. |
| 12204 if (is_setter_name) { | 12204 if (is_setter_name) { |
| 12205 String& setter_name = | 12205 String& setter_name = |
| 12206 String::Handle(Z, Field::SetterName(extractor_name)); | 12206 String::Handle(Z, Field::SetterName(extractor_name)); |
| 12207 obj = prefix.LookupObject(setter_name); | 12207 obj = prefix.LookupObject(setter_name); |
| 12208 } | 12208 } |
| 12209 if (obj.IsNull()) { | 12209 if (obj.IsNull()) { |
| 12210 obj = prefix.LookupObject(extractor_name); | 12210 obj = prefix.LookupObject(extractor_name); |
| 12211 } | 12211 } |
| 12212 } | 12212 } |
| 12213 if (!prefix.is_loaded() && (parsed_function() != NULL)) { | 12213 if (!prefix.is_loaded() && (parsed_function() != NULL) && |
| 12214 !FLAG_load_deferred_eagerly) { |
| 12214 // Remember that this function depends on an import prefix of an | 12215 // Remember that this function depends on an import prefix of an |
| 12215 // unloaded deferred library. | 12216 // unloaded deferred library. |
| 12216 parsed_function()->AddDeferredPrefix(prefix); | 12217 parsed_function()->AddDeferredPrefix(prefix); |
| 12217 } | 12218 } |
| 12218 | 12219 |
| 12219 if (obj.IsFunction()) { | 12220 if (obj.IsFunction()) { |
| 12220 const Function& func = Function::Cast(obj); | 12221 const Function& func = Function::Cast(obj); |
| 12221 if (!func.IsSetterFunction() || is_setter_name) { | 12222 if (!func.IsSetterFunction() || is_setter_name) { |
| 12222 return CreateImplicitClosureNode(func, property_pos, NULL); | 12223 return CreateImplicitClosureNode(func, property_pos, NULL); |
| 12223 } | 12224 } |
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14025 String::Handle(Z, redirect_type.UserVisibleName()).ToCString()); | 14026 String::Handle(Z, redirect_type.UserVisibleName()).ToCString()); |
| 14026 } | 14027 } |
| 14027 } | 14028 } |
| 14028 if (!redirect_type.HasResolvedTypeClass()) { | 14029 if (!redirect_type.HasResolvedTypeClass()) { |
| 14029 // If the redirection type is unresolved, we convert the allocation | 14030 // If the redirection type is unresolved, we convert the allocation |
| 14030 // into throwing a type error. | 14031 // into throwing a type error. |
| 14031 const UnresolvedClass& cls = | 14032 const UnresolvedClass& cls = |
| 14032 UnresolvedClass::Handle(Z, redirect_type.unresolved_class()); | 14033 UnresolvedClass::Handle(Z, redirect_type.unresolved_class()); |
| 14033 const LibraryPrefix& prefix = | 14034 const LibraryPrefix& prefix = |
| 14034 LibraryPrefix::Handle(Z, cls.library_prefix()); | 14035 LibraryPrefix::Handle(Z, cls.library_prefix()); |
| 14035 if (!prefix.IsNull() && !prefix.is_loaded()) { | 14036 if (!prefix.IsNull() && !prefix.is_loaded() && |
| 14037 !FLAG_load_deferred_eagerly) { |
| 14036 // If the redirection type is unresolved because it refers to | 14038 // If the redirection type is unresolved because it refers to |
| 14037 // an unloaded deferred prefix, mark this function as depending | 14039 // an unloaded deferred prefix, mark this function as depending |
| 14038 // on the library prefix. It will then get invalidated when the | 14040 // on the library prefix. It will then get invalidated when the |
| 14039 // prefix is loaded. | 14041 // prefix is loaded. |
| 14040 parsed_function()->AddDeferredPrefix(prefix); | 14042 parsed_function()->AddDeferredPrefix(prefix); |
| 14041 } | 14043 } |
| 14042 redirect_type = ClassFinalizer::NewFinalizedMalformedType( | 14044 redirect_type = ClassFinalizer::NewFinalizedMalformedType( |
| 14043 Error::Handle(Z), | 14045 Error::Handle(Z), |
| 14044 script_, | 14046 script_, |
| 14045 call_pos, | 14047 call_pos, |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15085 const ArgumentListNode& function_args, | 15087 const ArgumentListNode& function_args, |
| 15086 const LocalVariable* temp_for_last_arg, | 15088 const LocalVariable* temp_for_last_arg, |
| 15087 bool is_super_invocation) { | 15089 bool is_super_invocation) { |
| 15088 UNREACHABLE(); | 15090 UNREACHABLE(); |
| 15089 return NULL; | 15091 return NULL; |
| 15090 } | 15092 } |
| 15091 | 15093 |
| 15092 } // namespace dart | 15094 } // namespace dart |
| 15093 | 15095 |
| 15094 #endif // DART_PRECOMPILED_RUNTIME | 15096 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |