1 // Copyright 2015 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_PARSING_EXPRESSION_SCOPE_REPARENTER_H_
6 #define V8_PARSING_EXPRESSION_SCOPE_REPARENTER_H_
7 
8 #include <stdint.h>
9 
10 namespace v8 {
11 namespace internal {
12 
13 class Expression;
14 class Scope;
15 
16 // When an extra declaration scope needs to be inserted to account for
17 // a sloppy eval in a default parameter or function body, the expressions
18 // needs to be in that new inner scope which was added after initial
19 // parsing.
20 //
21 // scope is the new inner scope, and its outer_scope() is assumed
22 // to be the scope which was used during the initial parse.
23 void ReparentExpressionScope(uintptr_t stack_limit, Expression* expr,
24                              Scope* scope);
25 
26 }  // namespace internal
27 }  // namespace v8
28 
29 #endif  // V8_PARSING_EXPRESSION_SCOPE_REPARENTER_H_
30