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

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

Issue 1336763002: Last snapshot bits to get working precompiled hello_world on x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 3 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
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_MEGAMORPHIC_CACHE_TABLE_H_ 5 #ifndef VM_MEGAMORPHIC_CACHE_TABLE_H_
6 #define VM_MEGAMORPHIC_CACHE_TABLE_H_ 6 #define VM_MEGAMORPHIC_CACHE_TABLE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 class Array; 12 class Array;
13 class Function; 13 class Function;
14 class ObjectPointerVisitor; 14 class ObjectPointerVisitor;
15 class RawArray; 15 class RawArray;
16 class RawFunction; 16 class RawFunction;
17 class RawCode; 17 class RawCode;
18 class RawMegamorphicCache; 18 class RawMegamorphicCache;
19 class RawString; 19 class RawString;
20 class String; 20 class String;
21 class SnapshotReader;
22 class SnapshotWriter;
21 23
22 class MegamorphicCacheTable { 24 class MegamorphicCacheTable {
23 public: 25 public:
24 MegamorphicCacheTable(); 26 MegamorphicCacheTable();
25 ~MegamorphicCacheTable(); 27 ~MegamorphicCacheTable();
26 28
27 RawFunction* miss_handler() const { return miss_handler_function_; } 29 RawFunction* miss_handler() const { return miss_handler_function_; }
28 void InitMissHandler(); 30 void InitMissHandler();
29 31
30 RawMegamorphicCache* Lookup(const String& name, const Array& descriptor); 32 RawMegamorphicCache* Lookup(const String& name, const Array& descriptor);
31 33
32 void VisitObjectPointers(ObjectPointerVisitor* visitor); 34 void VisitObjectPointers(ObjectPointerVisitor* visitor);
33 35
34 void PrintSizes(); 36 void PrintSizes();
35 37
38 void ReadFrom(SnapshotReader* reader);
39 void WriteTo(SnapshotWriter* writer);
siva 2015/09/14 21:29:34 This change seems to be in the other CL too.
rmacnak 2015/09/15 20:07:45 Dropped.
40
36 private: 41 private:
37 struct Entry { 42 struct Entry {
38 RawString* name; 43 RawString* name;
39 RawArray* descriptor; 44 RawArray* descriptor;
40 RawMegamorphicCache* cache; 45 RawMegamorphicCache* cache;
41 }; 46 };
42 47
43 static const int kCapacityIncrement = 128; 48 static const int kCapacityIncrement = 128;
44 49
45 RawFunction* miss_handler_function_; 50 RawFunction* miss_handler_function_;
46 RawCode* miss_handler_code_; 51 RawCode* miss_handler_code_;
47 intptr_t capacity_; 52 intptr_t capacity_;
48 intptr_t length_; 53 intptr_t length_;
49 Entry* table_; 54 Entry* table_;
50 55
51 DISALLOW_COPY_AND_ASSIGN(MegamorphicCacheTable); 56 DISALLOW_COPY_AND_ASSIGN(MegamorphicCacheTable);
52 }; 57 };
53 58
54 } // namespace dart 59 } // namespace dart
55 60
56 #endif // VM_MEGAMORPHIC_CACHE_TABLE_H_ 61 #endif // VM_MEGAMORPHIC_CACHE_TABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698