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 Instance& closure = Instance::Handle(implicit_static_closure()); | |
4933 if (closure.IsNull()) { | |
siva
2013/09/25 20:17:57
if (implicit_static_closure() != Instance::null())
rmacnak
2013/09/25 21:41:35
Done.
| |
4934 ObjectStore* object_store = Isolate::Current()->object_store(); | |
4935 const Context& context = Context::Handle(object_store->empty_context()); | |
4936 closure ^= Closure::New(*this, context, Heap::kOld); | |
4937 set_implicit_static_closure(closure); | |
4938 } | |
4939 return closure.raw(); | |
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 10198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15139 return "_MirrorReference"; | 15151 return "_MirrorReference"; |
15140 } | 15152 } |
15141 | 15153 |
15142 | 15154 |
15143 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 15155 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
15144 JSONObject jsobj(stream); | 15156 JSONObject jsobj(stream); |
15145 } | 15157 } |
15146 | 15158 |
15147 | 15159 |
15148 } // namespace dart | 15160 } // namespace dart |
OLD | NEW |