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

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

Issue 474073002: Revert r39246 which reverted r39101 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | « 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 intptr_t FindFieldIndex(const Field& field) const; 942 intptr_t FindFieldIndex(const Field& field) const;
943 RawField* FieldFromIndex(intptr_t idx) const; 943 RawField* FieldFromIndex(intptr_t idx) const;
944 944
945 // Returns an array of all fields of this class and its superclasses indexed 945 // Returns an array of all fields of this class and its superclasses indexed
946 // by offset in words. 946 // by offset in words.
947 RawArray* OffsetToFieldMap() const; 947 RawArray* OffsetToFieldMap() const;
948 948
949 // Returns true if non-static fields are defined. 949 // Returns true if non-static fields are defined.
950 bool HasInstanceFields() const; 950 bool HasInstanceFields() const;
951 951
952 // TODO(koda): Unite w/ hash table.
952 RawArray* functions() const { return raw_ptr()->functions_; } 953 RawArray* functions() const { return raw_ptr()->functions_; }
953 void SetFunctions(const Array& value) const; 954 void SetFunctions(const Array& value) const;
954 void AddFunction(const Function& function) const; 955 void AddFunction(const Function& function) const;
955 intptr_t FindFunctionIndex(const Function& function) const; 956 intptr_t FindFunctionIndex(const Function& function) const;
956 RawFunction* FunctionFromIndex(intptr_t idx) const; 957 RawFunction* FunctionFromIndex(intptr_t idx) const;
957 intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const; 958 intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const;
958 RawFunction* ImplicitClosureFunctionFromIndex(intptr_t idx) const; 959 RawFunction* ImplicitClosureFunctionFromIndex(intptr_t idx) const;
959 960
960 RawGrowableObjectArray* closures() const { 961 RawGrowableObjectArray* closures() const {
961 return raw_ptr()->closure_functions_; 962 return raw_ptr()->closure_functions_;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 RawObject* canonical_types() const; 1205 RawObject* canonical_types() const;
1205 1206
1206 RawArray* invocation_dispatcher_cache() const; 1207 RawArray* invocation_dispatcher_cache() const;
1207 void set_invocation_dispatcher_cache(const Array& cache) const; 1208 void set_invocation_dispatcher_cache(const Array& cache) const;
1208 RawFunction* CreateInvocationDispatcher(const String& target_name, 1209 RawFunction* CreateInvocationDispatcher(const String& target_name,
1209 const Array& args_desc, 1210 const Array& args_desc,
1210 RawFunction::Kind kind) const; 1211 RawFunction::Kind kind) const;
1211 1212
1212 void CalculateFieldOffsets() const; 1213 void CalculateFieldOffsets() const;
1213 1214
1215 // functions_hash_table is in use iff there are at least this many functions.
1216 static const intptr_t kFunctionLookupHashTreshold = 16;
1217
1214 // Initial value for the cached number of type arguments. 1218 // Initial value for the cached number of type arguments.
1215 static const intptr_t kUnknownNumTypeArguments = -1; 1219 static const intptr_t kUnknownNumTypeArguments = -1;
1216 1220
1217 int16_t num_type_arguments() const { 1221 int16_t num_type_arguments() const {
1218 return raw_ptr()->num_type_arguments_; 1222 return raw_ptr()->num_type_arguments_;
1219 } 1223 }
1220 void set_num_type_arguments(intptr_t value) const; 1224 void set_num_type_arguments(intptr_t value) const;
1221 1225
1222 int16_t num_own_type_arguments() const { 1226 int16_t num_own_type_arguments() const {
1223 return raw_ptr()->num_own_type_arguments_; 1227 return raw_ptr()->num_own_type_arguments_;
(...skipping 6091 matching lines...) Expand 10 before | Expand all | Expand 10 after
7315 7319
7316 7320
7317 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7321 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7318 intptr_t index) { 7322 intptr_t index) {
7319 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7323 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7320 } 7324 }
7321 7325
7322 } // namespace dart 7326 } // namespace dart
7323 7327
7324 #endif // VM_OBJECT_H_ 7328 #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