Skip to content

Commit

Permalink
Partial revert "XS: profiler Linux Windows"
Browse files Browse the repository at this point in the history
This partially reverts commit 5747ad1.

The changes to xsCode.c were found to cause a divergence of execution
in vat6 replay around delivery 29547
  • Loading branch information
mhofman committed Jan 6, 2023
1 parent 220a3e1 commit d4a2881
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions xs/sources/xsCode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d4a2881

Please sign in to comment.