Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Unified Diff: src/objects/scope-info-inl.h

Issue 2594663002: objects.h splitting: Split out ScopeInfo + add necessary structures. (Closed)
Patch Set: moar includes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« src/objects/object-macros-undef.h ('K') | « src/objects/scope-info.h ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698