on master help sign in
Merge pull request #2230 from markuspf/remove_buffer_leftovers
012be4aDavid Christiansen
rts/idris_rts.h−33
@@ -10,8 +10,6 @@
10#endif
10#endif
11#include <stdint.h>
11#include <stdint.h>
12
12
13−#include <emmintrin.h>
14−
15#include "idris_heap.h"
13#include "idris_heap.h"
16#include "idris_stats.h"
14#include "idris_stats.h"
17
15
@@ -41,14 +39,6 @@ typedef struct {
41 size_t offset;
39 size_t offset;
42} StrOffset;
40} StrOffset;
43
41
44−typedef struct {
45− // If we ever have multithreaded access to the same heap,
46− // fill is mutable so needs synchronization!
47− size_t fill;
48− size_t cap;
49− unsigned char store[];
50−} Buffer;
51−
52// A foreign pointer, managed by the idris GC
42// A foreign pointer, managed by the idris GC
53typedef struct {
43typedef struct {
54 size_t size;
44 size_t size;
@@ -73,8 +63,6 @@ typedef struct Closure {
73 uint16_t bits16;
63 uint16_t bits16;
74 uint32_t bits32;
64 uint32_t bits32;
75 uint64_t bits64;
65 uint64_t bits64;
76− __m128i* bits128p;
77− Buffer* buf;
78 ManagedPtr* mptr;
66 ManagedPtr* mptr;
79 size_t size;
67 size_t size;
80 } info;
68 } info;
@@ -316,27 +304,6 @@ VAL idris_strCons(VM* vm, VAL x, VAL xs);
316VAL idris_strIndex(VM* vm, VAL str, VAL i);
304VAL idris_strIndex(VM* vm, VAL str, VAL i);
317VAL idris_strRev(VM* vm, VAL str);
305VAL idris_strRev(VM* vm, VAL str);
318
306
319−VAL idris_appendB8Native(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
320−VAL idris_appendB16Native(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
321−VAL idris_appendB16LE(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
322−VAL idris_appendB16BE(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
323−VAL idris_appendB32Native(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
324−VAL idris_appendB32LE(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
325−VAL idris_appendB32BE(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
326−VAL idris_appendB64Native(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
327−VAL idris_appendB64LE(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
328−VAL idris_appendB64BE(VM* vm, VAL buf, VAL len, VAL cnt, VAL val);
329−VAL idris_peekB8Native(VM* vm, VAL buf, VAL off);
330−VAL idris_peekB16Native(VM* vm, VAL buf, VAL off);
331−VAL idris_peekB16LE(VM* vm, VAL buf, VAL off);
332−VAL idris_peekB16BE(VM* vm, VAL buf, VAL off);
333−VAL idris_peekB32Native(VM* vm, VAL buf, VAL off);
334−VAL idris_peekB32LE(VM* vm, VAL buf, VAL off);
335−VAL idris_peekB32BE(VM* vm, VAL buf, VAL off);
336−VAL idris_peekB64Native(VM* vm, VAL buf, VAL off);
337−VAL idris_peekB64LE(VM* vm, VAL buf, VAL off);
338−VAL idris_peekB64BE(VM* vm, VAL buf, VAL off);
339−
340// system infox
307// system infox
341// used indices:
308// used indices:
342// 0 returns backend
309// 0 returns backend
src/Idris/ParseExpr.hs−1
@@ -1180,7 +1180,6 @@ Constant ::=
1180 | 'String'
1180 | 'String'
1181 | 'Ptr'
1181 | 'Ptr'
1182 | 'ManagedPtr'
1182 | 'ManagedPtr'
1183− | 'prim__UnsafeBuffer'
1184 | 'Bits8'
1183 | 'Bits8'
1185 | 'Bits16'
1184 | 'Bits16'
1186 | 'Bits32'
1185 | 'Bits32'
test/Makefile+1−1
@@ -8,7 +8,7 @@ test: $(TESTS)
8 @perl ./runtest.pl $(patsubst %.test,%,$@)
8 @perl ./runtest.pl $(patsubst %.test,%,$@)
9
9
10test_js:
10test_js:
11− @perl ./runtest.pl without sugar004 reg029 reg052 io001 dsl002 io003 effects001 effects002 effects003 effects004 buffer001 basic007 basic011 primitives004 ffi006 --codegen node
11+ @perl ./runtest.pl without sugar004 reg029 reg052 io001 dsl002 io003 effects001 effects002 effects003 effects004 basic007 basic011 primitives004 ffi006 --codegen node
12
12
13update:
13update:
14 /usr/bin/env perl ./runtest.pl all -u
14 /usr/bin/env perl ./runtest.pl all -u
test/buffer001-disabled/buffer001.idrdeleted−45
@@ -1,45 +0,0 @@
1−module Main
2−
3−import Data.Buffer
4−
5−em : Buffer 0
6−em = allocate 4
7−
8−one : Bits32
9−one = 1
10−
11−two : Bits8
12−two = 2
13−
14−firstHalf : Buffer 4
15−firstHalf = appendBits32LE em 1 one
16−
17−full : Buffer 8
18−full = appendBits8 firstHalf 4 two
19−
20−firstByte : Bits8
21−firstByte = peekBits8 full 0
22−
23−firstHalfView : Buffer 4
24−firstHalfView = peekBuffer full 0
25−
26−firstHalfCopy : Buffer 4
27−firstHalfCopy = copy firstHalfView
28−
29−oneFromFirstHalf : Bits32
30−oneFromFirstHalf = peekBits32LE firstHalf 0
31−
32−oneFromFirstHalfCopy : Bits32
33−oneFromFirstHalfCopy = peekBits32LE firstHalfCopy 0
34−
35−viewsAndCopiesPreserveEquality : Bool
36−viewsAndCopiesPreserveEquality = ( oneFromFirstHalf == one ) && ( oneFromFirstHalfCopy == one )
37−
38−secondHalfWord : Bits32
39−secondHalfWord = peekBits32LE full 4
40−
41−main : IO ()
42−main = do
43− putStrLn $ show firstByte
44− putStrLn $ show viewsAndCopiesPreserveEquality
45− putStrLn $ show secondHalfWord
test/buffer001-disabled/expecteddeleted−3
@@ -1,3 +0,0 @@
1−01
2−True
3−02020202
test/buffer001-disabled/rundeleted−4
@@ -1,4 +0,0 @@
1−#!/usr/bin/env bash
2−idris $@ buffer001.idr -o buffer001
3−./buffer001
4−rm -f buffer001 *.ibc