X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/runtime/JSFunctionInlines.h diff --git a/runtime/JSFunctionInlines.h b/runtime/JSFunctionInlines.h index ad5b56b..f6c6d58 100644 --- a/runtime/JSFunctionInlines.h +++ b/runtime/JSFunctionInlines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,11 +31,17 @@ namespace JSC { +inline JSFunction* JSFunction::createWithInvalidatedReallocationWatchpoint( + VM& vm, FunctionExecutable* executable, JSScope* scope) +{ + ASSERT(executable->singletonFunction()->hasBeenInvalidated()); + return createImpl(vm, executable, scope); +} + inline JSFunction::JSFunction(VM& vm, FunctionExecutable* executable, JSScope* scope) - : Base(vm, scope->globalObject()->functionStructure()) + : Base(vm, scope, scope->globalObject()->functionStructure()) , m_executable(vm, this, executable) - , m_scope(vm, this, scope) - , m_allocationProfileWatchpoint(ClearWatchpoint) // See comment in JSFunction.cpp concerning the reason for using ClearWatchpoint as opposed to IsWatched. + , m_rareData() { } @@ -61,6 +67,11 @@ inline bool JSFunction::isHostOrBuiltinFunction() const return isHostFunction() || isBuiltinFunction(); } +inline bool JSFunction::isClassConstructorFunction() const +{ + return !isHostFunction() && jsExecutable()->isClassConstructorFunction(); +} + inline NativeFunction JSFunction::nativeFunction() { ASSERT(isHostFunctionNonInline());