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

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

Issue 8394061: Store IC data instead of array of classes in AST node, so that we can easier access targets and f... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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/compiler.cc ('k') | runtime/vm/ic_data.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 // Class for handling inline cache stubs 4 // Class for handling inline cache stubs
5 5
6 // The caller of an instance function passes the IC-data array in a specific 6 // The caller of an instance function passes the IC-data array in a specific
7 // register (ECX on ia32). 7 // register (ECX on ia32).
8 // That array contains information relevant for the call site: function name and 8 // That array contains information relevant for the call site: function name and
9 // inline cache data. Class ICData is a wrapper around that array. 9 // inline cache data. Class ICData is a wrapper around that array.
10 // The array format is: 10 // The array format is:
(...skipping 23 matching lines...) Expand all
34 class RawString; 34 class RawString;
35 35
36 class ICData : public ValueObject { 36 class ICData : public ValueObject {
37 public: 37 public:
38 // Wrap IC data around 'array'. 38 // Wrap IC data around 'array'.
39 explicit ICData(const Array& array); 39 explicit ICData(const Array& array);
40 40
41 // Create a new array with zero checks. 41 // Create a new array with zero checks.
42 ICData(const String& function_name, intptr_t num_args_checked); 42 ICData(const String& function_name, intptr_t num_args_checked);
43 43
44 void set_data(const Array& data);
44 RawArray* data() const; 45 RawArray* data() const;
45 46
46 RawString* FunctionName() const; 47 RawString* FunctionName() const;
47 48
48 intptr_t NumberOfArgumentsChecked() const; 49 intptr_t NumberOfArgumentsChecked() const;
49 intptr_t NumberOfChecks() const; 50 intptr_t NumberOfChecks() const;
50 51
51 // Also updates the instance call at 'return_address_'. 52 // Also updates the instance call at 'return_address_'.
52 void AddCheck(const GrowableArray<const Class*>& classes, 53 void AddCheck(const GrowableArray<const Class*>& classes,
53 const Function& target); 54 const Function& target);
(...skipping 15 matching lines...) Expand all
69 70
70 const Array* data_; 71 const Array* data_;
71 72
72 73
73 DISALLOW_COPY_AND_ASSIGN(ICData); 74 DISALLOW_COPY_AND_ASSIGN(ICData);
74 }; 75 };
75 76
76 } // namespace dart 77 } // namespace dart
77 78
78 #endif // VM_IC_DATA_H_ 79 #endif // VM_IC_DATA_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/ic_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698