Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: runtime/vm/object.cc

Issue 23452055: Address comments of committed change https://codereview.chromium.org/24397002/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4839 matching lines...) Expand 10 before | Expand all | Expand 10 after
4850 set_implicit_closure_function(closure_function); 4850 set_implicit_closure_function(closure_function);
4851 ASSERT(closure_function.IsImplicitClosureFunction()); 4851 ASSERT(closure_function.IsImplicitClosureFunction());
4852 return closure_function.raw(); 4852 return closure_function.raw();
4853 } 4853 }
4854 4854
4855 4855
4856 RawString* Function::UserVisibleFormalParameters() const { 4856 RawString* Function::UserVisibleFormalParameters() const {
4857 const GrowableObjectArray& pieces = 4857 const GrowableObjectArray& pieces =
4858 GrowableObjectArray::Handle(GrowableObjectArray::New()); 4858 GrowableObjectArray::Handle(GrowableObjectArray::New());
4859 const TypeArguments& instantiator = TypeArguments::Handle(); 4859 const TypeArguments& instantiator = TypeArguments::Handle();
4860 BuildSinatureParameters(false, kUserVisibleName, instantiator, pieces); 4860 BuildSignatureParameters(false, kUserVisibleName, instantiator, pieces);
4861 const Array& strings = Array::Handle(Array::MakeArray(pieces)); 4861 const Array& strings = Array::Handle(Array::MakeArray(pieces));
4862 return String::ConcatAll(strings); 4862 return String::ConcatAll(strings);
4863 } 4863 }
4864 4864
4865 4865
4866 void Function::BuildSinatureParameters( 4866 void Function::BuildSignatureParameters(
4867 bool instantiate, 4867 bool instantiate,
4868 NameVisibility name_visibility, 4868 NameVisibility name_visibility,
4869 const AbstractTypeArguments& instantiator, 4869 const AbstractTypeArguments& instantiator,
4870 const GrowableObjectArray& pieces) const { 4870 const GrowableObjectArray& pieces) const {
4871 AbstractType& param_type = AbstractType::Handle(); 4871 AbstractType& param_type = AbstractType::Handle();
4872 const intptr_t num_params = NumParameters(); 4872 const intptr_t num_params = NumParameters();
4873 const intptr_t num_fixed_params = num_fixed_parameters(); 4873 const intptr_t num_fixed_params = num_fixed_parameters();
4874 const intptr_t num_opt_pos_params = NumOptionalPositionalParameters(); 4874 const intptr_t num_opt_pos_params = NumOptionalPositionalParameters();
4875 const intptr_t num_opt_named_params = NumOptionalNamedParameters(); 4875 const intptr_t num_opt_named_params = NumOptionalNamedParameters();
4876 const intptr_t num_opt_params = num_opt_pos_params + num_opt_named_params; 4876 const intptr_t num_opt_params = num_opt_pos_params + num_opt_named_params;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
4962 pieces.Add(name); 4962 pieces.Add(name);
4963 } 4963 }
4964 if (i < num_type_parameters - 1) { 4964 if (i < num_type_parameters - 1) {
4965 pieces.Add(Symbols::CommaSpace()); 4965 pieces.Add(Symbols::CommaSpace());
4966 } 4966 }
4967 } 4967 }
4968 pieces.Add(Symbols::RAngleBracket()); 4968 pieces.Add(Symbols::RAngleBracket());
4969 } 4969 }
4970 } 4970 }
4971 pieces.Add(Symbols::LParen()); 4971 pieces.Add(Symbols::LParen());
4972 BuildSinatureParameters(instantiate, 4972 BuildSignatureParameters(instantiate,
4973 name_visibility, 4973 name_visibility,
4974 instantiator, 4974 instantiator,
4975 pieces); 4975 pieces);
4976 pieces.Add(Symbols::RParenArrow()); 4976 pieces.Add(Symbols::RParenArrow());
4977 AbstractType& res_type = AbstractType::Handle(result_type()); 4977 AbstractType& res_type = AbstractType::Handle(result_type());
4978 if (instantiate && !res_type.IsInstantiated()) { 4978 if (instantiate && !res_type.IsInstantiated()) {
4979 res_type = res_type.InstantiateFrom(instantiator, NULL); 4979 res_type = res_type.InstantiateFrom(instantiator, NULL);
4980 } 4980 }
4981 name = res_type.BuildName(name_visibility); 4981 name = res_type.BuildName(name_visibility);
4982 pieces.Add(name); 4982 pieces.Add(name);
4983 const Array& strings = Array::Handle(Array::MakeArray(pieces)); 4983 const Array& strings = Array::Handle(Array::MakeArray(pieces));
4984 return Symbols::New(String::Handle(String::ConcatAll(strings))); 4984 return Symbols::New(String::Handle(String::ConcatAll(strings)));
4985 } 4985 }
(...skipping 10167 matching lines...) Expand 10 before | Expand all | Expand 10 after
15153 return "_MirrorReference"; 15153 return "_MirrorReference";
15154 } 15154 }
15155 15155
15156 15156
15157 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 15157 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
15158 JSONObject jsobj(stream); 15158 JSONObject jsobj(stream);
15159 } 15159 }
15160 15160
15161 15161
15162 } // namespace dart 15162 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698