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

Side by Side Diff: src/compiler/context-relaxation.h

Issue 1220823004: [turbofan]: Add a context relaxation Reducer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months 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
OLDNEW
(Empty)
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_CONTEXT_RELAXATION_H_
6 #define V8_COMPILER_CONTEXT_RELAXATION_H_
7
8 #include "src/code-factory.h"
9 #include "src/compiler/graph-reducer.h"
10
11 namespace v8 {
12 namespace internal {
13 namespace compiler {
14
15 // Ensures that operations that only need to access the native context use the
16 // outer-most context rather than the specific context given by the AST graph
17 // builder. The makes it possible to use they operations with context
Michael Starzinger 2015/07/02 10:29:26 nit: s/The/This/ and s/they/these/
18 // specialization (e.g. for generating stubs) without embedding forcing inner
Michael Starzinger 2015/07/02 10:29:26 nit: s/embedding//
19 // contexts to be embedded in generated code thus causing leaks.
20 class ContextRelaxation final : public Reducer {
21 public:
22 explicit ContextRelaxation(Node* start, Node* relaxed_context)
Michael Starzinger 2015/07/02 10:29:26 nit: Doesn't need to be marked "explicit".
23 : start_(start),
24 relaxed_context_(relaxed_context),
25 context_is_wired_(false) {}
26 ~ContextRelaxation() final{};
27
28 Reduction Reduce(Node* node) final;
29
30 private:
31 Node* start_;
32 Node* relaxed_context_;
33 bool context_is_wired_;
34 };
35
36 } // namespace compiler
37 } // namespace internal
38 } // namespace v8
39
40 #endif // V8_COMPILER_CONTEXT_RELAXATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698