mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
deps: backport a6fed7c5 from v8's trunk
This commit is contained in:
8
deps/v8/src/parser.h
vendored
8
deps/v8/src/parser.h
vendored
@@ -426,16 +426,16 @@ class ParserTraits {
|
||||
explicit ParserTraits(Parser* parser) : parser_(parser) {}
|
||||
|
||||
// Custom operations executed when FunctionStates are created and destructed.
|
||||
template<typename FS>
|
||||
static void SetUpFunctionState(FS* function_state, Zone* zone) {
|
||||
template<typename FunctionState>
|
||||
static void SetUpFunctionState(FunctionState* function_state, Zone* zone) {
|
||||
Isolate* isolate = zone->isolate();
|
||||
function_state->isolate_ = isolate;
|
||||
function_state->saved_ast_node_id_ = isolate->ast_node_id();
|
||||
isolate->set_ast_node_id(BailoutId::FirstUsable().ToInt());
|
||||
}
|
||||
|
||||
template<typename FS>
|
||||
static void TearDownFunctionState(FS* function_state) {
|
||||
template<typename FunctionState>
|
||||
static void TearDownFunctionState(FunctionState* function_state) {
|
||||
if (function_state->outer_function_state_ != NULL) {
|
||||
function_state->isolate_->set_ast_node_id(
|
||||
function_state->saved_ast_node_id_);
|
||||
|
||||
8
deps/v8/src/preparser.h
vendored
8
deps/v8/src/preparser.h
vendored
@@ -616,10 +616,10 @@ class PreParserTraits {
|
||||
|
||||
// Custom operations executed when FunctionStates are created and
|
||||
// destructed. (The PreParser doesn't need to do anything.)
|
||||
template<typename FS>
|
||||
static void SetUpFunctionState(FS* function_state, void*) {}
|
||||
template<typename FS>
|
||||
static void TearDownFunctionState(FS* function_state) {}
|
||||
template<typename FunctionState>
|
||||
static void SetUpFunctionState(FunctionState* function_state, void*) {}
|
||||
template<typename FunctionState>
|
||||
static void TearDownFunctionState(FunctionState* function_state) {}
|
||||
|
||||
// Helper functions for recursive descent.
|
||||
static bool IsEvalOrArguments(PreParserIdentifier identifier) {
|
||||
|
||||
Reference in New Issue
Block a user