| Index: src/compiler.h
|
| diff --git a/src/compiler.h b/src/compiler.h
|
| index b0c4e11856c3c4721c5a6a44ef31d398101fbf14..58fb16409bddc7d69210a643942a2c597d17e9c7 100644
|
| --- a/src/compiler.h
|
| +++ b/src/compiler.h
|
| @@ -13,7 +13,6 @@ namespace v8 {
|
| namespace internal {
|
|
|
| class AstValueFactory;
|
| -class ScriptData;
|
| class HydrogenCodeStub;
|
|
|
| // ParseRestriction is used to restrict the set of valid statements in a
|
| @@ -35,6 +34,36 @@ struct OffsetRange {
|
| int to;
|
| };
|
|
|
| +
|
| +class ScriptData {
|
| + public:
|
| + ScriptData(const byte* data, int length);
|
| + ~ScriptData() {
|
| + if (owns_data_) DeleteArray(data_);
|
| + }
|
| +
|
| + const byte* data() const { return data_; }
|
| + int length() const { return length_; }
|
| +
|
| + void AcquireDataOwnership() {
|
| + ASSERT(!owns_data_);
|
| + owns_data_ = true;
|
| + }
|
| +
|
| + void ReleaseDataOwnership() {
|
| + ASSERT(owns_data_);
|
| + owns_data_ = false;
|
| + }
|
| +
|
| + private:
|
| + bool owns_data_;
|
| + const byte* data_;
|
| + int length_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScriptData);
|
| +};
|
| +
|
| +
|
| // CompilationInfo encapsulates some information known at compile time. It
|
| // is constructed based on the resources available at compile-time.
|
| class CompilationInfo {
|
| @@ -722,7 +751,6 @@ class CompilationPhase BASE_EMBEDDED {
|
| DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
|
| };
|
|
|
| -
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_COMPILER_H_
|
|
|