Commit c53f9f97 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[compile] Remove AST numbering

Bug: v8:7178
Change-Id: Ib86942acff8419699d739c6fb28479613b04e745
Reviewed-on: https://chromium-review.googlesource.com/878179
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50846}
parent 71f758a2
......@@ -1236,8 +1236,6 @@ v8_source_set("v8_base") {
"src/assert-scope.h",
"src/ast/ast-function-literal-id-reindexer.cc",
"src/ast/ast-function-literal-id-reindexer.h",
"src/ast/ast-numbering.cc",
"src/ast/ast-numbering.h",
"src/ast/ast-source-ranges.h",
"src/ast/ast-traversal-visitor.h",
"src/ast/ast-value-factory.cc",
......
......@@ -564,8 +564,6 @@
'../src/assert-scope.cc',
'../src/ast/ast-function-literal-id-reindexer.cc',
'../src/ast/ast-function-literal-id-reindexer.h',
'../src/ast/ast-numbering.cc',
'../src/ast/ast-numbering.h',
'../src/ast/ast-source-ranges.h',
'../src/ast/ast-traversal-visitor.h',
'../src/ast/ast-value-factory.cc',
......
This diff is collapsed.
// 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_AST_AST_NUMBERING_H_
#define V8_AST_AST_NUMBERING_H_
#include <stdint.h>
namespace v8 {
namespace internal {
// Forward declarations.
class FunctionLiteral;
class Isolate;
class Zone;
namespace AstNumbering {
// Assign bailout IDs, and generator suspend IDs to an AST node tree; perform
// catch prediction for TryStatements.
bool Renumber(uintptr_t stack_limit, Zone* zone, FunctionLiteral* function);
} // namespace AstNumbering
// Some details on suspend IDs
// -------------------------
//
// In order to assist Ignition in generating bytecode for a generator function,
// we assign a unique number (the suspend ID) to each Suspend node in its AST.
// We also annotate loops with the number of suspends they contain
// (loop.suspend_count) and the smallest ID of those (loop.first_suspend_id),
// and we annotate the function itself with the number of suspends it contains
// (function.suspend_count).
//
// The way in which we choose the IDs is simply by enumerating the Suspend
// nodes.
// Ignition relies on the following properties:
// - For each loop l and each suspend y of l:
// l.first_suspend_id <=
// s.suspend_id < l.first_suspend_id + l.suspend_count
// - For the generator function f itself and each suspend s of f:
// 0 <= s.suspend_id < f.suspend_count
} // namespace internal
} // namespace v8
#endif // V8_AST_AST_NUMBERING_H_
......@@ -10,7 +10,6 @@
#include "src/api.h"
#include "src/asmjs/asm-js.h"
#include "src/assembler-inl.h"
#include "src/ast/ast-numbering.h"
#include "src/ast/prettyprinter.h"
#include "src/ast/scopes.h"
#include "src/base/optional.h"
......@@ -370,16 +369,6 @@ CompilationJob::Status FinalizeUnoptimizedCompilationJob(CompilationJob* job,
return status;
}
bool Renumber(ParseInfo* parse_info) {
RuntimeCallTimerScope runtimeTimer(
parse_info->runtime_call_stats(),
parse_info->on_background_thread()
? RuntimeCallCounterId::kCompileBackgroundRenumber
: RuntimeCallCounterId::kCompileRenumber);
return AstNumbering::Renumber(parse_info->stack_limit(), parse_info->zone(),
parse_info->literal());
}
std::unique_ptr<CompilationJob> PrepareAndExecuteUnoptimizedCompileJobs(
ParseInfo* parse_info, FunctionLiteral* literal,
AccountingAllocator* allocator, CompilationJobList* inner_function_jobs) {
......@@ -867,7 +856,6 @@ bool Compiler::Analyze(ParseInfo* parse_info) {
: RuntimeCallCounterId::kCompileAnalyse);
if (!Rewriter::Rewrite(parse_info)) return false;
DeclarationScope::Analyze(parse_info);
if (!Renumber(parse_info)) return false;
return true;
}
......
......@@ -71,7 +71,7 @@ class V8_EXPORT_PRIVATE Compiler : public AllStatic {
static bool ParseAndAnalyze(ParseInfo* parse_info,
Handle<SharedFunctionInfo> shared_info,
Isolate* isolate);
// Rewrite, analyze scopes, and renumber.
// Rewrite and analyze scopes.
static bool Analyze(ParseInfo* parse_info);
// ===========================================================================
......
......@@ -795,7 +795,6 @@ class RuntimeCallTimer final {
V(CompileBackgroundEval) \
V(CompileBackgroundIgnition) \
V(CompileBackgroundScript) \
V(CompileBackgroundRenumber) \
V(CompileBackgroundRewriteReturnResult) \
V(CompileBackgroundScopeAnalysis) \
V(CompileDeserialize) \
......@@ -805,7 +804,6 @@ class RuntimeCallTimer final {
V(CompileGetFromOptimizedCodeMap) \
V(CompileIgnition) \
V(CompileIgnitionFinalization) \
V(CompileRenumber) \
V(CompileRewriteReturnResult) \
V(CompileScopeAnalysis) \
V(CompileScript) \
......
......@@ -5,7 +5,6 @@
#include "test/cctest/compiler/function-tester.h"
#include "src/api.h"
#include "src/ast/ast-numbering.h"
#include "src/compilation-info.h"
#include "src/compiler.h"
#include "src/compiler/linkage.h"
......
......@@ -34,7 +34,6 @@
#include "src/v8.h"
#include "src/api.h"
#include "src/ast/ast-numbering.h"
#include "src/ast/ast-value-factory.h"
#include "src/ast/ast.h"
#include "src/compiler.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment