From f1af93971b7490792d8541bc790e0d8c6d787059 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Sep 2019 10:28:05 +0100 Subject: gentoo resync : 06.08.2019 --- ...ixes-arity-for-pervasive-modulo-operation.patch | 28 ++++++++++++ ...ing-literals-from-proper-character-groups.patch | 45 +++++++++++++++++++ ...3-Removing-deprecated-function-String.set.patch | 51 ++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 dev-lang/teyjus/files/teyjus-2.1-p001-Fixes-arity-for-pervasive-modulo-operation.patch create mode 100644 dev-lang/teyjus/files/teyjus-2.1-p002-Add-string-literals-from-proper-character-groups.patch create mode 100644 dev-lang/teyjus/files/teyjus-2.1-p003-Removing-deprecated-function-String.set.patch (limited to 'dev-lang/teyjus/files') diff --git a/dev-lang/teyjus/files/teyjus-2.1-p001-Fixes-arity-for-pervasive-modulo-operation.patch b/dev-lang/teyjus/files/teyjus-2.1-p001-Fixes-arity-for-pervasive-modulo-operation.patch new file mode 100644 index 000000000000..0eb366f7c840 --- /dev/null +++ b/dev-lang/teyjus/files/teyjus-2.1-p001-Fixes-arity-for-pervasive-modulo-operation.patch @@ -0,0 +1,28 @@ +commit 4e53477a6685b515363f7123dbeeece4f60f103a +Author: Fabien Renaud +Date: Sun Aug 9 21:15:16 2015 +0200 + + Fixes arity for pervasive modulo operation + +diff --git a/source/tables_gen/pervasives/pervasives.in b/source/tables_gen/pervasives/pervasives.in +index 2a332da..fcac330 100644 +--- a/source/tables_gen/pervasives/pervasives.in ++++ b/source/tables_gen/pervasives/pervasives.in +@@ -91,8 +91,6 @@ + TYPE 7 int -> int + /* unary minus on integers */ + 56 %i~ intuminus 0 0 0 TRUE FALSE MAX PREFIX NOCODE - +- /* modulus */ +- 61 mod mod 0 0 0 TRUE TRUE 160 INFIXL NOCODE + /* integer abs */ + 63 %iabs iabs 0 0 0 TRUE TRUE 0 NOFIXITY NOCODE abs + ;; +@@ -107,6 +105,8 @@ + 59 %i* intmult 0 0 0 TRUE FALSE 160 INFIXL NOCODE * + /* integer division */ + 60 div intdiv 0 0 0 TRUE FALSE 160 INFIXL NOCODE ++ /* modulus */ ++ 61 mod mod 0 0 0 TRUE TRUE 160 INFIXL NOCODE + ;; + + /* int -> int -> o */ diff --git a/dev-lang/teyjus/files/teyjus-2.1-p002-Add-string-literals-from-proper-character-groups.patch b/dev-lang/teyjus/files/teyjus-2.1-p002-Add-string-literals-from-proper-character-groups.patch new file mode 100644 index 000000000000..0d5e4acbb913 --- /dev/null +++ b/dev-lang/teyjus/files/teyjus-2.1-p002-Add-string-literals-from-proper-character-groups.patch @@ -0,0 +1,45 @@ +commit 78ba2ba7e42d06e64a7a10915259a4e419aa4ce4 +Merge: 4e53477 bb9ba6a +Author: fafounet +Date: Sat Feb 27 13:10:59 2016 +0100 + + Merge pull request #104 from robblanco/string-literals + + Add string literals from proper character groups + +commit bb9ba6a57969c9eeab5841923ca822756860163c +Author: Rob Blanco +Date: Wed Feb 24 19:01:06 2016 +0100 + + Add string literals from proper character groups + + Escape prefixes were included in the strings being passed to the + character composition functions, resulting in incorrect characters + being generated (in the case of control characters) or exceptions + being thrown (in octal and hex literals, in combination with the + OCaml-specific prefixes). + +diff --git a/source/compiler/lplex.mll b/source/compiler/lplex.mll +index 6cb28cd..6b2576a 100644 +--- a/source/compiler/lplex.mll ++++ b/source/compiler/lplex.mll +@@ -215,11 +215,14 @@ and stringstate = parse + | "\\\"" {addChar '"'; stringstate lexbuf} + | "\"\"" {addChar '"'; stringstate lexbuf} + +-| "\\^"['@'-'z'] as text {addControl text; stringstate lexbuf} +-| "\\" OCTAL as text {addOctal text; stringstate lexbuf} +-| "\\" (OCTAL OCTAL OCTAL) as text {addOctal text; stringstate lexbuf} +-| "\\x" HEX as text {addHex text; stringstate lexbuf} +-| "\\x" (HEX HEX) as text {addHex text; stringstate lexbuf} ++| "\\^" (['@'-'z'] as text) {addControl (String.make 1 text); ++ stringstate lexbuf} ++| "\\" (OCTAL as text) {addOctal (String.make 1 text); ++ stringstate lexbuf} ++| "\\" (OCTAL OCTAL OCTAL as text) {addOctal text; stringstate lexbuf} ++| "\\x" (HEX as text) {addHex (String.make 1 text); ++ stringstate lexbuf} ++| "\\x" (HEX HEX as text) {addHex text; stringstate lexbuf} + + | "\\x" _ {Errormsg.error lexbuf.lex_curr_p + "Illegal hex character specification"; diff --git a/dev-lang/teyjus/files/teyjus-2.1-p003-Removing-deprecated-function-String.set.patch b/dev-lang/teyjus/files/teyjus-2.1-p003-Removing-deprecated-function-String.set.patch new file mode 100644 index 000000000000..a6724a9093ac --- /dev/null +++ b/dev-lang/teyjus/files/teyjus-2.1-p003-Removing-deprecated-function-String.set.patch @@ -0,0 +1,51 @@ +commit 38772fa56ed7edef88e71df8a69eea4f341968ed +Author: Giselle Reis +Date: Fri Jul 26 15:28:03 2019 +0300 + + Removing deprecated function String.set + + Teyjus will not build with a typecheck error + because String.set takes bytes, not a string. This + commit fixes this issue. + String.set is deprecated, so Bytes.set is used + instead. + +diff --git a/source/compiler/bytecode.ml b/source/compiler/bytecode.ml +index 957c276..655ddab 100644 +--- a/source/compiler/bytecode.ml ++++ b/source/compiler/bytecode.ml +@@ -248,28 +248,28 @@ let readWord () = readNBytes (getInChannel ()) (getWordSize ()) + let readString () = + let input = getInChannel () in + let length = readNBytes input 4 in +- let myString = String.make length ' ' in ++ let myString = Bytes.make length ' ' in + let rec readStringAux index = + if (index = length) then () + else +- (String.set myString index (input_char input); ++ (Bytes.set myString index (input_char input); + readStringAux (index + 1)) + in + readStringAux 0; +- myString ++ Bytes.to_string myString + + let readLongString () = + let input = getInChannel() in + let length = readNBytes input 4 in +- let myString = String.make length ' ' in ++ let myString = Bytes.make length ' ' in + let rec readStringAux index = + if (index = length) then () + else +- (String.set myString index (input_char input); ++ (Bytes.set myString index (input_char input); + readStringAux (index + 1)) + in + readStringAux 0; +- myString ++ Bytes.to_string myString + + (* skip n bytes *) + let skipNBytes numberBytes = -- cgit v1.2.3