V8 Project
hydrogen-bce.h
Go to the documentation of this file.
1 // Copyright 2013 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_HYDROGEN_BCE_H_
6 #define V8_HYDROGEN_BCE_H_
7 
8 #include "src/hydrogen.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 
14 class BoundsCheckBbData;
15 class BoundsCheckKey;
16 class BoundsCheckTable : private ZoneHashMap {
17  public:
18  explicit BoundsCheckTable(Zone* zone);
19 
20  INLINE(BoundsCheckBbData** LookupOrInsert(BoundsCheckKey* key, Zone* zone));
21  INLINE(void Insert(BoundsCheckKey* key, BoundsCheckBbData* data, Zone* zone));
22  INLINE(void Delete(BoundsCheckKey* key));
23 
24  private:
26 };
27 
28 
30  public:
32  : HPhase("H_Bounds checks elimination", graph), table_(zone()) { }
33 
34  void Run() {
35  EliminateRedundantBoundsChecks(graph()->entry_block());
36  }
37 
38  private:
39  void EliminateRedundantBoundsChecks(HBasicBlock* bb);
40  BoundsCheckBbData* PreProcessBlock(HBasicBlock* bb);
41  void PostProcessBlock(HBasicBlock* bb, BoundsCheckBbData* data);
42 
44 
46 };
47 
48 
49 } } // namespace v8::internal
50 
51 #endif // V8_HYDROGEN_BCE_H_
INLINE(BoundsCheckBbData **LookupOrInsert(BoundsCheckKey *key, Zone *zone))
INLINE(void Delete(BoundsCheckKey *key))
DISALLOW_COPY_AND_ASSIGN(BoundsCheckTable)
INLINE(void Insert(BoundsCheckKey *key, BoundsCheckBbData *data, Zone *zone))
void PostProcessBlock(HBasicBlock *bb, BoundsCheckBbData *data)
void EliminateRedundantBoundsChecks(HBasicBlock *bb)
BoundsCheckBbData * PreProcessBlock(HBasicBlock *bb)
DISALLOW_COPY_AND_ASSIGN(HBoundsCheckEliminationPhase)
HGraph * graph() const
Definition: hydrogen.h:2802
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20