Ignore:
Timestamp:
Sep 9, 2017, 9:21:45 AM (8 years ago)
Author:
[email protected]
Message:

Avoid duplicate computations of ExecState::vm().
https://bugs.webkit.org/show_bug.cgi?id=176647

Reviewed by Saam Barati.

Source/JavaScriptCore:

Because while computing ExecState::vm() is cheap, it is not free.

This patch also:

  1. gets rids of some convenience methods in CallFrame that implicitly does a ExecState::vm() computation. This minimizes the chance of us accidentally computing ExecState::vm() more than necessary.
  2. passes vm (when available) to methodTable().
  3. passes vm (when available) to JSLockHolder.
  • API/JSBase.cpp:

(JSCheckScriptSyntax):
(JSGarbageCollect):
(JSReportExtraMemoryCost):
(JSSynchronousGarbageCollectForDebugging):
(JSSynchronousEdenCollectForDebugging):

  • API/JSCallbackConstructor.h:

(JSC::JSCallbackConstructor::create):

  • API/JSCallbackObject.h:

(JSC::JSCallbackObject::create):

  • API/JSContext.mm:

(-[JSContext setException:]):

  • API/JSContextRef.cpp:

(JSContextGetGlobalObject):
(JSContextCreateBacktrace):

  • API/JSManagedValue.mm:

(-[JSManagedValue value]):

  • API/JSObjectRef.cpp:

(JSObjectMake):
(JSObjectMakeFunctionWithCallback):
(JSObjectMakeConstructor):
(JSObjectMakeFunction):
(JSObjectSetPrototype):
(JSObjectHasProperty):
(JSObjectGetProperty):
(JSObjectSetProperty):
(JSObjectSetPropertyAtIndex):
(JSObjectDeleteProperty):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
(JSObjectIsFunction):
(JSObjectCallAsFunction):
(JSObjectCallAsConstructor):
(JSObjectCopyPropertyNames):
(JSPropertyNameAccumulatorAddName):

  • API/JSScriptRef.cpp:
  • API/JSTypedArray.cpp:

(JSValueGetTypedArrayType):
(JSObjectMakeTypedArrayWithArrayBuffer):
(JSObjectMakeTypedArrayWithArrayBufferAndOffset):
(JSObjectGetTypedArrayBytesPtr):
(JSObjectGetTypedArrayBuffer):
(JSObjectMakeArrayBufferWithBytesNoCopy):
(JSObjectGetArrayBufferBytesPtr):

  • API/JSWeakObjectMapRefPrivate.cpp:
  • API/JSWrapperMap.mm:

(constructorHasInstance):
(makeWrapper):

  • API/ObjCCallbackFunction.mm:

(objCCallbackFunctionForInvocation):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::jettison):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::addConstant):
(JSC::CodeBlock::replaceConstant):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeFor):

  • dfg/DFGDesiredWatchpoints.cpp:

(JSC::DFG::ArrayBufferViewWatchpointAdaptor::add):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::globalThisObjectFor):

  • dfg/DFGOperations.cpp:
  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileFTLOSRExit):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):

  • heap/GCAssertions.h:
  • inspector/InjectedScriptHost.cpp:

(Inspector::InjectedScriptHost::wrapper):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::subtype):
(Inspector::constructInternalProperty):
(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::JSInjectedScriptHost::weakMapEntries):
(Inspector::JSInjectedScriptHost::weakSetEntries):
(Inspector::JSInjectedScriptHost::iteratorEntries):

  • inspector/JSJavaScriptCallFrame.cpp:

(Inspector::valueForScopeLocation):
(Inspector::JSJavaScriptCallFrame::scopeDescriptions):
(Inspector::toJS):

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::extractSourceInformationFromException):
(Inspector::createScriptArguments):

  • interpreter/CachedCall.h:

(JSC::CachedCall::CachedCall):

  • interpreter/CallFrame.h:

(JSC::ExecState::atomicStringTable const): Deleted.
(JSC::ExecState::propertyNames const): Deleted.
(JSC::ExecState::emptyList const): Deleted.
(JSC::ExecState::interpreter): Deleted.
(JSC::ExecState::heap): Deleted.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeModuleProgram):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JITOperations.cpp:
  • jit/JITWorklist.cpp:

(JSC::JITWorklist::compileNow):

  • jsc.cpp:

(WTF::RuntimeArray::create):
(WTF::RuntimeArray::getOwnPropertySlot):
(WTF::DOMJITGetter::DOMJITAttribute::slowCall):
(WTF::DOMJITFunctionObject::unsafeFunction):
(WTF::DOMJITCheckSubClassObject::unsafeFunction):
(GlobalObject::moduleLoaderFetch):
(functionDumpCallFrame):
(functionCreateRoot):
(functionGetElement):
(functionSetElementRoot):
(functionCreateSimpleObject):
(functionSetHiddenValue):
(functionCreateProxy):
(functionCreateImpureGetter):
(functionCreateCustomGetterObject):
(functionCreateDOMJITNodeObject):
(functionCreateDOMJITGetterObject):
(functionCreateDOMJITGetterComplexObject):
(functionCreateDOMJITFunctionObject):
(functionCreateDOMJITCheckSubClassObject):
(functionGCAndSweep):
(functionFullGC):
(functionEdenGC):
(functionHeapSize):
(functionShadowChickenFunctionsOnStack):
(functionSetGlobalConstRedeclarationShouldNotThrow):
(functionJSCOptions):
(functionFailNextNewCodeBlock):
(functionMakeMasquerader):
(functionDumpTypesForAllVariables):
(functionFindTypeForExpression):
(functionReturnTypeFor):
(functionDumpBasicBlockExecutionRanges):
(functionBasicBlockExecutionCount):
(functionDrainMicrotasks):
(functionGenerateHeapSnapshot):
(functionEnsureArrayStorage):
(functionStartSamplingProfiler):
(runInteractive):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • parser/ModuleAnalyzer.cpp:

(JSC::ModuleAnalyzer::ModuleAnalyzer):

  • profiler/ProfilerBytecode.cpp:

(JSC::Profiler::Bytecode::toJS const):

  • profiler/ProfilerBytecodeSequence.cpp:

(JSC::Profiler::BytecodeSequence::addSequenceProperties const):

  • profiler/ProfilerBytecodes.cpp:

(JSC::Profiler::Bytecodes::toJS const):

  • profiler/ProfilerCompilation.cpp:

(JSC::Profiler::Compilation::toJS const):

  • profiler/ProfilerCompiledBytecode.cpp:

(JSC::Profiler::CompiledBytecode::toJS const):

  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::toJS const):

  • profiler/ProfilerEvent.cpp:

(JSC::Profiler::Event::toJS const):

  • profiler/ProfilerOSRExit.cpp:

(JSC::Profiler::OSRExit::toJS const):

  • profiler/ProfilerOrigin.cpp:

(JSC::Profiler::Origin::toJS const):

  • profiler/ProfilerProfiledBytecodes.cpp:

(JSC::Profiler::ProfiledBytecodes::toJS const):

  • runtime/AbstractModuleRecord.cpp:

(JSC::identifierToJSValue):
(JSC::AbstractModuleRecord::resolveExportImpl):
(JSC::getExportedNames):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):

  • runtime/BooleanConstructor.cpp:

(JSC::constructBooleanFromImmediateBoolean):

  • runtime/CallData.cpp:

(JSC::call):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/Completion.cpp:

(JSC::checkSyntax):
(JSC::evaluate):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):
(JSC::importModule):

  • runtime/ConstructData.cpp:

(JSC::construct):

  • runtime/DatePrototype.cpp:

(JSC::dateProtoFuncToJSON):

  • runtime/DirectArguments.h:

(JSC::DirectArguments::length const):

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

  • runtime/ErrorPrototype.cpp:

(JSC::errorProtoFuncToString):

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError):
(JSC::errorDescriptionForValue):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::getOwnPropertyNames):

  • runtime/IdentifierInlines.h:

(JSC::Identifier::add):

  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::create):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::finishCreation):
(JSC::InternalFunction::createSubclassStructureSlow):

  • runtime/JSArray.cpp:

(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnNonIndexPropertyNames):
(JSC::JSArray::isIteratorProtocolFastAndNonObservable):

  • runtime/JSArray.h:

(JSC::JSArray::shiftCountForShift):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::dumpForBacktrace const):

  • runtime/JSDataView.cpp:

(JSC::JSDataView::getOwnPropertySlot):
(JSC::JSDataView::deleteProperty):
(JSC::JSDataView::getOwnNonIndexPropertyNames):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::reifyName):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

  • runtime/JSInternalPromise.cpp:

(JSC::JSInternalPromise::then):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::deleteProperty):

  • runtime/JSMap.cpp:

(JSC::JSMap::isIteratorProtocolFastAndNonObservable):

  • runtime/JSMapIterator.h:

(JSC::JSMapIterator::advanceIter):

  • runtime/JSModuleEnvironment.cpp:

(JSC::JSModuleEnvironment::getOwnNonIndexPropertyNames):

  • runtime/JSModuleLoader.cpp:

(JSC::printableModuleKey):
(JSC::JSModuleLoader::provide):
(JSC::JSModuleLoader::loadAndEvaluateModule):
(JSC::JSModuleLoader::loadModule):
(JSC::JSModuleLoader::linkAndEvaluateModule):
(JSC::JSModuleLoader::requestImportModule):

  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::evaluate):

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::appendNextProperty):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
(JSC::JSObject::putByIndex):
(JSC::JSObject::ordinaryToPrimitive const):
(JSC::JSObject::toPrimitive const):
(JSC::JSObject::hasInstance):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
(JSC::getCustomGetterSetterFunctionForGetterSetter):
(JSC::JSObject::getOwnPropertyDescriptor):
(JSC::JSObject::getMethod):

  • runtime/JSObject.h:

(JSC::JSObject::createRawObject):
(JSC::JSFinalObject::create):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):
(JSC::JSObject::putInlineForJSObject):
(JSC::JSObject::hasOwnProperty const):

  • runtime/JSScope.cpp:

(JSC::isUnscopable):
(JSC::JSScope::resolveScopeForHoistingFuncDeclInEval):

  • runtime/JSSet.cpp:

(JSC::JSSet::isIteratorProtocolFastAndNonObservable):

  • runtime/JSSetIterator.h:

(JSC::JSSetIterator::advanceIter):

  • runtime/JSString.cpp:

(JSC::JSString::getStringPropertyDescriptor):

  • runtime/JSString.h:

(JSC::JSString::getStringPropertySlot):

  • runtime/MapConstructor.cpp:

(JSC::constructMap):

  • runtime/ModuleProgramExecutable.cpp:

(JSC::ModuleProgramExecutable::create):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncToLocaleString):

  • runtime/ProgramExecutable.h:
  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::deleteProperty):
(JSC::RegExpObject::getOwnNonIndexPropertyNames):
(JSC::RegExpObject::getPropertyNames):
(JSC::RegExpObject::getGenericPropertyNames):
(JSC::RegExpObject::put):

  • runtime/ScopedArguments.h:

(JSC::ScopedArguments::length const):

  • runtime/StrictEvalActivation.h:

(JSC::StrictEvalActivation::create):

  • runtime/StringObject.cpp:

(JSC::isStringOwnProperty):
(JSC::StringObject::deleteProperty):
(JSC::StringObject::getOwnNonIndexPropertyNames):

  • tools/JSDollarVMPrototype.cpp:

(JSC::JSDollarVMPrototype::gc):
(JSC::JSDollarVMPrototype::edenGC):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::evaluate):

Source/WebCore:

No new tests because this is only a refactoring patch. There is no
significant behavior change.

  • Modules/mediastream/SDPProcessor.cpp:

(WebCore::SDPProcessor::callScript const):

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::QuickTimePluginReplacement::installReplacement):

  • bindings/js/JSCallbackData.cpp:

(WebCore::JSCallbackData::invokeCallback):

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::constructCustomElementSynchronously):
(WebCore::JSCustomElementInterface::upgradeElement):
(WebCore::JSCustomElementInterface::invokeCallback):

  • bindings/js/JSDOMConvertRecord.h:
  • bindings/js/JSDOMMapLike.h:

(WebCore::forwardSizeToMapLike):
(WebCore::forwardEntriesToMapLike):
(WebCore::forwardKeysToMapLike):
(WebCore::forwardValuesToMapLike):
(WebCore::forwardGetToMapLike):
(WebCore::forwardHasToMapLike):

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
(WebCore::addCrossOriginWindowOwnPropertyNames):

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::reportMemoryForDocumentIfFrameless):

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::getOwnPropertySlotCommon):
(WebCore::putCommon):
(WebCore::addCrossOriginLocationPropertyNames):
(WebCore::addCrossOriginLocationOwnPropertyNames):
(WebCore::JSLocation::defineOwnProperty):
(WebCore::JSLocationPrototype::put):
(WebCore::JSLocationPrototype::defineOwnProperty):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSInterfaceName.cpp:

(WebCore::setJSInterfaceNameConstructor):

  • bindings/scripts/test/JS/JSMapLike.cpp:

(WebCore::setJSMapLikeConstructor):

  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:

(WebCore::setJSReadOnlyMapLikeConstructor):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::setJSTestActiveDOMObjectConstructor):

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:

(WebCore::setJSTestCEReactionsConstructor):

  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:

(WebCore::setJSTestCEReactionsStringifierConstructor):

  • bindings/scripts/test/JS/JSTestCallTracer.cpp:

(WebCore::setJSTestCallTracerConstructor):

  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:

(WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
(WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):

  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:

(WebCore::setJSTestDOMJITConstructor):

  • bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:

(WebCore::setJSTestEnabledBySettingConstructor):

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::setJSTestEventConstructorConstructor):

  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::setJSTestEventTargetConstructor):

  • bindings/scripts/test/JS/JSTestException.cpp:

(WebCore::setJSTestExceptionConstructor):

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::setJSTestGenerateIsReachableConstructor):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::setJSTestGlobalObjectConstructor):

  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:

(WebCore::setJSTestIndexedSetterNoIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:

(WebCore::setJSTestIndexedSetterThrowingExceptionConstructor):

  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:

(WebCore::setJSTestIndexedSetterWithIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::setJSTestInterfaceConstructor):

  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:

(WebCore::setJSTestInterfaceLeadingUnderscoreConstructor):

  • bindings/scripts/test/JS/JSTestIterable.cpp:

(WebCore::setJSTestIterableConstructor):

  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:

(WebCore::setJSTestJSBuiltinConstructorConstructor):

  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:

(WebCore::setJSTestMediaQueryListListenerConstructor):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:

(WebCore::setJSTestNamedAndIndexedSetterNoIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:

(WebCore::setJSTestNamedAndIndexedSetterThrowingExceptionConstructor):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:

(WebCore::setJSTestNamedAndIndexedSetterWithIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::setJSTestNamedConstructorConstructor):

  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:

(WebCore::setJSTestNamedDeleterNoIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:

(WebCore::setJSTestNamedDeleterThrowingExceptionConstructor):

  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:

(WebCore::setJSTestNamedDeleterWithIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:

(WebCore::setJSTestNamedDeleterWithIndexedGetterConstructor):

  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:

(WebCore::setJSTestNamedGetterCallWithConstructor):

  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:

(WebCore::setJSTestNamedGetterNoIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:

(WebCore::setJSTestNamedGetterWithIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:

(WebCore::setJSTestNamedSetterNoIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:

(WebCore::setJSTestNamedSetterThrowingExceptionConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:

(WebCore::setJSTestNamedSetterWithIdentifierConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:

(WebCore::setJSTestNamedSetterWithIndexedGetterConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:

(WebCore::setJSTestNamedSetterWithIndexedGetterAndSetterConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:

(WebCore::setJSTestNamedSetterWithOverrideBuiltinsConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:

(WebCore::setJSTestNamedSetterWithUnforgablePropertiesConstructor):

  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:

(WebCore::setJSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::setJSTestNodeConstructor):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::setJSTestObjConstructor):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::setJSTestOverloadedConstructorsConstructor):

  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:

(WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor):

  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:

(WebCore::setJSTestOverrideBuiltinsConstructor):

  • bindings/scripts/test/JS/JSTestPluginInterface.cpp:

(WebCore::setJSTestPluginInterfaceConstructor):

  • bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:

(WebCore::setJSTestPromiseRejectionEventConstructor):

  • bindings/scripts/test/JS/JSTestSerialization.cpp:

(WebCore::setJSTestSerializationConstructor):

  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:

(WebCore::setJSTestSerializationIndirectInheritanceConstructor):

  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:

(WebCore::setJSTestSerializationInheritConstructor):

  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:

(WebCore::setJSTestSerializationInheritFinalConstructor):

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::setJSTestSerializedScriptValueInterfaceConstructor):

  • bindings/scripts/test/JS/JSTestStringifier.cpp:

(WebCore::setJSTestStringifierConstructor):

  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:

(WebCore::setJSTestStringifierAnonymousOperationConstructor):

  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:

(WebCore::setJSTestStringifierNamedOperationConstructor):

  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:

(WebCore::setJSTestStringifierOperationImplementedAsConstructor):

  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:

(WebCore::setJSTestStringifierOperationNamedToStringConstructor):

  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:

(WebCore::setJSTestStringifierReadOnlyAttributeConstructor):

  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:

(WebCore::setJSTestStringifierReadWriteAttributeConstructor):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::setJSTestTypedefsConstructor):

  • bridge/NP_jsobject.cpp:

(_NPN_SetProperty):
(_NPN_RemoveProperty):
(_NPN_Enumerate):

  • bridge/c/c_instance.cpp:

(JSC::Bindings::CRuntimeMethod::create):

  • bridge/objc/WebScriptObject.mm:

(-[WebScriptObject setValue:forKey:]):
(-[WebScriptObject removeWebScriptKey:]):
(-[WebScriptObject setWebScriptValueAtIndex:value:]):

  • bridge/objc/objc_instance.mm:

(ObjCRuntimeMethod::create):

  • bridge/objc/objc_runtime.h:

(JSC::Bindings::ObjcFallbackObjectImp::create):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::getOwnPropertyNames):
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::put):

  • bridge/runtime_array.h:

(JSC::RuntimeArray::create):

  • bridge/runtime_method.cpp:

(JSC::RuntimeMethod::getOwnPropertySlot):

  • bridge/runtime_method.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateCaptionContainer):
(WebCore::HTMLMediaElement::setControllerJSProperty):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):

  • testing/Internals.cpp:

(WebCore::Internals::cloneArrayBuffer):

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPMethod.h:

(WebKit::JSNPMethod::create):

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::setProperty):
(WebKit::NPJSObject::removeProperty):
(WebKit::NPJSObject::enumerate):

Source/WebKitLegacy/mac:

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::invokeDefault):
(WebKit::NetscapePluginInstanceProxy::construct):
(WebKit::NetscapePluginInstanceProxy::setProperty):
(WebKit::NetscapePluginInstanceProxy::removeProperty):
(WebKit::NetscapePluginInstanceProxy::enumerate):

  • Plugins/Hosted/ProxyInstance.mm:

(WebKit::ProxyRuntimeMethod::create):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r221417 r221822  
    430430        JSGlobalObject* globalObject = exec->lexicalGlobalObject();
    431431        Structure* structure = createStructure(vm, globalObject, createPrototype(vm, globalObject));
    432         RuntimeArray* runtimeArray = new (NotNull, allocateCell<RuntimeArray>(*exec->heap())) RuntimeArray(exec, structure);
     432        RuntimeArray* runtimeArray = new (NotNull, allocateCell<RuntimeArray>(vm.heap)) RuntimeArray(exec, structure);
    433433        runtimeArray->finishCreation(exec);
    434434        vm.heap.addFinalizer(runtimeArray, destroy);
     
    447447    static bool getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    448448    {
     449        VM& vm = exec->vm();
    449450        RuntimeArray* thisObject = jsCast<RuntimeArray*>(object);
    450         if (propertyName == exec->propertyNames().length) {
     451        if (propertyName == vm.propertyNames->length) {
    451452            slot.setCacheableCustom(thisObject, DontDelete | ReadOnly | DontEnum, thisObject->lengthGetter);
    452453            return true;
     
    666667        static EncodedJSValue JIT_OPERATION slowCall(ExecState* exec, void* pointer)
    667668        {
    668             NativeCallFrameTracer tracer(&exec->vm(), exec);
     669            VM& vm = exec->vm();
     670            NativeCallFrameTracer tracer(&vm, exec);
    669671            return JSValue::encode(jsNumber(static_cast<DOMJITGetter*>(pointer)->value()));
    670672        }
     
    856858    static EncodedJSValue JIT_OPERATION unsafeFunction(ExecState* exec, DOMJITNode* node)
    857859    {
    858         NativeCallFrameTracer tracer(&exec->vm(), exec);
     860        VM& vm = exec->vm();
     861        NativeCallFrameTracer tracer(&vm, exec);
    859862        return JSValue::encode(jsNumber(node->value()));
    860863    }
     
    929932    static EncodedJSValue JIT_OPERATION unsafeFunction(ExecState* exec, DOMJITNode* node)
    930933    {
    931         NativeCallFrameTracer tracer(&exec->vm(), exec);
     934        VM& vm = exec->vm();
     935        NativeCallFrameTracer tracer(&vm, exec);
    932936        return JSValue::encode(jsNumber(node->value()));
    933937    }
     
    18121816        return deferred->reject(exec, createError(exec, makeString("Could not open file '", moduleKey, "'.")));
    18131817
    1814     auto result = deferred->resolve(exec, JSSourceCode::create(exec->vm(), makeSource(stringFromUTF(utf8), SourceOrigin { moduleKey }, moduleKey, TextPosition(), SourceProviderSourceType::Module)));
     1818    auto result = deferred->resolve(exec, JSSourceCode::create(vm, makeSource(stringFromUTF(utf8), SourceOrigin { moduleKey }, moduleKey, TextPosition(), SourceProviderSourceType::Module)));
    18151819    scope.releaseAssertNoException();
    18161820    return result;
     
    18541858EncodedJSValue JSC_HOST_CALL functionDumpCallFrame(ExecState* exec)
    18551859{
    1856     VMEntryFrame* topVMEntryFrame = exec->vm().topVMEntryFrame;
     1860    VM& vm = exec->vm();
     1861    VMEntryFrame* topVMEntryFrame = vm.topVMEntryFrame;
    18571862    ExecState* callerFrame = exec->callerFrame(topVMEntryFrame);
    18581863    if (callerFrame)
    1859         exec->vm().interpreter->dumpCallFrame(callerFrame);
     1864        vm.interpreter->dumpCallFrame(callerFrame);
    18601865    return JSValue::encode(jsUndefined());
    18611866}
     
    19341939EncodedJSValue JSC_HOST_CALL functionCreateRoot(ExecState* exec)
    19351940{
    1936     JSLockHolder lock(exec);
    1937     return JSValue::encode(Root::create(exec->vm(), exec->lexicalGlobalObject()));
     1941    VM& vm = exec->vm();
     1942    JSLockHolder lock(vm);
     1943    return JSValue::encode(Root::create(vm, exec->lexicalGlobalObject()));
    19381944}
    19391945
     
    19521958EncodedJSValue JSC_HOST_CALL functionGetElement(ExecState* exec)
    19531959{
    1954     JSLockHolder lock(exec);
    1955     VM& vm = exec->vm();
     1960    VM& vm = exec->vm();
     1961    JSLockHolder lock(vm);
    19561962    Root* root = jsDynamicCast<Root*>(vm, exec->argument(0));
    19571963    if (!root)
     
    19631969EncodedJSValue JSC_HOST_CALL functionSetElementRoot(ExecState* exec)
    19641970{
    1965     JSLockHolder lock(exec);
    1966     VM& vm = exec->vm();
     1971    VM& vm = exec->vm();
     1972    JSLockHolder lock(vm);
    19671973    Element* element = jsDynamicCast<Element*>(vm, exec->argument(0));
    19681974    Root* root = jsDynamicCast<Root*>(vm, exec->argument(1));
    19691975    if (element && root)
    1970         element->setRoot(exec->vm(), root);
     1976        element->setRoot(vm, root);
    19711977    return JSValue::encode(jsUndefined());
    19721978}
     
    19741980EncodedJSValue JSC_HOST_CALL functionCreateSimpleObject(ExecState* exec)
    19751981{
    1976     JSLockHolder lock(exec);
    1977     return JSValue::encode(SimpleObject::create(exec->vm(), exec->lexicalGlobalObject()));
     1982    VM& vm = exec->vm();
     1983    JSLockHolder lock(vm);
     1984    return JSValue::encode(SimpleObject::create(vm, exec->lexicalGlobalObject()));
    19781985}
    19791986
     
    20042011    }
    20052012    JSValue value = exec->argument(1);
    2006     simpleObject->setHiddenValue(exec->vm(), value);
     2013    simpleObject->setHiddenValue(vm, value);
    20072014    return JSValue::encode(jsUndefined());
    20082015}
     
    20102017EncodedJSValue JSC_HOST_CALL functionCreateProxy(ExecState* exec)
    20112018{
    2012     JSLockHolder lock(exec);
     2019    VM& vm = exec->vm();
     2020    JSLockHolder lock(vm);
    20132021    JSValue target = exec->argument(0);
    20142022    if (!target.isObject())
    20152023        return JSValue::encode(jsUndefined());
    20162024    JSObject* jsTarget = asObject(target.asCell());
    2017     Structure* structure = JSProxy::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsTarget->getPrototypeDirect(), ImpureProxyType);
    2018     JSProxy* proxy = JSProxy::create(exec->vm(), structure, jsTarget);
     2025    Structure* structure = JSProxy::createStructure(vm, exec->lexicalGlobalObject(), jsTarget->getPrototypeDirect(), ImpureProxyType);
     2026    JSProxy* proxy = JSProxy::create(vm, structure, jsTarget);
    20192027    return JSValue::encode(proxy);
    20202028}
     
    20292037EncodedJSValue JSC_HOST_CALL functionCreateImpureGetter(ExecState* exec)
    20302038{
    2031     JSLockHolder lock(exec);
     2039    VM& vm = exec->vm();
     2040    JSLockHolder lock(vm);
    20322041    JSValue target = exec->argument(0);
    20332042    JSObject* delegate = nullptr;
    20342043    if (target.isObject())
    20352044        delegate = asObject(target.asCell());
    2036     Structure* structure = ImpureGetter::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull());
    2037     ImpureGetter* result = ImpureGetter::create(exec->vm(), structure, delegate);
     2045    Structure* structure = ImpureGetter::createStructure(vm, exec->lexicalGlobalObject(), jsNull());
     2046    ImpureGetter* result = ImpureGetter::create(vm, structure, delegate);
    20382047    return JSValue::encode(result);
    20392048}
     
    20412050EncodedJSValue JSC_HOST_CALL functionCreateCustomGetterObject(ExecState* exec)
    20422051{
    2043     JSLockHolder lock(exec);
    2044     Structure* structure = CustomGetter::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull());
    2045     CustomGetter* result = CustomGetter::create(exec->vm(), structure);
     2052    VM& vm = exec->vm();
     2053    JSLockHolder lock(vm);
     2054    Structure* structure = CustomGetter::createStructure(vm, exec->lexicalGlobalObject(), jsNull());
     2055    CustomGetter* result = CustomGetter::create(vm, structure);
    20462056    return JSValue::encode(result);
    20472057}
     
    20492059EncodedJSValue JSC_HOST_CALL functionCreateDOMJITNodeObject(ExecState* exec)
    20502060{
    2051     JSLockHolder lock(exec);
    2052     Structure* structure = DOMJITNode::createStructure(exec->vm(), exec->lexicalGlobalObject(), DOMJITGetter::create(exec->vm(), DOMJITGetter::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull())));
    2053     DOMJITNode* result = DOMJITNode::create(exec->vm(), structure);
     2061    VM& vm = exec->vm();
     2062    JSLockHolder lock(vm);
     2063    Structure* structure = DOMJITNode::createStructure(vm, exec->lexicalGlobalObject(), DOMJITGetter::create(vm, DOMJITGetter::createStructure(vm, exec->lexicalGlobalObject(), jsNull())));
     2064    DOMJITNode* result = DOMJITNode::create(vm, structure);
    20542065    return JSValue::encode(result);
    20552066}
     
    20572068EncodedJSValue JSC_HOST_CALL functionCreateDOMJITGetterObject(ExecState* exec)
    20582069{
    2059     JSLockHolder lock(exec);
    2060     Structure* structure = DOMJITGetter::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull());
    2061     DOMJITGetter* result = DOMJITGetter::create(exec->vm(), structure);
     2070    VM& vm = exec->vm();
     2071    JSLockHolder lock(vm);
     2072    Structure* structure = DOMJITGetter::createStructure(vm, exec->lexicalGlobalObject(), jsNull());
     2073    DOMJITGetter* result = DOMJITGetter::create(vm, structure);
    20622074    return JSValue::encode(result);
    20632075}
     
    20652077EncodedJSValue JSC_HOST_CALL functionCreateDOMJITGetterComplexObject(ExecState* exec)
    20662078{
    2067     JSLockHolder lock(exec);
    2068     Structure* structure = DOMJITGetterComplex::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull());
    2069     DOMJITGetterComplex* result = DOMJITGetterComplex::create(exec->vm(), exec->lexicalGlobalObject(), structure);
     2079    VM& vm = exec->vm();
     2080    JSLockHolder lock(vm);
     2081    Structure* structure = DOMJITGetterComplex::createStructure(vm, exec->lexicalGlobalObject(), jsNull());
     2082    DOMJITGetterComplex* result = DOMJITGetterComplex::create(vm, exec->lexicalGlobalObject(), structure);
    20702083    return JSValue::encode(result);
    20712084}
     
    20732086EncodedJSValue JSC_HOST_CALL functionCreateDOMJITFunctionObject(ExecState* exec)
    20742087{
    2075     JSLockHolder lock(exec);
    2076     Structure* structure = DOMJITFunctionObject::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull());
    2077     DOMJITFunctionObject* result = DOMJITFunctionObject::create(exec->vm(), exec->lexicalGlobalObject(), structure);
     2088    VM& vm = exec->vm();
     2089    JSLockHolder lock(vm);
     2090    Structure* structure = DOMJITFunctionObject::createStructure(vm, exec->lexicalGlobalObject(), jsNull());
     2091    DOMJITFunctionObject* result = DOMJITFunctionObject::create(vm, exec->lexicalGlobalObject(), structure);
    20782092    return JSValue::encode(result);
    20792093}
     
    20812095EncodedJSValue JSC_HOST_CALL functionCreateDOMJITCheckSubClassObject(ExecState* exec)
    20822096{
    2083     JSLockHolder lock(exec);
    2084     Structure* structure = DOMJITCheckSubClassObject::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsNull());
    2085     DOMJITCheckSubClassObject* result = DOMJITCheckSubClassObject::create(exec->vm(), exec->lexicalGlobalObject(), structure);
     2097    VM& vm = exec->vm();
     2098    JSLockHolder lock(vm);
     2099    Structure* structure = DOMJITCheckSubClassObject::createStructure(vm, exec->lexicalGlobalObject(), jsNull());
     2100    DOMJITCheckSubClassObject* result = DOMJITCheckSubClassObject::create(vm, exec->lexicalGlobalObject(), structure);
    20862101    return JSValue::encode(result);
    20872102}
     
    21102125EncodedJSValue JSC_HOST_CALL functionGCAndSweep(ExecState* exec)
    21112126{
    2112     JSLockHolder lock(exec);
    2113     exec->heap()->collectNow(Sync, CollectionScope::Full);
    2114     return JSValue::encode(jsNumber(exec->heap()->sizeAfterLastFullCollection()));
     2127    VM& vm = exec->vm();
     2128    JSLockHolder lock(vm);
     2129    vm.heap.collectNow(Sync, CollectionScope::Full);
     2130    return JSValue::encode(jsNumber(vm.heap.sizeAfterLastFullCollection()));
    21152131}
    21162132
    21172133EncodedJSValue JSC_HOST_CALL functionFullGC(ExecState* exec)
    21182134{
    2119     JSLockHolder lock(exec);
    2120     exec->heap()->collectSync(CollectionScope::Full);
    2121     return JSValue::encode(jsNumber(exec->heap()->sizeAfterLastFullCollection()));
     2135    VM& vm = exec->vm();
     2136    JSLockHolder lock(vm);
     2137    vm.heap.collectSync(CollectionScope::Full);
     2138    return JSValue::encode(jsNumber(vm.heap.sizeAfterLastFullCollection()));
    21222139}
    21232140
    21242141EncodedJSValue JSC_HOST_CALL functionEdenGC(ExecState* exec)
    21252142{
    2126     JSLockHolder lock(exec);
    2127     exec->heap()->collectSync(CollectionScope::Eden);
    2128     return JSValue::encode(jsNumber(exec->heap()->sizeAfterLastEdenCollection()));
     2143    VM& vm = exec->vm();
     2144    JSLockHolder lock(vm);
     2145    vm.heap.collectSync(CollectionScope::Eden);
     2146    return JSValue::encode(jsNumber(vm.heap.sizeAfterLastEdenCollection()));
    21292147}
    21302148
     
    21392157EncodedJSValue JSC_HOST_CALL functionHeapSize(ExecState* exec)
    21402158{
    2141     JSLockHolder lock(exec);
    2142     return JSValue::encode(jsNumber(exec->heap()->size()));
     2159    VM& vm = exec->vm();
     2160    JSLockHolder lock(vm);
     2161    return JSValue::encode(jsNumber(vm.heap.size()));
    21432162}
    21442163
     
    23682387EncodedJSValue JSC_HOST_CALL functionShadowChickenFunctionsOnStack(ExecState* exec)
    23692388{
    2370     return JSValue::encode(exec->vm().shadowChicken().functionsOnStack(exec));
     2389    VM& vm = exec->vm();
     2390    return JSValue::encode(vm.shadowChicken().functionsOnStack(exec));
    23712391}
    23722392
    23732393EncodedJSValue JSC_HOST_CALL functionSetGlobalConstRedeclarationShouldNotThrow(ExecState* exec)
    23742394{
    2375     exec->vm().setGlobalConstRedeclarationShouldThrow(false);
     2395    VM& vm = exec->vm();
     2396    vm.setGlobalConstRedeclarationShouldThrow(false);
    23762397    return JSValue::encode(jsUndefined());
    23772398}
     
    28082829EncodedJSValue JSC_HOST_CALL functionJSCOptions(ExecState* exec)
    28092830{
     2831    VM& vm = exec->vm();
    28102832    JSObject* optionsObject = constructEmptyObject(exec);
    28112833#define FOR_EACH_OPTION(type_, name_, defaultValue_, availability_, description_) \
    2812     addOption(exec->vm(), optionsObject, Identifier::fromString(exec, #name_), Options::name_());
     2834    addOption(vm, optionsObject, Identifier::fromString(exec, #name_), Options::name_());
    28132835    JSC_OPTIONS(FOR_EACH_OPTION)
    28142836#undef FOR_EACH_OPTION
     
    28482870EncodedJSValue JSC_HOST_CALL functionFailNextNewCodeBlock(ExecState* exec)
    28492871{
    2850     exec->vm().setFailNextNewCodeBlock();
     2872    VM& vm = exec->vm();
     2873    vm.setFailNextNewCodeBlock();
    28512874    return JSValue::encode(jsUndefined());
    28522875}
     
    28902913EncodedJSValue JSC_HOST_CALL functionMakeMasquerader(ExecState* exec)
    28912914{
    2892     return JSValue::encode(Masquerader::create(exec->vm(), exec->lexicalGlobalObject()));
     2915    VM& vm = exec->vm();
     2916    return JSValue::encode(Masquerader::create(vm, exec->lexicalGlobalObject()));
    28932917}
    28942918
     
    29032927EncodedJSValue JSC_HOST_CALL functionDumpTypesForAllVariables(ExecState* exec)
    29042928{
    2905     exec->vm().dumpTypeProfilerData();
     2929    VM& vm = exec->vm();
     2930    vm.dumpTypeProfilerData();
    29062931    return JSValue::encode(jsUndefined());
    29072932}
     
    29102935{
    29112936    VM& vm = exec->vm();
    2912     RELEASE_ASSERT(exec->vm().typeProfiler());
     2937    RELEASE_ASSERT(vm.typeProfiler());
    29132938    vm.typeProfilerLog()->processLogEntries(ASCIILiteral("jsc Testing API: functionFindTypeForExpression"));
    29142939
     
    29222947    unsigned offset = static_cast<unsigned>(sourceCodeText.find(substring) + executable->source().startOffset());
    29232948   
    2924     String jsonString = exec->vm().typeProfiler()->typeInformationForExpressionAtOffset(TypeProfilerSearchDescriptorNormal, offset, executable->sourceID(), exec->vm());
     2949    String jsonString = vm.typeProfiler()->typeInformationForExpressionAtOffset(TypeProfilerSearchDescriptorNormal, offset, executable->sourceID(), vm);
    29252950    return JSValue::encode(JSONParse(exec, jsonString));
    29262951}
     
    29292954{
    29302955    VM& vm = exec->vm();
    2931     RELEASE_ASSERT(exec->vm().typeProfiler());
     2956    RELEASE_ASSERT(vm.typeProfiler());
    29322957    vm.typeProfilerLog()->processLogEntries(ASCIILiteral("jsc Testing API: functionReturnTypeFor"));
    29332958
     
    29372962
    29382963    unsigned offset = executable->typeProfilingStartOffset();
    2939     String jsonString = exec->vm().typeProfiler()->typeInformationForExpressionAtOffset(TypeProfilerSearchDescriptorFunctionReturn, offset, executable->sourceID(), exec->vm());
     2964    String jsonString = vm.typeProfiler()->typeInformationForExpressionAtOffset(TypeProfilerSearchDescriptorFunctionReturn, offset, executable->sourceID(), vm);
    29402965    return JSValue::encode(JSONParse(exec, jsonString));
    29412966}
     
    29432968EncodedJSValue JSC_HOST_CALL functionDumpBasicBlockExecutionRanges(ExecState* exec)
    29442969{
    2945     RELEASE_ASSERT(exec->vm().controlFlowProfiler());
    2946     exec->vm().controlFlowProfiler()->dumpData();
     2970    VM& vm = exec->vm();
     2971    RELEASE_ASSERT(vm.controlFlowProfiler());
     2972    vm.controlFlowProfiler()->dumpData();
    29472973    return JSValue::encode(jsUndefined());
    29482974}
     
    29823008    int offset = sourceCodeText.find(substring) + executable->source().startOffset();
    29833009   
    2984     size_t executionCount = vm.controlFlowProfiler()->basicBlockExecutionCountAtTextOffset(offset, executable->sourceID(), exec->vm());
     3010    size_t executionCount = vm.controlFlowProfiler()->basicBlockExecutionCountAtTextOffset(offset, executable->sourceID(), vm);
    29853011    return JSValue::encode(JSValue(executionCount));
    29863012}
     
    29943020EncodedJSValue JSC_HOST_CALL functionDrainMicrotasks(ExecState* exec)
    29953021{
    2996     exec->vm().drainMicrotasks();
     3022    VM& vm = exec->vm();
     3023    vm.drainMicrotasks();
    29973024    return JSValue::encode(jsUndefined());
    29983025}
     
    30943121    auto scope = DECLARE_THROW_SCOPE(vm);
    30953122
    3096     HeapSnapshotBuilder snapshotBuilder(exec->vm().ensureHeapProfiler());
     3123    HeapSnapshotBuilder snapshotBuilder(vm.ensureHeapProfiler());
    30973124    snapshotBuilder.buildSnapshot();
    30983125
     
    31143141    for (unsigned i = 0; i < exec->argumentCount(); ++i) {
    31153142        if (JSObject* object = jsDynamicCast<JSObject*>(vm, exec->argument(0)))
    3116             object->ensureArrayStorage(exec->vm());
     3143            object->ensureArrayStorage(vm);
    31173144    }
    31183145    return JSValue::encode(jsUndefined());
     
    31223149EncodedJSValue JSC_HOST_CALL functionStartSamplingProfiler(ExecState* exec)
    31233150{
    3124     SamplingProfiler& samplingProfiler = exec->vm().ensureSamplingProfiler(WTF::Stopwatch::create());
     3151    VM& vm = exec->vm();
     3152    SamplingProfiler& samplingProfiler = vm.ensureSamplingProfiler(WTF::Stopwatch::create());
    31253153    samplingProfiler.noticeCurrentThreadAsJSCExecutionThread();
    31263154    samplingProfiler.start();
     
    34803508            source = source + line;
    34813509            source = source + '\n';
    3482             checkSyntax(globalObject->vm(), makeSource(source, sourceOrigin), error);
     3510            checkSyntax(vm, makeSource(source, sourceOrigin), error);
    34833511            if (!line[0]) {
    34843512                free(line);
     
    35193547
    35203548        scope.clearException();
    3521         globalObject->vm().drainMicrotasks();
     3549        vm.drainMicrotasks();
    35223550    }
    35233551    printf("\n");
Note: See TracChangeset for help on using the changeset viewer.