Source code

Revision control

Other Tools

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* vim: set ts=8 sts=2 et sw=2 tw=80:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at */
#ifndef vm_ObjectGroup_h
#define vm_ObjectGroup_h
#include "jsfriendapi.h"
#include "ds/IdValuePair.h"
#include "gc/Allocator.h"
#include "gc/Barrier.h"
#include "gc/GCProbes.h"
#include "js/CharacterEncoding.h"
#include "js/GCHashTable.h"
#include "js/TypeDecls.h"
#include "js/UbiNode.h"
#include "vm/TaggedProto.h"
namespace js {
class PlainObject;
* The NewObjectKind allows an allocation site to specify the lifetime
* requirements that must be fixed at allocation time.
enum NewObjectKind {
/* This is the default. Most objects are generic. */
* Objects which will not benefit from being allocated in the nursery
* (e.g. because they are known to have a long lifetime) may be allocated
* with this kind to place them immediately into the tenured generation.
PlainObject* NewPlainObjectWithProperties(JSContext* cx,
IdValuePair* properties,
size_t nproperties,
NewObjectKind newKind);
} // namespace js
#endif /* vm_ObjectGroup_h */