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
8
#include "
src/compiler/operation-typer.h
"
9
#include "
src/compiler/turbofan-graph.h
"
10
11
namespace
v8
{
12
namespace
internal
{
13
14
class
TickCounter;
15
16
namespace
compiler {
17
18
// Forward declarations.
19
class
LoopVariableOptimizer;
20
21
class
V8_EXPORT_PRIVATE
Typer
{
22
public
:
23
enum
Flag
: uint8_t {
24
kNoFlags
= 0,
25
kThisIsReceiver = 1u << 0,
// Parameter this is an Object.
26
kNewTargetIsReceiver = 1u << 1,
// Parameter new.target is an Object.
27
};
28
using
Flags
=
base::Flags<Flag>
;
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
52
Flags
const
flags_
;
53
TFGraph
*
const
graph_
;
54
Decorator
*
decorator_
;
55
TypeCache
const
*
cache_
;
56
JSHeapBroker
*
broker_
;
57
OperationTyper
operation_typer_
;
58
TickCounter
*
const
tick_counter_
;
59
60
Type
singleton_false_
;
61
Type
singleton_true_
;
62
};
63
64
DEFINE_OPERATORS_FOR_FLAGS
(
Typer::Flags
)
65
66
}
// namespace compiler
67
}
// namespace internal
68
}
// namespace v8
69
70
#endif
// V8_COMPILER_TURBOFAN_TYPER_H_
graph
TFGraph * graph
Definition
add-type-assertions-reducer.cc:21
DEFINE_OPERATORS_FOR_FLAGS
#define DEFINE_OPERATORS_FOR_FLAGS(Type)
Definition
flags.h:100
v8::base::Flags< Flag >
v8::internal::TickCounter
Definition
tick-counter.h:23
v8::internal::ZoneVector
Definition
zone-containers.h:53
v8::internal::Zone
Definition
zone.h:43
v8::internal::compiler::JSHeapBroker
Definition
js-heap-broker.h:95
v8::internal::compiler::LoopVariableOptimizer
Definition
loop-variable-optimizer.h:70
v8::internal::compiler::OperationTyper
Definition
operation-typer.h:49
v8::internal::compiler::TFGraph
Definition
turbofan-graph.h:32
v8::internal::compiler::TypeCache
Definition
type-cache.h:18
v8::internal::compiler::Type
Definition
turbofan-types.h:422
v8::internal::compiler::Typer::Decorator
Definition
turbofan-typer.cc:29
v8::internal::compiler::Typer::Visitor
Definition
turbofan-typer.cc:56
v8::internal::compiler::Typer
Definition
turbofan-typer.h:21
v8::internal::compiler::Typer::broker
JSHeapBroker * broker() const
Definition
turbofan-typer.h:50
v8::internal::compiler::Typer::Run
void Run(const ZoneVector< Node * > &roots, LoopVariableOptimizer *induction_vars)
v8::internal::compiler::Typer::cache_
TypeCache const * cache_
Definition
turbofan-typer.h:55
v8::internal::compiler::Typer::flags_
Flags const flags_
Definition
turbofan-typer.h:52
v8::internal::compiler::Typer::Flag
Flag
Definition
turbofan-typer.h:23
v8::internal::compiler::Typer::operation_typer
OperationTyper * operation_typer()
Definition
turbofan-typer.h:49
v8::internal::compiler::Typer::singleton_false_
Type singleton_false_
Definition
turbofan-typer.h:60
v8::internal::compiler::Typer::decorator_
Decorator * decorator_
Definition
turbofan-typer.h:54
v8::internal::compiler::Typer::tick_counter_
TickCounter *const tick_counter_
Definition
turbofan-typer.h:58
v8::internal::compiler::Typer::operation_typer_
OperationTyper operation_typer_
Definition
turbofan-typer.h:57
v8::internal::compiler::Typer::zone
Zone * zone() const
Definition
turbofan-typer.h:48
v8::internal::compiler::Typer::Typer
Typer(const Typer &)=delete
v8::internal::compiler::Typer::graph_
TFGraph *const graph_
Definition
turbofan-typer.h:53
v8::internal::compiler::Typer::flags
Flags flags() const
Definition
turbofan-typer.h:46
v8::internal::compiler::Typer::broker_
JSHeapBroker * broker_
Definition
turbofan-typer.h:56
v8::internal::compiler::Typer::operator=
Typer & operator=(const Typer &)=delete
v8::internal::compiler::Typer::singleton_true_
Type singleton_true_
Definition
turbofan-typer.h:61
v8::internal::compiler::Typer::graph
TFGraph * graph() const
Definition
turbofan-typer.h:47
flags_
JSRegExp::Flags flags_
Definition
compilation-cache-table.cc:221
broker_
JSHeapBroker *const broker_
Definition
compilation-dependencies.cc:497
broker
JSHeapBroker * broker
Definition
graph-builder.cc:68
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::IsolateExecutionModeFlag::kNoFlags
@ kNoFlags
v8
Definition
api-arguments-inl.h:19
operation-typer.h
V8_EXPORT_PRIVATE
#define V8_EXPORT_PRIVATE
Definition
macros.h:460
turbofan-graph.h
graph_
TFGraph * graph_
Definition
wasm-inlining-into-js.cc:372
src
compiler
turbofan-typer.h
Generated on Sun Apr 6 2025 21:08:52 for v8 by
1.12.0