blob: 8d6468d4dc05552e3421d949790bfb418eb9f1a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CRANKSHAFT_COMPILATION_PHASE_H_
#define V8_CRANKSHAFT_COMPILATION_PHASE_H_
#include "src/allocation.h"
#include "src/base/platform/elapsed-timer.h"
#include "src/compilation-info.h"
#include "src/zone/zone.h"
namespace v8 {
namespace internal {
class CompilationPhase BASE_EMBEDDED {
public:
CompilationPhase(const char* name, CompilationInfo* info);
~CompilationPhase();
protected:
bool ShouldProduceTraceOutput() const;
const char* name() const { return name_; }
CompilationInfo* info() const { return info_; }
Isolate* isolate() const { return info()->isolate(); }
Zone* zone() { return &zone_; }
private:
const char* name_;
CompilationInfo* info_;
Zone zone_;
size_t info_zone_start_allocation_size_;
base::ElapsedTimer timer_;
DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
};
} // namespace internal
} // namespace v8
#endif // V8_CRANKSHAFT_COMPILATION_PHASE_H_
|