Chromium Code Reviews| Index: src/compiler/js-context-relaxation.h |
| diff --git a/src/compiler/js-context-relaxation.h b/src/compiler/js-context-relaxation.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e300de913780912edbf4172424079434a7fd4e35 |
| --- /dev/null |
| +++ b/src/compiler/js-context-relaxation.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2014 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_COMPILER_JS_CONTEXT_RELAXATION_H_ |
| +#define V8_COMPILER_JS_CONTEXT_RELAXATION_H_ |
| + |
| +#include "src/code-factory.h" |
|
Michael Starzinger
2015/07/20 08:09:49
nit: The code-factory include shouldn't be necessa
danno
2015/07/20 15:27:33
Done
|
| +#include "src/compiler/graph-reducer.h" |
| + |
| +namespace v8 { |
| +namespace internal { |
| +namespace compiler { |
| + |
| +// Ensures that operations that only need to access the native context use the |
| +// outer-most context rather than the specific context given by the AST graph |
| +// builder. This makes it possible to use they operations with context |
|
Michael Starzinger
2015/07/20 08:09:49
nit: s/they/these/
danno
2015/07/20 15:27:33
Done
|
| +// specialization (e.g. for generating stubs) without forcing inner contexts to |
| +// be embedded in generated code thus causing leaks. |
|
Michael Starzinger
2015/07/20 08:09:49
nit: ... and potentially using the wrong native co
danno
2015/07/20 15:27:33
Done
|
| +class JSContextRelaxation final : public Reducer { |
| + public: |
| + JSContextRelaxation() {} |
| + ~JSContextRelaxation() final {} |
| + |
| + Reduction Reduce(Node* node) final; |
| +}; |
| + |
| +} // namespace compiler |
| +} // namespace internal |
| +} // namespace v8 |
| + |
| +#endif // V8_COMPILER_JS_CONTEXT_RELAXATION_H_ |