v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
turbofan-typer.h
Go to the documentation of this file.
1// Copyright 2014 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_TURBOFAN_TYPER_H_
6#define V8_COMPILER_TURBOFAN_TYPER_H_
7
10
11namespace v8 {
12namespace internal {
13
14class TickCounter;
15
16namespace compiler {
17
18// Forward declarations.
19class LoopVariableOptimizer;
20
22 public:
23 enum Flag : uint8_t {
25 kThisIsReceiver = 1u << 0, // Parameter this is an Object.
26 kNewTargetIsReceiver = 1u << 1, // Parameter new.target is an Object.
27 };
29
30 Typer(JSHeapBroker* broker, Flags flags, TFGraph* graph,
31 TickCounter* tick_counter);
32 ~Typer();
33 Typer(const Typer&) = delete;
34 Typer& operator=(const Typer&) = delete;
35
36 void Run();
37 // TODO(bmeurer,jarin): Remove this once we have a notion of "roots" on
38 // TFGraph.
39 void Run(const ZoneVector<Node*>& roots,
40 LoopVariableOptimizer* induction_vars);
41
42 private:
43 class Visitor;
44 class Decorator;
45
46 Flags flags() const { return flags_; }
47 TFGraph* graph() const { return graph_; }
48 Zone* zone() const { return graph()->zone(); }
49 OperationTyper* operation_typer() { return &operation_typer_; }
50 JSHeapBroker* broker() const { return broker_; }
51
59
62};
63
65
66} // namespace compiler
67} // namespace internal
68} // namespace v8
69
70#endif // V8_COMPILER_TURBOFAN_TYPER_H_
TFGraph * graph
#define DEFINE_OPERATORS_FOR_FLAGS(Type)
Definition flags.h:100
JSHeapBroker * broker() const
void Run(const ZoneVector< Node * > &roots, LoopVariableOptimizer *induction_vars)
OperationTyper * operation_typer()
TickCounter *const tick_counter_
Typer(const Typer &)=delete
Typer & operator=(const Typer &)=delete
JSRegExp::Flags flags_
JSHeapBroker *const broker_
JSHeapBroker * broker
#define V8_EXPORT_PRIVATE
Definition macros.h:460
TFGraph * graph_