X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/93a3786624b2768d89bfa27e46598dc64e2fb70a..2d39b0e377c0896910ee49ae70082ba665faf986:/parser/SourceProviderCacheItem.h diff --git a/parser/SourceProviderCacheItem.h b/parser/SourceProviderCacheItem.h index 8d35a3d..3962118 100644 --- a/parser/SourceProviderCacheItem.h +++ b/parser/SourceProviderCacheItem.h @@ -34,15 +34,15 @@ namespace JSC { struct SourceProviderCacheItemCreationParameters { - unsigned functionStart; + unsigned functionNameStart; unsigned closeBraceLine; unsigned closeBraceOffset; unsigned closeBraceLineStartOffset; bool needsFullActivation; bool usesEval; bool strictMode; - Vector > usedVariables; - Vector > writtenVariables; + Vector> usedVariables; + Vector> writtenVariables; }; #if COMPILER(MSVC) @@ -53,7 +53,7 @@ struct SourceProviderCacheItemCreationParameters { class SourceProviderCacheItem { WTF_MAKE_FAST_ALLOCATED; public: - static PassOwnPtr create(const SourceProviderCacheItemCreationParameters&); + static std::unique_ptr create(const SourceProviderCacheItemCreationParameters&); ~SourceProviderCacheItem(); JSToken closeBraceToken() const @@ -70,7 +70,7 @@ public: return token; } - unsigned functionStart : 31; + unsigned functionNameStart : 31; bool needsFullActivation : 1; unsigned closeBraceLine : 31; @@ -98,16 +98,16 @@ inline SourceProviderCacheItem::~SourceProviderCacheItem() m_variables[i]->deref(); } -inline PassOwnPtr SourceProviderCacheItem::create(const SourceProviderCacheItemCreationParameters& parameters) +inline std::unique_ptr SourceProviderCacheItem::create(const SourceProviderCacheItemCreationParameters& parameters) { size_t variableCount = parameters.writtenVariables.size() + parameters.usedVariables.size(); size_t objectSize = sizeof(SourceProviderCacheItem) + sizeof(StringImpl*) * variableCount; void* slot = fastMalloc(objectSize); - return adoptPtr(new (slot) SourceProviderCacheItem(parameters)); + return std::unique_ptr(new (slot) SourceProviderCacheItem(parameters)); } inline SourceProviderCacheItem::SourceProviderCacheItem(const SourceProviderCacheItemCreationParameters& parameters) - : functionStart(parameters.functionStart) + : functionNameStart(parameters.functionNameStart) , needsFullActivation(parameters.needsFullActivation) , closeBraceLine(parameters.closeBraceLine) , usesEval(parameters.usesEval)