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

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

Issue 24395007: Improve NoSuchMethodError error messages (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
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 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 const AbstractTypeArguments& instantiator, 1409 const AbstractTypeArguments& instantiator,
1410 NameVisibility name_visibility) const { 1410 NameVisibility name_visibility) const {
1411 const bool instantiate = true; 1411 const bool instantiate = true;
1412 return BuildSignature(instantiate, name_visibility, instantiator); 1412 return BuildSignature(instantiate, name_visibility, instantiator);
1413 } 1413 }
1414 1414
1415 // Returns true if the signature of this function is instantiated, i.e. if it 1415 // Returns true if the signature of this function is instantiated, i.e. if it
1416 // does not involve generic parameter types or generic result type. 1416 // does not involve generic parameter types or generic result type.
1417 bool HasInstantiatedSignature() const; 1417 bool HasInstantiatedSignature() const;
1418 1418
1419 // Build a string of the form 'T, {b: B, c: C} representing the user
1420 // visible parameter types of the function.
1421 RawString* UserVisibleParameterSignature() const;
regis 2013/09/24 01:10:24 How about UserVisibleFormalParameters?
hausner 2013/09/24 16:17:09 Much better. Done.
1422
1419 RawClass* Owner() const; 1423 RawClass* Owner() const;
1420 RawClass* origin() const; 1424 RawClass* origin() const;
1421 RawScript* script() const; 1425 RawScript* script() const;
1422 1426
1423 RawAbstractType* result_type() const { return raw_ptr()->result_type_; } 1427 RawAbstractType* result_type() const { return raw_ptr()->result_type_; }
1424 void set_result_type(const AbstractType& value) const; 1428 void set_result_type(const AbstractType& value) const;
1425 1429
1426 RawAbstractType* ParameterTypeAt(intptr_t index) const; 1430 RawAbstractType* ParameterTypeAt(intptr_t index) const;
1427 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const; 1431 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const;
1428 RawArray* parameter_types() const { return raw_ptr()->parameter_types_; } 1432 RawArray* parameter_types() const { return raw_ptr()->parameter_types_; }
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 void set_is_external(bool value) const; 1860 void set_is_external(bool value) const;
1857 void set_parent_function(const Function& value) const; 1861 void set_parent_function(const Function& value) const;
1858 void set_owner(const Object& value) const; 1862 void set_owner(const Object& value) const;
1859 RawFunction* implicit_closure_function() const; 1863 RawFunction* implicit_closure_function() const;
1860 void set_implicit_closure_function(const Function& value) const; 1864 void set_implicit_closure_function(const Function& value) const;
1861 void set_num_optional_parameters(intptr_t value) const; // Encoded value. 1865 void set_num_optional_parameters(intptr_t value) const; // Encoded value.
1862 void set_kind_tag(intptr_t value) const; 1866 void set_kind_tag(intptr_t value) const;
1863 void set_data(const Object& value) const; 1867 void set_data(const Object& value) const;
1864 static RawFunction* New(); 1868 static RawFunction* New();
1865 1869
1870 void ParameterSignatureHelper(
regis 2013/09/24 01:10:24 The term ParameterSignature could mean other thing
hausner 2013/09/24 16:17:09 How about BuildSinatureParameters (the parameter p
1871 bool instantiate,
1872 NameVisibility name_visibility,
1873 const AbstractTypeArguments& instantiator,
1874 const GrowableObjectArray& pieces) const;
1866 RawString* BuildSignature(bool instantiate, 1875 RawString* BuildSignature(bool instantiate,
1867 NameVisibility name_visibility, 1876 NameVisibility name_visibility,
1868 const AbstractTypeArguments& instantiator) const; 1877 const AbstractTypeArguments& instantiator) const;
1869 1878
1870 // Check the subtype or 'more specific' relationship. 1879 // Check the subtype or 'more specific' relationship.
1871 bool TypeTest(TypeTestKind test_kind, 1880 bool TypeTest(TypeTestKind test_kind,
1872 const AbstractTypeArguments& type_arguments, 1881 const AbstractTypeArguments& type_arguments,
1873 const Function& other, 1882 const Function& other,
1874 const AbstractTypeArguments& other_type_arguments, 1883 const AbstractTypeArguments& other_type_arguments,
1875 Error* bound_error) const; 1884 Error* bound_error) const;
(...skipping 4304 matching lines...) Expand 10 before | Expand all | Expand 10 after
6180 6189
6181 6190
6182 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6191 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6183 intptr_t index) { 6192 intptr_t index) {
6184 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6193 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6185 } 6194 }
6186 6195
6187 } // namespace dart 6196 } // namespace dart
6188 6197
6189 #endif // VM_OBJECT_H_ 6198 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/lib/errors_patch.dart ('k') | runtime/vm/object.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698