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

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

Issue 2815533003: Refactor AOT deduplication steps so they can run before an app-jit snapshot as well. (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/program_visitor.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 RUNTIME_VM_PROGRAM_VISITOR_H_ 5 #ifndef RUNTIME_VM_PROGRAM_VISITOR_H_
6 #define RUNTIME_VM_PROGRAM_VISITOR_H_ 6 #define RUNTIME_VM_PROGRAM_VISITOR_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 Function; 12 class Function;
13 class Class; 13 class Class;
14 14
15 template <typename T> 15 template <typename T>
16 class Visitor : public ValueObject { 16 class Visitor : public ValueObject {
17 public: 17 public:
18 virtual ~Visitor() {} 18 virtual ~Visitor() {}
19 virtual void Visit(const T& obj) = 0; 19 virtual void Visit(const T& obj) = 0;
20 }; 20 };
21 21
22 typedef Visitor<Function> FunctionVisitor; 22 typedef Visitor<Function> FunctionVisitor;
23 typedef Visitor<Class> ClassVisitor; 23 typedef Visitor<Class> ClassVisitor;
24 24
25 class ProgramVisitor : public AllStatic { 25 class ProgramVisitor : public AllStatic {
26 public: 26 public:
27 static void VisitFunctions(FunctionVisitor* visitor); 27 static void VisitFunctions(FunctionVisitor* visitor);
28 static void VisitClasses(ClassVisitor* visitor); 28 static void VisitClasses(ClassVisitor* visitor);
29
30 static void Dedup();
31
32 private:
33 static void ShareMegamorphicBuckets();
34 static void DedupStackMaps();
35 static void DedupPcDescriptors();
36 static void DedupDeoptEntries();
37 static void DedupCodeSourceMaps();
38 static void DedupLists();
39 static void DedupInstructions();
29 }; 40 };
30 41
31 } // namespace dart 42 } // namespace dart
32 43
33 #endif // RUNTIME_VM_PROGRAM_VISITOR_H_ 44 #endif // RUNTIME_VM_PROGRAM_VISITOR_H_
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/program_visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698