963ff849df
This patch implements inspector support for private instance methods: - Previously to implement brand checking for instances with private instance methods we store the brand both as the value with the brand itself as the key in the stances. Now we make the value the context associated with the class instead. - To retrieve the private instance methods and accessors from the instances at runtime, we look into the contexts stored with the brands, and analyze the scope info to get the names as well as context slot indices of them. - This patch extends the `PrivatePropertyDescriptor` in the inspector protocol to include optional `get` and `set` fields, and make the `value` field optional (similar to `PropertyDescriptor`s). Private fields or private instance methods are returned in the `value` field while private accessors are returned in the `get` and/or `set` field. Property previews for the instaces containing private instance methods and accessors are also updated similarly, although no additional protocol change is necessary since the `PropertyPreview` type can already be used to display accessors. Design doc: https://docs.google.com/document/d/1N91LObhQexnB0eE7EvGe57HsvNMFX16CaWu-XCTnnmY/edit Bug: v8:9839, v8:8330 Change-Id: If37090bd23833a18f75deb1249ca5c4405ca2bf2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1934407 Commit-Queue: Joyee Cheung <joyee@igalia.com> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#65337} |
||
---|---|---|
.. | ||
ArrayLiterals.golden | ||
AssignmentsInBinaryExpression.golden | ||
AsyncGenerators.golden | ||
AsyncModules.golden | ||
BasicBlockToBoolean.golden | ||
BasicLoops.golden | ||
BreakableBlocks.golden | ||
CallAndSpread.golden | ||
CallGlobal.golden | ||
CallLookupSlot.golden | ||
CallNew.golden | ||
CallRuntime.golden | ||
ClassAndSuperClass.golden | ||
ClassDeclarations.golden | ||
CompareNil.golden | ||
CompareTypeOf.golden | ||
CompoundExpressions.golden | ||
Conditional.golden | ||
ConstVariable.golden | ||
ConstVariableContextSlot.golden | ||
ContextParameters.golden | ||
ContextVariables.golden | ||
CountOperators.golden | ||
CreateArguments.golden | ||
CreateRestParameter.golden | ||
DeadCodeRemoval.golden | ||
DeclareGlobals.golden | ||
Delete.golden | ||
DeleteLookupSlotInEval.golden | ||
DestructuringAssignment.golden | ||
DoDebugger.golden | ||
Eval.golden | ||
ForAwaitOf.golden | ||
ForIn.golden | ||
ForOf.golden | ||
ForOfLoop.golden | ||
FunctionLiterals.golden | ||
GenerateTestUndetectable.golden | ||
Generators.golden | ||
GlobalCompoundExpressions.golden | ||
GlobalCountOperators.golden | ||
GlobalDelete.golden | ||
HeapNumberConstants.golden | ||
IfConditions.golden | ||
IIFEWithOneshotOpt.golden | ||
IIFEWithoutOneshotOpt.golden | ||
IntegerConstants.golden | ||
LetVariable.golden | ||
LetVariableContextSlot.golden | ||
LoadGlobal.golden | ||
LogicalExpressions.golden | ||
LookupSlot.golden | ||
LookupSlotInEval.golden | ||
Modules.golden | ||
NewAndSpread.golden | ||
NewTarget.golden | ||
ObjectLiterals.golden | ||
OuterContextVariables.golden | ||
Parameters.golden | ||
PrimitiveExpressions.golden | ||
PrimitiveReturnStatements.golden | ||
PrivateAccessorAccess.golden | ||
PrivateAccessorDeclaration.golden | ||
PrivateClassFields.golden | ||
PrivateMethodAccess.golden | ||
PrivateMethodDeclaration.golden | ||
PropertyCall.golden | ||
PropertyLoads.golden | ||
PropertyLoadStoreOneShot.golden | ||
PropertyLoadStoreWithoutOneShot.golden | ||
PropertyStores.golden | ||
PublicClassFields.golden | ||
RegExpLiterals.golden | ||
RemoveRedundantLdar.golden | ||
StandardForLoop.golden | ||
StaticClassFields.golden | ||
StaticPrivateMethodAccess.golden | ||
StaticPrivateMethodDeclaration.golden | ||
StoreGlobal.golden | ||
StringConcat.golden | ||
StringConstants.golden | ||
SuperCallAndSpread.golden | ||
Switch.golden | ||
TemplateLiterals.golden | ||
ThisFunction.golden | ||
Throw.golden | ||
TopLevelObjectLiterals.golden | ||
TryCatch.golden | ||
TryFinally.golden | ||
Typeof.golden | ||
UnaryOperators.golden | ||
WideRegisters.golden | ||
WithStatement.golden |