Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007874OCamlruntime system and C interfacepublic2018-11-20 18:432018-11-21 20:44
Reporterppedrot 
Assigned Tonojebar 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.07.1 
Target VersionFixed in Version 
Summary0007874: caml_string_equal should be marked as @@noalloc
DescriptionCurrently, String.equal is defined as a C stub without any annotation. It should be marked as noalloc, as it does not mess with the GC.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0019471)
gasche (administrator)
2018-11-20 21:00

If you believe that it would be safe to use noalloc there, would you like to submit a Pull Request to do it?
(0019472)
gasche (administrator)
2018-11-20 21:02

(I suppose caml_string_compare could also be marked as such. I wonder why caml_string_equal is not using memcmp like caml_string_compare, is a loop faster?)
(0019474)
ppedrot (reporter)
2018-11-21 11:42

This is already done for caml_string_compare I believe, this function is treated as a primitive in the compiler and its interpretation reads

  Primitive.simple ~name:"caml_string_compare" ~arity:2 ~alloc:false
(0019476)
nojebar (developer)
2018-11-21 20:43

Fixed in https://github.com/ocaml/ocaml/pull/2159. [^]

- Issue History
Date Modified Username Field Change
2018-11-20 18:43 ppedrot New Issue
2018-11-20 21:00 gasche Note Added: 0019471
2018-11-20 21:02 gasche Note Added: 0019472
2018-11-21 11:42 ppedrot Note Added: 0019474
2018-11-21 20:43 nojebar Note Added: 0019476
2018-11-21 20:44 nojebar Status new => resolved
2018-11-21 20:44 nojebar Resolution open => fixed
2018-11-21 20:44 nojebar Assigned To => nojebar


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker