// 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/v8.h" #include "src/compiler.h" #include "src/ast-numbering.h" #include "src/bootstrapper.h" #include "src/codegen.h" #include "src/compilation-cache.h" #include "src/compiler/pipeline.h" #include "src/cpu-profiler.h" #include "src/debug.h" #include "src/deoptimizer.h" #include "src/full-codegen.h" #include "src/gdb-jit.h" #include "src/hydrogen.h" #include "src/isolate-inl.h" #include "src/lithium.h" #include "src/liveedit.h" #include "src/messages.h" #include "src/parser.h" #include "src/prettyprinter.h" #include "src/rewriter.h" #include "src/runtime-profiler.h" #include "src/scanner-character-streams.h" #include "src/scopeinfo.h" #include "src/scopes.h" #include "src/typing.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() << ">"; } } ScriptData::ScriptData(const byte* data, int length) : owns_data_(false), rejected_(false), data_(data), length_(length) { if (!IsAligned(reinterpret_cast(data), kPointerAlignment)) { byte* copy = NewArray(length); DCHECK(IsAligned(reinterpret_cast(copy), kPointerAlignment)); CopyBytes(copy, data, length); data_ = copy; AcquireDataOwnership(); } } CompilationInfo::CompilationInfo(Handle