| Index: src/utils.h
|
| diff --git a/src/utils.h b/src/utils.h
|
| index f116c14db3f4a00b7109ed6f131c4fcbd198b169..5ca68f6d64a5231bc74033cf1c7b7939ed8f280d 100644
|
| --- a/src/utils.h
|
| +++ b/src/utils.h
|
| @@ -980,6 +980,48 @@ class EnumSet {
|
| T bits_;
|
| };
|
|
|
| +
|
| +class TypeFeedbackId {
|
| + public:
|
| + explicit TypeFeedbackId(int id) : id_(id) { }
|
| + int ToInt() const { return id_; }
|
| +
|
| + static TypeFeedbackId None() { return TypeFeedbackId(kNoneId); }
|
| + bool IsNone() const { return id_ == kNoneId; }
|
| +
|
| + private:
|
| + static const int kNoneId = -1;
|
| +
|
| + int id_;
|
| +};
|
| +
|
| +
|
| +class BailoutId {
|
| + public:
|
| + explicit BailoutId(int id) : id_(id) { }
|
| + int ToInt() const { return id_; }
|
| +
|
| + static BailoutId None() { return BailoutId(kNoneId); }
|
| + static BailoutId FunctionEntry() { return BailoutId(kFunctionEntryId); }
|
| + static BailoutId Declarations() { return BailoutId(kDeclarationsId); }
|
| +
|
| + bool IsNone() const { return id_ == kNoneId; }
|
| + bool operator==(const BailoutId& other) const { return id_ == other.id_; }
|
| +
|
| + private:
|
| + static const int kNoneId = -1;
|
| +
|
| + // Using 0 could disguise errors.
|
| + static const int kFunctionEntryId = 2;
|
| +
|
| + // This AST id identifies the point after the declarations have been visited.
|
| + // We need it to capture the environment effects of declarations that emit
|
| + // code (function declarations).
|
| + static const int kDeclarationsId = 3;
|
| +
|
| + int id_;
|
| +};
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_UTILS_H_
|
|
|