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

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

Issue 9863043: Inline checks for super class and interfaces (checked mdoe improvements). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/code_generator_ia32.cc ('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 #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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 ASSERT(is_finalized() || is_prefinalized()); 513 ASSERT(is_finalized() || is_prefinalized());
514 return raw_ptr()->type_arguments_instance_field_offset_; 514 return raw_ptr()->type_arguments_instance_field_offset_;
515 } 515 }
516 void set_type_arguments_instance_field_offset(intptr_t value) const { 516 void set_type_arguments_instance_field_offset(intptr_t value) const {
517 raw_ptr()->type_arguments_instance_field_offset_ = value; 517 raw_ptr()->type_arguments_instance_field_offset_ = value;
518 } 518 }
519 519
520 // The super type of this class, Object type if not explicitly specified. 520 // The super type of this class, Object type if not explicitly specified.
521 RawType* super_type() const { return raw_ptr()->super_type_; } 521 RawType* super_type() const { return raw_ptr()->super_type_; }
522 void set_super_type(const Type& value) const; 522 void set_super_type(const Type& value) const;
523 static intptr_t super_type_offset() {
524 return OFFSET_OF(RawClass, super_type_);
525 }
523 526
524 // Asserts that the class of the super type has been resolved. 527 // Asserts that the class of the super type has been resolved.
525 RawClass* SuperClass() const; 528 RawClass* SuperClass() const;
526 529
527 // Return true if this interface has a factory class. 530 // Return true if this interface has a factory class.
528 bool HasFactoryClass() const; 531 bool HasFactoryClass() const;
529 532
530 // Return true if the factory class of this interface is resolved. 533 // Return true if the factory class of this interface is resolved.
531 bool HasResolvedFactoryClass() const; 534 bool HasResolvedFactoryClass() const;
532 535
533 // Return the resolved factory class of this interface. 536 // Return the resolved factory class of this interface.
534 RawClass* FactoryClass() const; 537 RawClass* FactoryClass() const;
535 538
536 // Return the unresolved factory class of this interface. 539 // Return the unresolved factory class of this interface.
537 RawUnresolvedClass* UnresolvedFactoryClass() const; 540 RawUnresolvedClass* UnresolvedFactoryClass() const;
538 541
539 // Set the resolved or unresolved factory class of this interface. 542 // Set the resolved or unresolved factory class of this interface.
540 void set_factory_class(const Object& value) const; 543 void set_factory_class(const Object& value) const;
541 544
542 // Interfaces is an array of Types. 545 // Interfaces is an array of Types.
543 RawArray* interfaces() const { return raw_ptr()->interfaces_; } 546 RawArray* interfaces() const { return raw_ptr()->interfaces_; }
544 void set_interfaces(const Array& value) const; 547 void set_interfaces(const Array& value) const;
548 static intptr_t interfaces_offset() {
549 return OFFSET_OF(RawClass, interfaces_);
550 }
545 551
546 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; } 552 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; }
547 void set_functions_cache(const Array& value) const; 553 void set_functions_cache(const Array& value) const;
548 554
549 static intptr_t functions_cache_offset() { 555 static intptr_t functions_cache_offset() {
550 return OFFSET_OF(RawClass, functions_cache_); 556 return OFFSET_OF(RawClass, functions_cache_);
551 } 557 }
552 558
553 // Check if this class represents the class of null. 559 // Check if this class represents the class of null.
554 bool IsNullClass() const { return raw() == Object::null_class(); } 560 bool IsNullClass() const { return raw() == Object::null_class(); }
(...skipping 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3902 } 3908 }
3903 3909
3904 3910
3905 intptr_t Stackmap::SizeInBits() const { 3911 intptr_t Stackmap::SizeInBits() const {
3906 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 3912 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
3907 } 3913 }
3908 3914
3909 } // namespace dart 3915 } // namespace dart
3910 3916
3911 #endif // VM_OBJECT_H_ 3917 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698