Chromium Code Reviews

Side by Side Diff: src/objects/scope-info-inl.h

Issue 2594663002: objects.h splitting: Split out ScopeInfo + add necessary structures. (Closed)
Patch Set: moar includes Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_OBJECTS_SCOPE_INFO_INL_H_
6 #define V8_OBJECTS_SCOPE_INFO_INL_H_
7
8 #include "src/objects/scope-info.h"
9
10 namespace v8 {
11 namespace internal {
12
13 bool ScopeInfo::IsAsmModule() { return AsmModuleField::decode(Flags()); }
14
15 bool ScopeInfo::IsAsmFunction() { return AsmFunctionField::decode(Flags()); }
16
17 bool ScopeInfo::HasSimpleParameters() {
18 return HasSimpleParametersField::decode(Flags());
19 }
20
21 #define SCOPE_INFO_FIELD_ACCESSORS(name) \
22 void ScopeInfo::Set##name(int value) { set(k##name, Smi::FromInt(value)); } \
23 int ScopeInfo::name() { \
24 if (length() > 0) { \
25 return Smi::cast(get(k##name))->value(); \
26 } else { \
27 return 0; \
28 } \
29 }
30 FOR_EACH_SCOPE_INFO_NUMERIC_FIELD(SCOPE_INFO_FIELD_ACCESSORS)
31 #undef SCOPE_INFO_FIELD_ACCESSORS
32
33 } // namespace internal
34 } // namespace v8
35
36 #endif // V8_OBJECTS_SCOPE_INFO_INL_H
OLDNEW
« 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