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

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

Issue 19200002: Change resolving of instance methods to check early for name mismatch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/flow_graph_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | 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 #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"
11 #include "vm/json_stream.h" 11 #include "vm/json_stream.h"
12 #include "vm/bitmap.h" 12 #include "vm/bitmap.h"
13 #include "vm/dart.h" 13 #include "vm/dart.h"
14 #include "vm/globals.h" 14 #include "vm/globals.h"
15 #include "vm/handles.h" 15 #include "vm/handles.h"
16 #include "vm/heap.h" 16 #include "vm/heap.h"
17 #include "vm/isolate.h" 17 #include "vm/isolate.h"
18 #include "vm/os.h" 18 #include "vm/os.h"
19 #include "vm/raw_object.h" 19 #include "vm/raw_object.h"
20 #include "vm/scanner.h" 20 #include "vm/scanner.h"
21 21
22 namespace dart { 22 namespace dart {
23 23
24 // Forward declarations. 24 // Forward declarations.
25 #define DEFINE_FORWARD_DECLARATION(clazz) \ 25 #define DEFINE_FORWARD_DECLARATION(clazz) \
26 class clazz; 26 class clazz;
27 CLASS_LIST(DEFINE_FORWARD_DECLARATION) 27 CLASS_LIST(DEFINE_FORWARD_DECLARATION)
28 #undef DEFINE_FORWARD_DECLARATION 28 #undef DEFINE_FORWARD_DECLARATION
29 class Api; 29 class Api;
30 class ArgumentsDescriptor;
30 class Assembler; 31 class Assembler;
31 class Closure; 32 class Closure;
32 class Code; 33 class Code;
33 class DeoptInstr; 34 class DeoptInstr;
34 class FinalizablePersistentHandle; 35 class FinalizablePersistentHandle;
35 class LocalScope; 36 class LocalScope;
36 class ReusableHandleScope; 37 class ReusableHandleScope;
37 class Symbols; 38 class Symbols;
38 39
39 #if defined(DEBUG) 40 #if defined(DEBUG)
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 1630
1630 bool is_intrinsic() const { 1631 bool is_intrinsic() const {
1631 return IntrinsicBit::decode(raw_ptr()->kind_tag_); 1632 return IntrinsicBit::decode(raw_ptr()->kind_tag_);
1632 } 1633 }
1633 void set_is_intrinsic(bool value) const; 1634 void set_is_intrinsic(bool value) const;
1634 1635
1635 bool HasOptimizedCode() const; 1636 bool HasOptimizedCode() const;
1636 1637
1637 // Returns true if the argument counts are valid for calling this function. 1638 // Returns true if the argument counts are valid for calling this function.
1638 // Otherwise, it returns false and the reason (if error_message is not NULL). 1639 // Otherwise, it returns false and the reason (if error_message is not NULL).
1639 bool AreValidArgumentCounts(int num_arguments, 1640 bool AreValidArgumentCounts(intptr_t num_arguments,
1640 int num_named_arguments, 1641 intptr_t num_named_arguments,
1641 String* error_message) const; 1642 String* error_message) const;
1642 1643
1643 // Returns true if the total argument count and the names of optional 1644 // Returns true if the total argument count and the names of optional
1644 // arguments are valid for calling this function. 1645 // arguments are valid for calling this function.
1645 // Otherwise, it returns false and the reason (if error_message is not NULL). 1646 // Otherwise, it returns false and the reason (if error_message is not NULL).
1646 bool AreValidArguments(int num_arguments, 1647 bool AreValidArguments(intptr_t num_arguments,
1647 const Array& argument_names, 1648 const Array& argument_names,
1648 String* error_message) const; 1649 String* error_message) const;
1650 bool AreValidArguments(const ArgumentsDescriptor& args_desc,
1651 String* error_message) const;
1649 1652
1650 // Fully qualified name uniquely identifying the function under gdb and during 1653 // Fully qualified name uniquely identifying the function under gdb and during
1651 // ast printing. The special ':' character, if present, is replaced by '_'. 1654 // ast printing. The special ':' character, if present, is replaced by '_'.
1652 const char* ToFullyQualifiedCString() const; 1655 const char* ToFullyQualifiedCString() const;
1653 1656
1654 // Returns true if this function has parameters that are compatible with the 1657 // Returns true if this function has parameters that are compatible with the
1655 // parameters of the other function in order for this function to override the 1658 // parameters of the other function in order for this function to override the
1656 // other function. Parameter types are ignored. 1659 // other function. Parameter types are ignored.
1657 bool HasCompatibleParametersWith(const Function& other) const; 1660 bool HasCompatibleParametersWith(const Function& other) const;
1658 1661
(...skipping 4343 matching lines...) Expand 10 before | Expand all | Expand 10 after
6002 6005
6003 6006
6004 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6007 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6005 intptr_t index) { 6008 intptr_t index) {
6006 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6009 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6007 } 6010 }
6008 6011
6009 } // namespace dart 6012 } // namespace dart
6010 6013
6011 #endif // VM_OBJECT_H_ 6014 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698