Skip to content

replace String.blit by String.unsafe_blit#15

Closed
pw374 wants to merge 1 commit intoocaml:trunkfrom
pw374:patch-2
Closed

replace String.blit by String.unsafe_blit#15
pw374 wants to merge 1 commit intoocaml:trunkfrom
pw374:patch-2

Conversation

@pw374
Copy link

@pw374 pw374 commented Feb 18, 2014

@gasche
Copy link
Member

gasche commented Mar 5, 2014

I reviewed the patch and I think that the change to blit is correct, and potentially useful as this is a fast operation. For resize, the same reserves that Alain had during his review of PR#6148 still apply (there are risks of overflow if Sys.max_string_length was to grow). Given it's already a cold path that does a fair amount of integer checking and allocates a large string, I would not change it.

(One point with adding unsafe stuff is that it not only risks making program go wrong, it also increases the cost of any safety/security audit in the future, SOCaml-style, that would need to inspect all the places were unsafe features are used.)

@gasche
Copy link
Member

gasche commented Aug 8, 2014

Merged in trunk only, without the resize part.

@gasche gasche closed this Aug 8, 2014
stedolan added a commit to stedolan/ocaml that referenced this pull request Aug 18, 2015
The code for scanning another domain's mark stack should re-mark
objects on the mark stack.

This code will become obsolete once work-stealing for GC marking
is implemented.
mshinwell referenced this pull request in mshinwell/ocaml Jan 18, 2016
dra27 referenced this pull request in dra27/ocaml Mar 20, 2019
stedolan pushed a commit to stedolan/ocaml that referenced this pull request May 24, 2022
ce88833 Merge flambda-backend changes
b7506bb Revert "Cherry-pick of ocaml/ocaml 1eeb0e7 (ocaml#12)"
183f688 Add config option to enable/disable stack allocation (ocaml#22)
ee7c849 If both the type and mode of an ident are wrong, complain about the type. (ocaml#19)
44bade0 Allow submoding during module inclusion checks (ocaml#21)
de3bec9 Add subtyping between arrows of related modes (ocaml#20)
93d8615 Enable the local keywords even when the local extension is off (ocaml#18)
81dd85e Documentation for local allocations
b05519f Fix a GC bug in local stack scanning (ocaml#17)
9f879de Fix __FUNCTION__ (ocaml#15)
a78975e Optimise "include struct ... end" in more cases (ocaml#11134)
b819c66 Cherry-pick of ocaml/ocaml 1eeb0e7 (ocaml#12)
bb363d4 Optimise the allocation of optional arguments (ocaml#11)

git-subtree-dir: ocaml
git-subtree-split: ce88833
lpw25 added a commit to lpw25/ocaml that referenced this pull request Jun 21, 2022
OlivierNicole pushed a commit to OlivierNicole/ocaml that referenced this pull request Sep 30, 2022
Fix a variety of build issues (mostly cherry-picked from later releases)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants