-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=259384 rdar://112637340 Reviewed by Devin Rousso and Darin Adler. It makes sizeof(JSON::Value) optimized, and wipe all virtual functions for that. We would like to use this class more widely, for easy-to-use JSON without any JSC contexts. One target is many toolings, and for example, JSC bytecode profiler is now using this. * Source/WTF/wtf/JSONValues.cpp: (WTF::JSONImpl::Value::visitDerived): (WTF::JSONImpl::Value::visitDerived const): (WTF::JSONImpl::Value::operator delete): (WTF::JSONImpl::Value::asObject): (WTF::JSONImpl::Value::asObject const): (WTF::JSONImpl::Value::asArray): (WTF::JSONImpl::Value::writeJSON const): (WTF::JSONImpl::Value::writeJSONImpl const): (WTF::JSONImpl::Value::memoryCost const): (WTF::JSONImpl::Value::memoryCostImpl const): (WTF::JSONImpl::ObjectBase::memoryCostImpl const): (WTF::JSONImpl::ObjectBase::writeJSONImpl const): (WTF::JSONImpl::ArrayBase::writeJSONImpl const): (WTF::JSONImpl::ArrayBase::memoryCostImpl const): (WTF::JSONImpl::ObjectBase::~ObjectBase): Deleted. (WTF::JSONImpl::ObjectBase::asObject): Deleted. (WTF::JSONImpl::ObjectBase::asObject const): Deleted. (WTF::JSONImpl::ObjectBase::memoryCost const): Deleted. (WTF::JSONImpl::ObjectBase::writeJSON const): Deleted. (WTF::JSONImpl::ArrayBase::~ArrayBase): Deleted. (WTF::JSONImpl::ArrayBase::asArray): Deleted. (WTF::JSONImpl::ArrayBase::writeJSON const): Deleted. (WTF::JSONImpl::ArrayBase::memoryCost const): Deleted. * Source/WTF/wtf/JSONValues.h: Canonical link: https://commits.webkit.org/266204@main
- Loading branch information
1 parent
6881e7b
commit 1e2385d
Showing
3 changed files
with
156 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.