| Index: src/compilation-info.cc
|
| diff --git a/src/compilation-info.cc b/src/compilation-info.cc
|
| index 2e0934a2cd0bbe1eac727c6d5c011743d9b57f21..5790a462a8ff0d375d79cc9127d328c39bea8d0e 100644
|
| --- a/src/compilation-info.cc
|
| +++ b/src/compilation-info.cc
|
| @@ -24,13 +24,26 @@ namespace internal {
|
| return parse_info() ? parse_info()->name() : def; \
|
| }
|
|
|
| +#define PARSE_INFO_GETTER_AND_SETTER(type, name, def) \
|
| + type CompilationInfo::name() const { \
|
| + return parse_info() ? parse_info()->name() : def; \
|
| + } \
|
| + \
|
| + void CompilationInfo::set_##name() { \
|
| + CHECK(parse_info()); \
|
| + parse_info()->set_##name(); \
|
| + }
|
| +
|
| PARSE_INFO_GETTER(Handle<Script>, script)
|
| PARSE_INFO_GETTER(FunctionLiteral*, literal)
|
| PARSE_INFO_GETTER_WITH_DEFAULT(DeclarationScope*, scope, nullptr)
|
| PARSE_INFO_GETTER(Handle<SharedFunctionInfo>, shared_info)
|
| +PARSE_INFO_GETTER_AND_SETTER(bool, is_debug, false)
|
| +PARSE_INFO_GETTER_AND_SETTER(bool, will_serialize, false)
|
|
|
| #undef PARSE_INFO_GETTER
|
| #undef PARSE_INFO_GETTER_WITH_DEFAULT
|
| +#undef PARSE_INFO_GETTER_AND_SETTER
|
|
|
| bool CompilationInfo::has_shared_info() const {
|
| return parse_info_ && !parse_info_->shared_info().is_null();
|
|
|