Merge pull request #24 from JetBrains-Research/stringBuf_init

Runtime: Initializate concatenation buffer by zeros
This commit is contained in:
Dmitry Boulytchev 2022-10-11 17:05:26 +03:00 committed by GitHub
commit 1a1c2e6280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 3 deletions

View file

@ -1 +0,0 @@
../stdlib/.gitignore

5
regression/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*.html
*.sm
/*.log
*.i
*.s

View file

@ -402,6 +402,7 @@ static StringBuf stringBuf;
static void createStringBuf () {
stringBuf.contents = (char*) malloc (STRINGBUF_INIT);
memset(stringBuf.contents, 0, STRINGBUF_INIT);
stringBuf.ptr = 0;
stringBuf.len = STRINGBUF_INIT;
}

3
stdlib/.gitignore vendored
View file

@ -1,6 +1,5 @@
*.html
*.sm
*.log
/*.log
*.i
*.s

1
stdlib/regression/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/*.log

View file

@ -0,0 +1,2 @@
{}.string: 0
{}.stringcat:

View file

@ -0,0 +1,5 @@
import List;
import Array;
printf ("{}.string: %s\n", {}.string);
printf ("{}.stringcat: %s\n", {}.stringcat)