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

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

Issue 8347008: Address review comments of previously submitted cl 8329005. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 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
« no previous file with comments | « runtime/vm/code_generator_ia32.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/dart.h" 9 #include "vm/dart.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 // If this class is parameterized, each instance has a type_arguments field. 419 // If this class is parameterized, each instance has a type_arguments field.
420 intptr_t NumTypeArguments() const; 420 intptr_t NumTypeArguments() const;
421 static const intptr_t kNoTypeArguments = -1; 421 static const intptr_t kNoTypeArguments = -1;
422 intptr_t type_arguments_instance_field_offset() const { 422 intptr_t type_arguments_instance_field_offset() const {
423 ASSERT(is_finalized() || is_prefinalized()); 423 ASSERT(is_finalized() || is_prefinalized());
424 return raw_ptr()->type_arguments_instance_field_offset_; 424 return raw_ptr()->type_arguments_instance_field_offset_;
425 } 425 }
426 void set_type_arguments_instance_field_offset(intptr_t value) const { 426 void set_type_arguments_instance_field_offset(intptr_t value) const {
427 raw_ptr()->type_arguments_instance_field_offset_ = value; 427 raw_ptr()->type_arguments_instance_field_offset_ = value;
428 } 428 }
429 bool HasTypeArguments() const {
430 if (is_finalized() || is_prefinalized()) {
431 // More efficient than calling NumTypeArguments().
432 return type_arguments_instance_field_offset() != kNoTypeArguments;
433 } else {
434 // No need to check NumTypeArguments() if class has type parameters.
435 return (NumTypeParameters() > 0) || (NumTypeArguments() > 0);
436 }
437 }
429 438
430 // The super type of this class, Object type if not explicitly specified. 439 // The super type of this class, Object type if not explicitly specified.
431 RawType* super_type() const { return raw_ptr()->super_type_; } 440 RawType* super_type() const { return raw_ptr()->super_type_; }
432 void set_super_type(const Type& value) const; 441 void set_super_type(const Type& value) const;
433 442
434 // Asserts that the class of the super type has been resolved. 443 // Asserts that the class of the super type has been resolved.
435 RawClass* SuperClass() const; 444 RawClass* SuperClass() const;
436 445
437 // The factory type of this interface, null if not specified. 446 // The factory type of this interface, null if not specified.
438 RawType* factory_type() const { return raw_ptr()->factory_type_; } 447 RawType* factory_type() const { return raw_ptr()->factory_type_; }
(...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 } 2877 }
2869 2878
2870 2879
2871 void Context::SetAt(intptr_t index, const Instance& value) const { 2880 void Context::SetAt(intptr_t index, const Instance& value) const {
2872 StorePointer(InstanceAddr(index), value.raw()); 2881 StorePointer(InstanceAddr(index), value.raw());
2873 } 2882 }
2874 2883
2875 } // namespace dart 2884 } // namespace dart
2876 2885
2877 #endif // VM_OBJECT_H_ 2886 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698