Commit a48e5ab8 authored by marja's avatar marja Committed by Commit bot

objects.h splitting: Split out ScopeInfo + add necessary structures.

See tracking bug for more information.

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2594663002
Cr-Commit-Position: refs/heads/master@{#41861}
parent 9feefafa
......@@ -1532,6 +1532,9 @@ v8_source_set("v8_base") {
"src/objects-printer.cc",
"src/objects.cc",
"src/objects.h",
"src/objects/object-macros-undef.h",
"src/objects/object-macros.h",
"src/objects/scope-info.h",
"src/ostreams.cc",
"src/ostreams.h",
"src/parsing/duplicate-finder.cc",
......
......@@ -4,6 +4,8 @@
#include <stdlib.h>
#include "src/objects/scope-info.h"
#include "src/ast/context-slot-cache.h"
#include "src/ast/scopes.h"
#include "src/ast/variables.h"
......
......@@ -21,6 +21,7 @@
#include "src/log.h"
#include "src/msan.h"
#include "src/objects-inl.h"
#include "src/objects/scope-info.h"
#include "src/type-feedback-vector-inl.h"
namespace v8 {
......
......@@ -30,6 +30,7 @@
#include "src/lookup-cache-inl.h"
#include "src/lookup.h"
#include "src/objects.h"
#include "src/objects/scope-info.h"
#include "src/property.h"
#include "src/prototype.h"
#include "src/transitions-inl.h"
......@@ -8060,29 +8061,6 @@ Handle<Object> WeakHashTableShape<entrysize>::AsHandle(Isolate* isolate,
}
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
ACCESSORS(ModuleInfoEntry, export_name, Object, kExportNameOffset)
ACCESSORS(ModuleInfoEntry, local_name, Object, kLocalNameOffset)
ACCESSORS(ModuleInfoEntry, import_name, Object, kImportNameOffset)
......
This diff is collapsed.
// Copyright 2016 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.
#undef DECL_BOOLEAN_ACCESSORS
#undef DECL_INT_ACCESSORS
#undef DECL_ACCESSORS
#undef DECLARE_CAST
// Copyright 2016 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.
// Note 1: Any file that includes this one should include object-macros-undef.h
// at the bottom.
// Note 2: This file is deliberately missing the include guards (the undeffing
// approach wouldn't work otherwise).
#define DECL_BOOLEAN_ACCESSORS(name) \
inline bool name() const; \
inline void set_##name(bool value);
#define DECL_INT_ACCESSORS(name) \
inline int name() const; \
inline void set_##name(int value);
#define DECL_ACCESSORS(name, type) \
inline type* name() const; \
inline void set_##name(type* value, \
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
#define DECLARE_CAST(type) \
INLINE(static type* cast(Object* object)); \
INLINE(static const type* cast(const Object* object));
This diff is collapsed.
......@@ -1069,6 +1069,9 @@
'objects-printer.cc',
'objects.cc',
'objects.h',
'objects/object-macros.h',
'objects/object-macros-undef.h',
'objects/scope-info.h',
'ostreams.cc',
'ostreams.h',
'parsing/duplicate-finder.cc',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment