-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jshooks [DO NOT MERGE] #318
base: dev
Are you sure you want to change the base?
Conversation
…ger_last_time, ledger_nonce, ledger_keylet
…ubfield slot_type slot_float compiling not tested
… float_sum float_sto float_sto_set float_invert float_divide float_one float_mantissa float_sign float_int float_log float_root
Co-authored-by: tequ <[email protected]>
Co-authored-by: tequ <[email protected]>
RETURNJS_IF_INVALID_FLOAT(*f1); | ||
|
||
if (*f1 == 0) | ||
returnJS(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float_mantissa
The success value should be returned by XFL(bigint).
returnJS(0); | |
returnJSXFL(0); |
int32_t exp = *e; | ||
|
||
if (mantissa == 0) | ||
returnJS(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float_set
The success value should be returned by XFL.
returnJS(0); | |
returnJSXFL(0); |
returnJS(INVALID_ARGUMENT); | ||
|
||
if (*float1 == 0) | ||
returnJS(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float_negate
The success value should be returned by XFL.
returnJS(0); | |
returnJSXFL(0); |
JSVM_ERROR = 4, | ||
LEDGER_ERROR = | ||
5, // if the ledger contained for example a nonsense hookapi number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Instruction Limit is reached, the ExitType is currently set to UNSET, but it may be worth adding a new ExitType(INSTRUCTION_LIMIT_REACHED
) for this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Xahau/xahaud/blob/jshooks/src/quickjs/quickjs.c#L43359
Either Math.random()
should not be used, or the implementation should be changed to give deterministic results.
* add tests for fee_base, ledger_keylet, meta_slot * clang-format * clang-format * update SetJSHook_wasm.h
High Level Overview of Change
Context of Change
Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)