// 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/bootstrapper.h" #include "src/codegen.h" #include "src/compilation-cache.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/parser.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 { ScriptData::ScriptData(const byte* data, int length) : owns_data_(false), data_(data), length_(length) { if (!IsAligned(reinterpret_cast(data), kPointerAlignment)) { byte* copy = NewArray(length); ASSERT(IsAligned(reinterpret_cast(copy), kPointerAlignment)); CopyBytes(copy, data, length); data_ = copy; AcquireDataOwnership(); } } CompilationInfo::CompilationInfo(Handle