summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSFunctionInlines.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
commit41386e9cb918eed93b3f13648cbef387e371e451 (patch)
treea97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/runtime/JSFunctionInlines.h
parente15dd966d523731101f70ccf768bba12435a0208 (diff)
downloadWebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSFunctionInlines.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSFunctionInlines.h41
1 files changed, 6 insertions, 35 deletions
diff --git a/Source/JavaScriptCore/runtime/JSFunctionInlines.h b/Source/JavaScriptCore/runtime/JSFunctionInlines.h
index f6c6d58ec..fe4e114ad 100644
--- a/Source/JavaScriptCore/runtime/JSFunctionInlines.h
+++ b/Source/JavaScriptCore/runtime/JSFunctionInlines.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 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,17 +31,11 @@
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, scope->globalObject()->functionStructure())
+ : Base(vm, scope->globalObject()->functionStructure())
, m_executable(vm, this, executable)
- , m_rareData()
+ , m_scope(vm, this, scope)
+ , m_allocationProfileWatchpoint(ClearWatchpoint) // See comment in JSFunction.cpp concerning the reason for using ClearWatchpoint as opposed to IsWatched.
{
}
@@ -57,41 +51,18 @@ inline bool JSFunction::isHostFunction() const
return m_executable->isHostFunction();
}
-inline bool JSFunction::isBuiltinFunction() const
-{
- return !isHostFunction() && jsExecutable()->isBuiltinFunction();
-}
-
-inline bool JSFunction::isHostOrBuiltinFunction() const
-{
- return isHostFunction() || isBuiltinFunction();
-}
-
-inline bool JSFunction::isClassConstructorFunction() const
-{
- return !isHostFunction() && jsExecutable()->isClassConstructorFunction();
-}
-
inline NativeFunction JSFunction::nativeFunction()
{
- ASSERT(isHostFunctionNonInline());
+ ASSERT(isHostFunction());
return static_cast<NativeExecutable*>(m_executable.get())->function();
}
inline NativeFunction JSFunction::nativeConstructor()
{
- ASSERT(isHostFunctionNonInline());
+ ASSERT(isHostFunction());
return static_cast<NativeExecutable*>(m_executable.get())->constructor();
}
-inline bool isHostFunction(JSValue value, NativeFunction nativeFunction)
-{
- JSFunction* function = jsCast<JSFunction*>(getJSFunction(value));
- if (!function || !function->isHostFunction())
- return false;
- return function->nativeFunction() == nativeFunction;
-}
-
} // namespace JSC
#endif // JSFunctionInlines_h