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

Side by Side Diff: src/compiler/bytecode-liveness-map.h

Issue 2523893003: Reland of [ignition/turbo] Perform liveness analysis on the bytecodes (Closed)
Patch Set: Export handler table for tests Created 4 years 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 | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/bytecode-liveness-map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_BYTECODE_LIVENESS_MAP_H_
6 #define V8_COMPILER_BYTECODE_LIVENESS_MAP_H_
7
8 #include "src/base/hashmap.h"
9 #include "src/bit-vector.h"
10 #include "src/zone/zone.h"
11
12 namespace v8 {
13 namespace internal {
14
15 class Zone;
16
17 namespace compiler {
18
19 struct Liveness {
20 BitVector* in;
21 BitVector* out;
22
23 Liveness(int size, Zone* zone);
24 };
25
26 class V8_EXPORT_PRIVATE BytecodeLivenessMap {
27 public:
28 BytecodeLivenessMap(int size, Zone* zone);
29
30 Liveness& InitializeLiveness(int offset, int size, Zone* zone);
31
32 Liveness& GetLiveness(int offset);
33 const Liveness& GetLiveness(int offset) const;
34
35 BitVector* GetInLiveness(int offset) { return GetLiveness(offset).in; }
36 const BitVector* GetInLiveness(int offset) const {
37 return GetLiveness(offset).in;
38 }
39
40 BitVector* GetOutLiveness(int offset) { return GetLiveness(offset).out; }
41 const BitVector* GetOutLiveness(int offset) const {
42 return GetLiveness(offset).out;
43 }
44
45 private:
46 base::TemplateHashMapImpl<int, Liveness, base::KeyEqualityMatcher<int>,
47 ZoneAllocationPolicy>
48 liveness_map_;
49 };
50
51 } // namespace compiler
52 } // namespace internal
53 } // namespace v8
54
55 #endif // V8_COMPILER_BYTECODE_LIVENESS_MAP_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/bytecode-liveness-map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698