Commit Graph

29 Commits (master)

Author SHA1 Message Date
Gabriel Scherer 50da1ce8c3 Merge pull request #9212 from kit-ty-kate/fix-dynlink
Fix access to C symbols when using Dynlink

(cherry picked from commit c67990cedea7932b5b1a877c1479c9b7b9f910da)
2020-01-09 15:28:38 +01:00
Mark Shinwell 6cbdfad125 Move some code from Asmgen to the middle end directory etc. (#2288)
Followup to (#2281)
2019-05-10 15:11:22 +02:00
Armaël Guéneau c0820e30cb Location: significantly rework the code printing errors and warnings 2018-08-08 17:42:08 +02:00
Stefan Muenzel b075751685 Use format boxes or newlines to line-wrap some errors/warnings. 2018-07-30 16:12:02 +01:00
alainfrisch f6d53cc38f Deprecation warning when checking signature inclusion
Deprecation warning (3) is currently only reported when directly
accessing a component marked with the deprecated attribute; but it is
missed when we coerce the signature contaning the deprecated component
to a signature without the attribute.

This commit adds the required machinery to detect such cases
and report the same warning. (An alternative design could be
to introduce a new warning for that purpose.)

Some of the new machinery could be used for other purposes:

  - During the inclusion check, keep the location that would used in
    the error message if the check fails.

  - Warnings can now hold extra "sub-locations" (and associated
    messages).
2017-04-05 19:13:59 +02:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Marc Lasson 934dd9a40b More errors with unboxed and untagged attributes
This commit adds errors for bad uses of @untagged and
@unboxed attributes in external declarations.

There are three possible new errors:
  - One when the external does not contain a native version of
the primitive,
  - One when the attribute occurs deeply into the type,
  - One when the attribute is applied to the whole function type.
2016-01-20 11:51:26 +01:00
François Bobot c0f19965f4 Make specialized compare unboxed
- float
    - int32
    - int64
    - nativeint

  Not for int because the comparison is done directly on the untagged version.
  Useful mainly for floats since they can be stored unboxed in records or arrays.
2015-11-05 13:07:03 +01:00
Jérémie Dimino 4098845132 Don't allow "noalloc" together with [@@noalloc]
To avoid confusion about how the "noalloc" is to be interpreted if
both are present.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16461 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:28 +00:00
Jérémie Dimino bd21592814 Deprecated warning for "float" and "noalloc"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16460 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:27 +00:00
Jérémie Dimino 95802fe702 Accept unboxed, untagged and noalloc prefixed by "ocaml."
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16459 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:27 +00:00
Jérémie Dimino e982d6906e Update printing of externals
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16457 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:25 +00:00
Jérémie Dimino 695a592d48 Support [@@noalloc] on external declarations
This is to replace the "noalloc" annotation.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:20 +00:00
Pierre Weis 10d5bf3724 The proper way to escape @ in a format string is %@ not deprecated @@...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-24 18:30:01 +00:00
Jérémie Dimino acd6067a52 Escape '@' in format strings passed to Format.fprintf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16441 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-22 15:07:19 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Jérémie Dimino be482e40d5 Update printing of externals with [@unboxed] or [@untagged] attributes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16383 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 16:18:48 +00:00
Jérémie Dimino 1d196f4ddd Support [@unboxed] and [@untagged] attributes
Adding [@unboxed] (resp [@untagged]) on a primitive argument means
that the argument must passed unboxed (resp untagged) to the external
function. Adding [@unboxed] (resp [@untagged]) on the result means
that the external function returns its result unboxed (resp untagged).

The unboxing (resp untagging) method is derived from the type.

Currently unboxing is suported for: float, int32, int64 and nativeint.
Untagging is supported for int.

This patch also increases the cm{i,o,a,x,xa} magic numbers as the type
Primitive.description is changed.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 16:18:46 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Alain Frisch 1ba87b442b Output references to the native version of the primitives in ocamlopt
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-07-24 05:35:22 +00:00
Daniel de Rauglaudre 3ed3b7bdda Ajouté personalisation de l'affichage des items de signature dans le toplevel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3614 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-08-06 12:28:50 +00:00
Pierre Weis b34a32bdd8 Le module Ident passe a Format.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2955 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-13 16:49:01 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy a048d42b10 Ajout du module Formatmsg pour rediriger les messages du systeme vers stdout ou stderr suivant le contexte
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2486 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-08 17:06:33 +00:00
Xavier Leroy b1b66f3278 typeclass: manque un () apres ;
primitive, typedecl: verifier que l'arite d'une primitive est > 0.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1535 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-05-13 14:07:00 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Xavier Leroy e4066357b1 Ajout des notices de copyright
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy 6d211f7692 Creation du module primitive
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-27 17:47:52 +00:00