-
Notifications
You must be signed in to change notification settings - Fork 684
Remove the JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER snapshot flag. #2550
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
Remove the JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER snapshot flag. #2550
Conversation
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.
LGTM
Shouldn't there be a CMakeLists modification also? Or I'm missing something? |
jerry-core/api/jerry-snapshot.h
Outdated
@@ -41,7 +41,7 @@ typedef struct | |||
/** | |||
* Jerry snapshot format version. | |||
*/ | |||
#define JERRY_SNAPSHOT_VERSION (18u) | |||
#define JERRY_SNAPSHOT_VERSION (19u) |
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.
Since the snapshot version number has increased, this expected output should be modified as well.
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.
Is this really a change in the snapshot version at all?
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.
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.
The format of snapshots are not changed in this patch. I agree with @akosthekiss, no need to change the snapshot version.
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.
@rtakacs two notes:
- the intent of my original comment was to suggest that the version should not be changed (as @LaszloLango also pointed out)
- on these forums,
@akiss
is not me: it's a project/tool ran by INRIA (France). here, I'm@akosthekiss
;)
@@ -51,8 +51,6 @@ typedef enum | |||
/* 8 bits are reserved for dynamic features */ | |||
JERRY_SNAPSHOT_HAS_REGEX_LITERAL = (1u << 0), /**< byte code has regex literal */ | |||
JERRY_SNAPSHOT_HAS_CLASS_LITERAL = (1u << 1), /**< byte code has class literal */ | |||
/* 24 bits are reserved for compile time features */ | |||
JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER = (1u << 8) /**< compressed pointers are four byte long */ |
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.
Is it OK to simply drop this enumerator? In other public API headers (e.g., jerryscript-core.h), there are examples to keep deprecated enumerators with original values, with a comment stating that it's "deprecated, an unused placeholder now" (see jerry_init_flag_t
).
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.
Thank you for the clarification. I've modified the patch and added a deprecated marker to this entry.
jerry-core/api/jerry-snapshot.h
Outdated
@@ -41,7 +41,7 @@ typedef struct | |||
/** | |||
* Jerry snapshot format version. | |||
*/ | |||
#define JERRY_SNAPSHOT_VERSION (18u) | |||
#define JERRY_SNAPSHOT_VERSION (19u) |
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.
Is this really a change in the snapshot version at all?
daa6065
to
78d8882
Compare
@galpeter There is nothing in the CMake files for the |
Note to ourselves in the future: |
I don't really understand this. We only need to worry if version 4 billion is reached, since we have 4 bytes for version number. |
Oh, do we? I must have misinterpreted something. My bad. Scratch the above then. |
Maybe the little endian format is the root of confusion. So the first byte is the last byte of the version number. The little/big endian can be detected from the magic, which is JRRY of little and YRRJ for big endian systems. The version number bytes are ordered accordingly. |
Not to be missed because of the noise generated by me: @rtakacs I still think that this patch should not increase the snapshot version number. |
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
78d8882
to
6014189
Compare
@akosthekiss I've changed back the snapshot version to 18. |
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.
LGTM
Removed the
JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER
flag because that is not necessary. Also updated the snapshot version.