| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 4910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4921 } | 4921 } |
| 4922 if (num_opt_pos_params > 0) { | 4922 if (num_opt_pos_params > 0) { |
| 4923 pieces.Add(Symbols::RBracket()); | 4923 pieces.Add(Symbols::RBracket()); |
| 4924 } else { | 4924 } else { |
| 4925 pieces.Add(Symbols::RBrace()); | 4925 pieces.Add(Symbols::RBrace()); |
| 4926 } | 4926 } |
| 4927 } | 4927 } |
| 4928 } | 4928 } |
| 4929 | 4929 |
| 4930 | 4930 |
| 4931 RawInstance* Function::ImplicitStaticClosure() const { |
| 4932 if (implicit_static_closure() == Instance::null()) { |
| 4933 ObjectStore* object_store = Isolate::Current()->object_store(); |
| 4934 const Context& context = Context::Handle(object_store->empty_context()); |
| 4935 const Instance& closure = |
| 4936 Instance::Handle(Closure::New(*this, context, Heap::kOld)); |
| 4937 set_implicit_static_closure(closure); |
| 4938 } |
| 4939 return implicit_static_closure(); |
| 4940 } |
| 4941 |
| 4942 |
| 4931 RawString* Function::BuildSignature( | 4943 RawString* Function::BuildSignature( |
| 4932 bool instantiate, | 4944 bool instantiate, |
| 4933 NameVisibility name_visibility, | 4945 NameVisibility name_visibility, |
| 4934 const AbstractTypeArguments& instantiator) const { | 4946 const AbstractTypeArguments& instantiator) const { |
| 4935 const GrowableObjectArray& pieces = | 4947 const GrowableObjectArray& pieces = |
| 4936 GrowableObjectArray::Handle(GrowableObjectArray::New()); | 4948 GrowableObjectArray::Handle(GrowableObjectArray::New()); |
| 4937 String& name = String::Handle(); | 4949 String& name = String::Handle(); |
| 4938 if (!instantiate && !is_static() && (name_visibility == kInternalName)) { | 4950 if (!instantiate && !is_static() && (name_visibility == kInternalName)) { |
| 4939 // Prefix the signature with its signature class and type parameters, if any | 4951 // Prefix the signature with its signature class and type parameters, if any |
| 4940 // (e.g. "Map<K, V>(K) => bool"). In case of a function type alias, the | 4952 // (e.g. "Map<K, V>(K) => bool"). In case of a function type alias, the |
| (...skipping 10212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15153 return "_MirrorReference"; | 15165 return "_MirrorReference"; |
| 15154 } | 15166 } |
| 15155 | 15167 |
| 15156 | 15168 |
| 15157 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 15169 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 15158 JSONObject jsobj(stream); | 15170 JSONObject jsobj(stream); |
| 15159 } | 15171 } |
| 15160 | 15172 |
| 15161 | 15173 |
| 15162 } // namespace dart | 15174 } // namespace dart |
| OLD | NEW |