[webkit-reviews] review requested: [Bug 133395] Web Inspector: debugger should be able to show variable types : [Attachment 233743] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 24 14:48:41 PDT 2014


Saam Barati <sbarati at apple.com> has asked  for review:
Bug 133395: Web Inspector: debugger should be able to show variable types
https://bugs.webkit.org/show_bug.cgi?id=133395

Attachment 233743: patch
https://bugs.webkit.org/attachment.cgi?id=233743&action=review

------- Additional Comments from Saam Barati <sbarati at apple.com>
2014-06-24  Saam Barati  <sbarati at apple.com>

	Web Inspector: debugger should be able to show variable types
	https://bugs.webkit.org/show_bug.cgi?id=133395

	Reviewed by NOBODY (OOPS!).

	Increase the amount of type information the VM gathers when directed
	to do so. This initial commit is working towards the goal of
	capturing, and then showing (via the Web Inspector) type information
for all
	assignment and load operations. This patch doesn't have the feature
fully 
	implemented, but it ensures the VM has no performance regressions
	unless the feature is specifically turned on.

	* JavaScriptCore.xcodeproj/project.pbxproj:
	* bytecode/BytecodeList.json:
	* bytecode/BytecodeUseDef.h:
	(JSC::computeUsesForBytecodeOffset):
	(JSC::computeDefsForBytecodeOffset):
	* bytecode/CodeBlock.cpp:
	(JSC::CodeBlock::dumpBytecode):
	(JSC::CodeBlock::CodeBlock):
	(JSC::CodeBlock::finalizeUnconditionally):
	* bytecode/CodeBlock.h:
	* bytecode/Instruction.h:
	* bytecode/TypeLocation.h: Added.
	(JSC::TypeLocation::TypeLocation):
	* bytecompiler/BytecodeGenerator.cpp:
	(JSC::BytecodeGenerator::emitMove):
	(JSC::BytecodeGenerator::emitProfileTypesWithHighFidelity):
	(JSC::BytecodeGenerator::emitPutToScope):
	(JSC::BytecodeGenerator::emitPutById):
	(JSC::BytecodeGenerator::emitPutByVal):
	* bytecompiler/BytecodeGenerator.h:
	(JSC::BytecodeGenerator::isProfilingTypesWithHighFidelity):
	* bytecompiler/NodesCodegen.cpp:
	(JSC::PostfixNode::emitResolve):
	(JSC::PrefixNode::emitResolve):
	(JSC::ReadModifyResolveNode::emitBytecode):
	(JSC::AssignResolveNode::emitBytecode):
	(JSC::ConstDeclNode::emitCodeSingle):
	(JSC::ForInNode::emitBytecode):
	* heap/Heap.cpp:
	(JSC::Heap::collect):
	* inspector/agents/InspectorRuntimeAgent.cpp:
       
(Inspector::InspectorRuntimeAgent::getRuntimeTypeForVariableInTextRange):
	* inspector/agents/InspectorRuntimeAgent.h:
	* inspector/protocol/Runtime.json:
	* jsc.cpp:
	(GlobalObject::finishCreation):
	(functionDumpTypesForAllVariables):
	* llint/LLIntSlowPaths.cpp:
	(JSC::LLInt::LLINT_SLOW_PATH_DECL):
	(JSC::LLInt::putToScopeCommon):
	* llint/LLIntSlowPaths.h:
	* llint/LowLevelInterpreter.asm:
	* runtime/HighFidelityLog.cpp: Added.
	(JSC::HighFidelityLog::initializeHighFidelityLog):
	(JSC::HighFidelityLog::~HighFidelityLog):
	(JSC::HighFidelityLog::recordTypeInformationForLocation):
	(JSC::HighFidelityLog::processHighFidelityLog):
	(JSC::HighFidelityLog::actuallyProcessLogThreadFunction):
	* runtime/HighFidelityLog.h: Added.
	(JSC::HighFidelityLog::HighFidelityLog):
	* runtime/HighFidelityTypeProfiler.cpp: Added.
	(JSC::HighFidelityTypeProfiler::getTypesForVariableInRange):
	(JSC::HighFidelityTypeProfiler::getGlobalTypesForVariableInRange):
	(JSC::HighFidelityTypeProfiler::getLocalTypesForVariableInRange):
	(JSC::HighFidelityTypeProfiler::insertNewLocation):
	(JSC::HighFidelityTypeProfiler::getLocationBasedHash):
	* runtime/HighFidelityTypeProfiler.h: Added.
	* runtime/Options.h:
	* runtime/Structure.cpp:
	(JSC::Structure::toStructureShape):
	* runtime/Structure.h:
	* runtime/SymbolTable.cpp:
	(JSC::SymbolTable::SymbolTable):
	(JSC::SymbolTable::cloneCapturedNames):
	(JSC::SymbolTable::uniqueIDForVariable):
	(JSC::SymbolTable::uniqueIDForRegister):
	(JSC::SymbolTable::globalTypeSetForRegister):
	(JSC::SymbolTable::globalTypeSetForVariable):
	* runtime/SymbolTable.h:
	(JSC::SymbolTable::add):
	(JSC::SymbolTable::set):
	* runtime/TypeSet.cpp: Added.
	(JSC::TypeSet::TypeSet):
	(JSC::TypeSet::getRuntimeTypeForValue):
	(JSC::TypeSet::addTypeForValue):
	(JSC::TypeSet::removeDuplicatesInStructureHistory):
	(JSC::TypeSet::seenTypes):
	(JSC::TypeSet::dumpSeenTypes):
	(JSC::StructureShape::StructureShape):
	(JSC::StructureShape::markAsFinal):
	(JSC::StructureShape::addProperty):
	(JSC::StructureShape::propertyHash):
	(JSC::StructureShape::leastUpperBound):
	(JSC::StructureShape::stringRepresentation):
	* runtime/TypeSet.h: Added.
	(JSC::StructureShape::create):
	(JSC::TypeSet::create):
	* runtime/VM.cpp:
	(JSC::VM::VM):
	(JSC::VM::getTypesForVariableInRange):
	(JSC::VM::updateHighFidelityTypeProfileState):
	(JSC::VM::dumpHighFidelityProfilingTypes):
	* runtime/VM.h:
	(JSC::VM::isProfilingTypesWithHighFidelity):
	(JSC::VM::highFidelityLog):
	(JSC::VM::highFidelityTypeProfiler):
	(JSC::VM::nextLocation):
	(JSC::VM::getNextUniqueVariableID):


More information about the webkit-reviews mailing list