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

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

Issue 11549027: Fix type test for callable objects (issue 7338). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 | « no previous file | 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"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 604
605 // Check if this class represents the 'dynamic' class. 605 // Check if this class represents the 'dynamic' class.
606 bool IsDynamicClass() const { return id() == kDynamicCid; } 606 bool IsDynamicClass() const { return id() == kDynamicCid; }
607 607
608 // Check if this class represents the 'void' class. 608 // Check if this class represents the 'void' class.
609 bool IsVoidClass() const { return id() == kVoidCid; } 609 bool IsVoidClass() const { return id() == kVoidCid; }
610 610
611 // Check if this class represents the 'Object' class. 611 // Check if this class represents the 'Object' class.
612 bool IsObjectClass() const { return id() == kInstanceCid; } 612 bool IsObjectClass() const { return id() == kInstanceCid; }
613 613
614 // Check if this class represents the 'Function' class.
615 bool IsFunctionClass() const;
616
614 // Check if this class represents the 'List' class. 617 // Check if this class represents the 'List' class.
615 bool IsListClass() const; 618 bool IsListClass() const;
616 619
617 // Check if this class represents a signature class. 620 // Check if this class represents a signature class.
618 bool IsSignatureClass() const { 621 bool IsSignatureClass() const {
619 return signature_function() != Object::null(); 622 return signature_function() != Object::null();
620 } 623 }
621 static bool IsSignatureClass(RawClass* cls) { 624 static bool IsSignatureClass(RawClass* cls) {
622 return cls->ptr()->signature_function_ != Object::null(); 625 return cls->ptr()->signature_function_ != Object::null();
623 } 626 }
(...skipping 5533 matching lines...) Expand 10 before | Expand all | Expand 10 after
6157 6160
6158 6161
6159 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6162 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6160 intptr_t index) { 6163 intptr_t index) {
6161 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6164 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6162 } 6165 }
6163 6166
6164 } // namespace dart 6167 } // namespace dart
6165 6168
6166 #endif // VM_OBJECT_H_ 6169 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698