// Copyright 2012 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. #include "src/compiler.h" #include #include "src/ast/ast-numbering.h" #include "src/ast/prettyprinter.h" #include "src/ast/scopeinfo.h" #include "src/ast/scopes.h" #include "src/bootstrapper.h" #include "src/codegen.h" #include "src/compilation-cache.h" #include "src/compiler/pipeline.h" #include "src/crankshaft/hydrogen.h" #include "src/crankshaft/lithium.h" #include "src/crankshaft/typing.h" #include "src/debug/debug.h" #include "src/debug/liveedit.h" #include "src/deoptimizer.h" #include "src/full-codegen/full-codegen.h" #include "src/gdb-jit.h" #include "src/interpreter/interpreter.h" #include "src/isolate-inl.h" #include "src/log-inl.h" #include "src/messages.h" #include "src/parsing/parser.h" #include "src/parsing/rewriter.h" #include "src/parsing/scanner-character-streams.h" #include "src/profiler/cpu-profiler.h" #include "src/runtime-profiler.h" #include "src/snapshot/serialize.h" #include "src/vm-state-inl.h" namespace v8 { namespace internal { std::ostream& operator<<(std::ostream& os, const SourcePosition& p) { if (p.IsUnknown()) { return os << ""; } else if (FLAG_hydrogen_track_positions) { return os << "<" << p.inlining_id() << ":" << p.position() << ">"; } else { return os << "<0:" << p.raw() << ">"; } } #define PARSE_INFO_GETTER(type, name) \ type CompilationInfo::name() const { \ CHECK(parse_info()); \ return parse_info()->name(); \ } #define PARSE_INFO_GETTER_WITH_DEFAULT(type, name, def) \ type CompilationInfo::name() const { \ return parse_info() ? parse_info()->name() : def; \ } PARSE_INFO_GETTER(Handle