Index: src/objects/scope-info-inl.h |
diff --git a/src/objects/scope-info-inl.h b/src/objects/scope-info-inl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..41712b6be2b7a3929e0cf2cdbebf208b38686795 |
--- /dev/null |
+++ b/src/objects/scope-info-inl.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 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. |
+ |
+#ifndef V8_OBJECTS_SCOPE_INFO_INL_H_ |
+#define V8_OBJECTS_SCOPE_INFO_INL_H_ |
+ |
+#include "src/objects/scope-info.h" |
+ |
+namespace v8 { |
+namespace internal { |
+ |
+bool ScopeInfo::IsAsmModule() { return AsmModuleField::decode(Flags()); } |
+ |
+bool ScopeInfo::IsAsmFunction() { return AsmFunctionField::decode(Flags()); } |
+ |
+bool ScopeInfo::HasSimpleParameters() { |
+ return HasSimpleParametersField::decode(Flags()); |
+} |
+ |
+#define SCOPE_INFO_FIELD_ACCESSORS(name) \ |
+ void ScopeInfo::Set##name(int value) { set(k##name, Smi::FromInt(value)); } \ |
+ int ScopeInfo::name() { \ |
+ if (length() > 0) { \ |
+ return Smi::cast(get(k##name))->value(); \ |
+ } else { \ |
+ return 0; \ |
+ } \ |
+ } |
+FOR_EACH_SCOPE_INFO_NUMERIC_FIELD(SCOPE_INFO_FIELD_ACCESSORS) |
+#undef SCOPE_INFO_FIELD_ACCESSORS |
+ |
+} // namespace internal |
+} // namespace v8 |
+ |
+#endif // V8_OBJECTS_SCOPE_INFO_INL_H |