From d4a2881a2f5da1ddc70df4ad1090cbbb8e9b1055 Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Fri, 6 Jan 2023 02:29:42 +0000 Subject: [PATCH] Partial revert "XS: profiler Linux Windows" This partially reverts commit 5747ad17a99dcc0126464d004a9b7a5049d5e908. The changes to xsCode.c were found to cause a divergence of execution in vat6 replay around delivery 29547 --- xs/sources/xsCode.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/xs/sources/xsCode.c b/xs/sources/xsCode.c index 733d942d05..6346777489 100644 --- a/xs/sources/xsCode.c +++ b/xs/sources/xsCode.c @@ -187,8 +187,7 @@ txScript* fxParserCode(txParser* parser) coder.parser = parser; if (parser->errorCount == 0) { mxTryParser(parser) { - txNode* self = parser->root; - (*self->description->dispatch->code)(parser->root, &coder); + fxNodeDispatchCode(parser->root, &coder); } mxCatchParser(parser) { } @@ -3190,11 +3189,9 @@ void fxFunctionNodeCode(void* it, void* param) fxCoderAddIndex(param, 0, XS_CODE_BEGIN_STRICT, fxCoderCountParameters(coder, self->params)); else fxCoderAddIndex(param, 0, XS_CODE_BEGIN_SLOPPY, fxCoderCountParameters(coder, self->params)); - coder->path = C_NULL; - if (self->line >= 0) - fxCoderAddLine(coder, 0, XS_CODE_LINE, it); if (self->scopeCount) fxCoderAddIndex(param, 0, XS_CODE_RESERVE_1, self->scopeCount); + coder->path = C_NULL; fxScopeCodeRetrieve(self->scope, param); fxScopeCodingParams(self->scope, param); if (self->flags & mxBaseFlag) { @@ -3521,11 +3518,9 @@ void fxModuleNodeCode(void* it, void* param) fxCoderAddSymbol(param, 1, XS_CODE_FUNCTION, name); fxCoderAddBranch(param, 0, XS_CODE_CODE_1, target); fxCoderAddIndex(param, 0, XS_CODE_BEGIN_STRICT, 0); - coder->path = C_NULL; - if (self->line >= 0) - fxCoderAddLine(coder, 0, XS_CODE_LINE, it); if (self->scopeCount) fxCoderAddIndex(param, 0, XS_CODE_RESERVE_1, self->scopeCount); + coder->path = C_NULL; fxScopeCodeRetrieve(self->scope, param); declaration = self->scope->firstDeclareNode; while (declaration) { @@ -3559,11 +3554,10 @@ void fxModuleNodeCode(void* it, void* param) fxCoderAddSymbol(param, 1, XS_CODE_FUNCTION, name); fxCoderAddBranch(param, 0, XS_CODE_CODE_1, target); fxCoderAddIndex(param, 0, XS_CODE_BEGIN_STRICT, 0); - coder->path = C_NULL; - if (self->line >= 0) - fxCoderAddLine(coder, 0, XS_CODE_LINE, it); + if (self->scopeCount) fxCoderAddIndex(param, 0, XS_CODE_RESERVE_1, self->scopeCount); + coder->path = C_NULL; fxScopeCodeRetrieve(self->scope, param); if (self->flags & mxAwaitingFlag) @@ -3959,8 +3953,6 @@ void fxProgramNodeCode(void* it, void* param) else fxCoderAddIndex(param, 0, XS_CODE_BEGIN_SLOPPY, 0); coder->path = C_NULL; - if (self->line >= 0) - fxCoderAddLine(coder, 0, XS_CODE_LINE, it); if (coder->parser->flags & mxEvalFlag) { coder->evalFlag = 1; fxScopeCodingEval(self->scope, param);