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

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

Issue 466183002: Use function names as service IDs, rather than indices. (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 | « runtime/bin/vmservice/observatory/test/functions_test.dart ('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"
(...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): Avoid VM service indexing into this array; unite w/ hash table. 952 // TODO(koda): Unite w/ hash table.
953 RawArray* functions() const { return raw_ptr()->functions_; } 953 RawArray* functions() const { return raw_ptr()->functions_; }
954 void SetFunctions(const Array& value) const; 954 void SetFunctions(const Array& value) const;
955 void AddFunction(const Function& function) const; 955 void AddFunction(const Function& function) const;
956 intptr_t FindFunctionIndex(const Function& function) const; 956 intptr_t FindFunctionIndex(const Function& function) const;
957 RawFunction* FunctionFromIndex(intptr_t idx) const; 957 RawFunction* FunctionFromIndex(intptr_t idx) const;
958 intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const; 958 intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const;
959 RawFunction* ImplicitClosureFunctionFromIndex(intptr_t idx) const; 959 RawFunction* ImplicitClosureFunctionFromIndex(intptr_t idx) const;
960 960
961 RawGrowableObjectArray* closures() const { 961 RawGrowableObjectArray* closures() const {
962 return raw_ptr()->closure_functions_; 962 return raw_ptr()->closure_functions_;
(...skipping 6357 matching lines...) Expand 10 before | Expand all | Expand 10 after
7320 7320
7321 7321
7322 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7322 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7323 intptr_t index) { 7323 intptr_t index) {
7324 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7324 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7325 } 7325 }
7326 7326
7327 } // namespace dart 7327 } // namespace dart
7328 7328
7329 #endif // VM_OBJECT_H_ 7329 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/observatory/test/functions_test.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698