@effekt-lang/effekt 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/effekt +0 -0
- package/libraries/common/bytearray.effekt +9 -0
- package/libraries/common/exception.effekt +1 -1
- package/libraries/common/io/filesystem.effekt +18 -0
- package/libraries/common/resizable_array.effekt +1 -1
- package/libraries/common/stream.effekt +8 -3
- package/libraries/llvm/io.c +25 -2
- package/libraries/llvm/rts.ll +32 -29
- package/licenses/eclipse public license, version 2.0 - epl-2.0.html +7 -5
- package/licenses/mit license - mit-license.html +46 -43
- package/licenses/the bsd license - bsd-license.html +47 -42
- package/licenses/the mit license - mit.html +47 -42
- package/package.json +1 -1
package/bin/effekt
CHANGED
|
Binary file
|
|
@@ -41,6 +41,15 @@ extern global def unsafeSet(arr: ByteArray, index: Int, value: Byte): Unit =
|
|
|
41
41
|
"""
|
|
42
42
|
chez "(bytevector-u8-set! ${arr} ${index} ${value})"
|
|
43
43
|
|
|
44
|
+
/// Creates a new ByteArray of size `size` filled with the value `init`
|
|
45
|
+
def bytearray(size: Int, init: Byte): ByteArray = {
|
|
46
|
+
val arr = allocate(size);
|
|
47
|
+
each(0, size) { i =>
|
|
48
|
+
unsafeSet(arr, i, init)
|
|
49
|
+
};
|
|
50
|
+
arr
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
def resize(source: ByteArray, size: Int): ByteArray = {
|
|
45
54
|
val target = allocate(size)
|
|
46
55
|
val n = min(source.size, target.size)
|
|
@@ -50,7 +50,7 @@ def wrongFormat(msg: String): Nothing / Exception[WrongFormat] =
|
|
|
50
50
|
/**
|
|
51
51
|
* A fatal runtime error that cannot be caught
|
|
52
52
|
*/
|
|
53
|
-
extern io def panic
|
|
53
|
+
extern io def panic(msg: String): Nothing =
|
|
54
54
|
js "(function() { throw ${msg} })()"
|
|
55
55
|
chez "(raise ${msg})"
|
|
56
56
|
llvm """
|
|
@@ -109,6 +109,10 @@ def close(file: File): Unit / Exception[IOError] = {
|
|
|
109
109
|
internal::checkResult(internal::close(file)); ()
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
def mkdir(path: String): Unit / Exception[IOError] = {
|
|
113
|
+
internal::checkResult(internal::mkdir(path)); ()
|
|
114
|
+
}
|
|
115
|
+
|
|
112
116
|
namespace internal {
|
|
113
117
|
|
|
114
118
|
extern js """
|
|
@@ -149,6 +153,12 @@ namespace internal {
|
|
|
149
153
|
if (err) { callback(err.errno) } else { callback(0) }
|
|
150
154
|
})
|
|
151
155
|
}
|
|
156
|
+
|
|
157
|
+
function mkdir(path, callback) {
|
|
158
|
+
fs.mkdir(path, (err) => {
|
|
159
|
+
if (err) { callback(err.errno) } else { callback(0) }
|
|
160
|
+
})
|
|
161
|
+
}
|
|
152
162
|
"""
|
|
153
163
|
|
|
154
164
|
extern llvm """
|
|
@@ -158,6 +168,7 @@ namespace internal {
|
|
|
158
168
|
declare void @c_fs_read(%Int, %Pos, %Int, %Int, %Int, %Stack)
|
|
159
169
|
declare void @c_fs_write(%Int, %Pos, %Int, %Int, %Int, %Stack)
|
|
160
170
|
declare void @c_fs_close(%Int, %Stack)
|
|
171
|
+
declare void @c_fs_mkdir(%Pos, %Stack)
|
|
161
172
|
"""
|
|
162
173
|
|
|
163
174
|
extern async def openForReading(path: String): Int =
|
|
@@ -204,6 +215,13 @@ namespace internal {
|
|
|
204
215
|
ret void
|
|
205
216
|
"""
|
|
206
217
|
|
|
218
|
+
extern async def mkdir(path: String): Int =
|
|
219
|
+
jsNode "$effekt.capture(callback => mkdir(${path}, callback))"
|
|
220
|
+
llvm """
|
|
221
|
+
call void @c_fs_mkdir(%Pos ${path}, %Stack %stack)
|
|
222
|
+
ret void
|
|
223
|
+
"""
|
|
224
|
+
|
|
207
225
|
def checkResult(result: Int): Int / Exception[IOError] =
|
|
208
226
|
if (result < 0) {
|
|
209
227
|
val ioError = fromNumber(internal::errorNumber(result));
|
|
@@ -29,7 +29,7 @@ def resizableArray[T](): ResizableArray[T] = resizableArray(8)
|
|
|
29
29
|
|
|
30
30
|
/// Throw an OutOfBounds exception if index is not a valid index into arr
|
|
31
31
|
def boundsCheck[T](arr: ResizableArray[T], index: Int): Unit / Exception[OutOfBounds] = {
|
|
32
|
-
if (index < 0
|
|
32
|
+
if (index < 0 || index >= arr.size) {
|
|
33
33
|
do raise(OutOfBounds(), "Array index out of bounds: " ++ show(index))
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -282,7 +282,10 @@ def writeFile[R](path: String) { stream: () => R / emit[Byte] }: R / Exception[I
|
|
|
282
282
|
push(0, offset)
|
|
283
283
|
return r
|
|
284
284
|
} with emit[Byte] { (byte) =>
|
|
285
|
-
if (offset >= buffer.size) {
|
|
285
|
+
if (offset >= buffer.size) {
|
|
286
|
+
push(0, buffer.size)
|
|
287
|
+
offset = 0
|
|
288
|
+
}
|
|
286
289
|
buffer.unsafeSet(offset, byte)
|
|
287
290
|
offset = offset + 1
|
|
288
291
|
resume(())
|
|
@@ -304,7 +307,6 @@ def readFile[R](path: String) { reader: () => R / read[Byte] }: R / Exception[IO
|
|
|
304
307
|
case 0 =>
|
|
305
308
|
do stop()
|
|
306
309
|
case n =>
|
|
307
|
-
offset = 0
|
|
308
310
|
length = n
|
|
309
311
|
}
|
|
310
312
|
}
|
|
@@ -313,7 +315,10 @@ def readFile[R](path: String) { reader: () => R / read[Byte] }: R / Exception[IO
|
|
|
313
315
|
reader()
|
|
314
316
|
} with read[Byte] {
|
|
315
317
|
resume {
|
|
316
|
-
if (offset >= length) {
|
|
318
|
+
if (offset >= length) {
|
|
319
|
+
pull()
|
|
320
|
+
offset = 0
|
|
321
|
+
}
|
|
317
322
|
val byte = buffer.unsafeGet(offset)
|
|
318
323
|
offset = offset + 1
|
|
319
324
|
return byte
|
package/libraries/llvm/io.c
CHANGED
|
@@ -71,7 +71,7 @@ void c_fs_open(String path, int flags, Stack stack) {
|
|
|
71
71
|
uv_fs_t* request = malloc(sizeof(uv_fs_t));
|
|
72
72
|
request->data = stack;
|
|
73
73
|
|
|
74
|
-
int result = uv_fs_open(uv_default_loop(), request, path_str, flags,
|
|
74
|
+
int result = uv_fs_open(uv_default_loop(), request, path_str, flags, 0777, c_resume_int_fs);
|
|
75
75
|
|
|
76
76
|
if (result < 0) {
|
|
77
77
|
uv_fs_req_cleanup(request);
|
|
@@ -79,7 +79,7 @@ void c_fs_open(String path, int flags, Stack stack) {
|
|
|
79
79
|
resume_Int(stack, result);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
//
|
|
82
|
+
// Free the string since libuv copies it into the request
|
|
83
83
|
free(path_str);
|
|
84
84
|
|
|
85
85
|
return;
|
|
@@ -147,6 +147,29 @@ void c_fs_close(Int file, Stack stack) {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
void c_fs_mkdir(String path, Stack stack) {
|
|
151
|
+
|
|
152
|
+
// Convert the Effekt String to a null-terminated string
|
|
153
|
+
char* path_str = c_bytearray_into_nullterminated_string(path);
|
|
154
|
+
erasePositive((struct Pos) path);
|
|
155
|
+
|
|
156
|
+
uv_fs_t* request = malloc(sizeof(uv_fs_t));
|
|
157
|
+
request->data = stack;
|
|
158
|
+
|
|
159
|
+
// Perform the mkdir operation
|
|
160
|
+
int result = uv_fs_mkdir(uv_default_loop(), request, path_str, 0777, c_resume_int_fs);
|
|
161
|
+
|
|
162
|
+
if (result < 0) {
|
|
163
|
+
uv_fs_req_cleanup(request);
|
|
164
|
+
free(request);
|
|
165
|
+
resume_Int(stack, result);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Free the string since libuv copies it into the request
|
|
169
|
+
free(path_str);
|
|
170
|
+
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
150
173
|
|
|
151
174
|
/**
|
|
152
175
|
* Maps the libuv error code to a stable (platform independent) numeric value.
|
package/libraries/llvm/rts.ll
CHANGED
|
@@ -151,7 +151,7 @@ define private %Prompt @currentPrompt(%Stack %stack) {
|
|
|
151
151
|
define private %Prompt @freshPrompt() {
|
|
152
152
|
%promptSize = ptrtoint ptr getelementptr (%PromptValue, ptr null, i64 1) to i64
|
|
153
153
|
%prompt = call %Prompt @malloc(i64 %promptSize)
|
|
154
|
-
store %PromptValue zeroinitializer, %Prompt %prompt
|
|
154
|
+
store %PromptValue zeroinitializer, %Prompt %prompt, !alias.scope !4
|
|
155
155
|
ret %Prompt %prompt
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -244,7 +244,7 @@ define void @eraseNegative(%Neg %val) alwaysinline {
|
|
|
244
244
|
|
|
245
245
|
define private %Stack @getStack(%Prompt %prompt) {
|
|
246
246
|
%stack_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
247
|
-
%stack = load %Stack, ptr %stack_pointer
|
|
247
|
+
%stack = load %Stack, ptr %stack_pointer, !alias.scope !4
|
|
248
248
|
ret %Stack %stack
|
|
249
249
|
}
|
|
250
250
|
|
|
@@ -280,8 +280,8 @@ define private %Stack @checkLimit(%Stack %stack, i64 %n) alwaysinline {
|
|
|
280
280
|
%stackPointer_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 1
|
|
281
281
|
%limit_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 2
|
|
282
282
|
|
|
283
|
-
%currentStackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !
|
|
284
|
-
%limit = load %Limit, ptr %limit_pointer, !alias.scope !
|
|
283
|
+
%currentStackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !3
|
|
284
|
+
%limit = load %Limit, ptr %limit_pointer, !alias.scope !3
|
|
285
285
|
%nextStackPointer = getelementptr i8, %StackPointer %currentStackPointer, i64 %n
|
|
286
286
|
%isInside = icmp ule %StackPointer %nextStackPointer, %limit
|
|
287
287
|
br i1 %isInside, label %done, label %realloc
|
|
@@ -304,13 +304,13 @@ realloc:
|
|
|
304
304
|
%newStackPointer_pointer = getelementptr %StackValue, %Stack %newStack, i64 0, i32 1
|
|
305
305
|
%newLimit_pointer = getelementptr %StackValue, %Stack %newStack, i64 0, i32 2
|
|
306
306
|
|
|
307
|
-
store %StackPointer %newStackPointer, ptr %newStackPointer_pointer, !alias.scope !
|
|
308
|
-
store %Limit %newLimit, ptr %newLimit_pointer, !alias.scope !
|
|
307
|
+
store %StackPointer %newStackPointer, ptr %newStackPointer_pointer, !alias.scope !3
|
|
308
|
+
store %Limit %newLimit, ptr %newLimit_pointer, !alias.scope !3
|
|
309
309
|
|
|
310
310
|
%prompt_pointer = getelementptr %StackValue, %Stack %newStack, i64 0, i32 3
|
|
311
311
|
%prompt = load %Prompt, ptr %prompt_pointer
|
|
312
312
|
%promptStack = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
313
|
-
store %Stack %newStack, ptr %promptStack
|
|
313
|
+
store %Stack %newStack, ptr %promptStack, !alias.scope !4
|
|
314
314
|
|
|
315
315
|
ret %Stack %newStack
|
|
316
316
|
}
|
|
@@ -319,26 +319,26 @@ define private %StackPointer @stackAllocate(%Stack %stack, i64 %n) alwaysinline
|
|
|
319
319
|
%stackPointer_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 1
|
|
320
320
|
%limit_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 2
|
|
321
321
|
|
|
322
|
-
%currentStackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !
|
|
323
|
-
%limit = load %Limit, ptr %limit_pointer, !alias.scope !
|
|
322
|
+
%currentStackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !3
|
|
323
|
+
%limit = load %Limit, ptr %limit_pointer, !alias.scope !3
|
|
324
324
|
%nextStackPointer = getelementptr i8, %StackPointer %currentStackPointer, i64 %n
|
|
325
325
|
|
|
326
|
-
store %StackPointer %nextStackPointer, ptr %stackPointer_pointer, !alias.scope !
|
|
326
|
+
store %StackPointer %nextStackPointer, ptr %stackPointer_pointer, !alias.scope !3
|
|
327
327
|
ret %StackPointer %currentStackPointer
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
define private %StackPointer @stackDeallocate(%Stack %stack, i64 %n) {
|
|
331
331
|
%stackPointer_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 1
|
|
332
|
-
%stackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !
|
|
332
|
+
%stackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !3
|
|
333
333
|
|
|
334
334
|
%limit_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 2
|
|
335
|
-
%limit = load %Limit, ptr %limit_pointer, !alias.scope !
|
|
335
|
+
%limit = load %Limit, ptr %limit_pointer, !alias.scope !3
|
|
336
336
|
%isInside = icmp ule %StackPointer %stackPointer, %limit
|
|
337
337
|
call void @llvm.assume(i1 %isInside)
|
|
338
338
|
|
|
339
339
|
%o = sub i64 0, %n
|
|
340
340
|
%newStackPointer = getelementptr i8, %StackPointer %stackPointer, i64 %o
|
|
341
|
-
store %StackPointer %newStackPointer, ptr %stackPointer_pointer, !alias.scope !
|
|
341
|
+
store %StackPointer %newStackPointer, ptr %stackPointer_pointer, !alias.scope !3
|
|
342
342
|
|
|
343
343
|
ret %StackPointer %newStackPointer
|
|
344
344
|
}
|
|
@@ -352,11 +352,11 @@ define private i64 @nextPowerOfTwo(i64 %x) {
|
|
|
352
352
|
|
|
353
353
|
define private void @assumeFrameHeaderWasPopped(%Stack %stack) alwaysinline {
|
|
354
354
|
%stackPointer_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 1
|
|
355
|
-
%stackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !
|
|
355
|
+
%stackPointer = load %StackPointer, ptr %stackPointer_pointer, !alias.scope !3
|
|
356
356
|
%oldStackPointer = getelementptr %FrameHeader, %StackPointer %stackPointer, i64 1
|
|
357
357
|
|
|
358
358
|
%limit_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 2
|
|
359
|
-
%limit = load %Limit, ptr %limit_pointer, !alias.scope !
|
|
359
|
+
%limit = load %Limit, ptr %limit_pointer, !alias.scope !3
|
|
360
360
|
%isInside = icmp ule %StackPointer %oldStackPointer, %limit
|
|
361
361
|
call void @llvm.assume(i1 %isInside)
|
|
362
362
|
ret void
|
|
@@ -381,7 +381,7 @@ define private %Stack @reset(%Stack %oldStack) {
|
|
|
381
381
|
store %StackValue %stack.3, %Stack %stack
|
|
382
382
|
|
|
383
383
|
%promptStack = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
384
|
-
store %Stack %stack, ptr %promptStack
|
|
384
|
+
store %Stack %stack, ptr %promptStack, !alias.scope !4
|
|
385
385
|
|
|
386
386
|
ret %Stack %stack
|
|
387
387
|
}
|
|
@@ -390,7 +390,7 @@ define private void @revalidate(%Stack %stack) {
|
|
|
390
390
|
%prompt_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 3
|
|
391
391
|
%prompt = load %Prompt, ptr %prompt_pointer
|
|
392
392
|
%stack_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
393
|
-
%promptStack = load %Stack, ptr %stack_pointer
|
|
393
|
+
%promptStack = load %Stack, ptr %stack_pointer, !alias.scope !4
|
|
394
394
|
%isThis = icmp eq %Stack %promptStack, %stack
|
|
395
395
|
br i1 %isThis, label %done, label %continue
|
|
396
396
|
|
|
@@ -406,7 +406,7 @@ displace:
|
|
|
406
406
|
br label %update
|
|
407
407
|
|
|
408
408
|
update:
|
|
409
|
-
store %Stack %stack, ptr %stack_pointer
|
|
409
|
+
store %Stack %stack, ptr %stack_pointer, !alias.scope !4
|
|
410
410
|
|
|
411
411
|
%next_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 4
|
|
412
412
|
%next = load %Stack, ptr %next_pointer
|
|
@@ -420,7 +420,7 @@ define private void @invalidate(%Stack %stack, %Stack %end) {
|
|
|
420
420
|
%next_pointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 4
|
|
421
421
|
%prompt = load %Prompt, ptr %prompt_pointer
|
|
422
422
|
%stack_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
423
|
-
store %Stack null, ptr %stack_pointer
|
|
423
|
+
store %Stack null, ptr %stack_pointer, !alias.scope !4
|
|
424
424
|
|
|
425
425
|
%next = load %Stack, ptr %next_pointer
|
|
426
426
|
|
|
@@ -456,7 +456,7 @@ define private %Stack @resume(%Resumption %resumption, %Stack %oldStack) {
|
|
|
456
456
|
|
|
457
457
|
define private {%Resumption, %Stack} @shift(%Stack %stack, %Prompt %prompt) {
|
|
458
458
|
%resumpion_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
459
|
-
%resumption = load %Stack, ptr %resumpion_pointer
|
|
459
|
+
%resumption = load %Stack, ptr %resumpion_pointer, !alias.scope !4
|
|
460
460
|
%next_pointer = getelementptr %StackValue, %Stack %resumption, i64 0, i32 4
|
|
461
461
|
%next = load %Stack, ptr %next_pointer
|
|
462
462
|
|
|
@@ -469,12 +469,12 @@ define private {%Resumption, %Stack} @shift(%Stack %stack, %Prompt %prompt) {
|
|
|
469
469
|
|
|
470
470
|
define private void @erasePrompt(%Prompt %prompt) alwaysinline {
|
|
471
471
|
%referenceCount_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 0
|
|
472
|
-
%referenceCount = load %ReferenceCount, ptr %referenceCount_pointer
|
|
472
|
+
%referenceCount = load %ReferenceCount, ptr %referenceCount_pointer, !alias.scope !4
|
|
473
473
|
switch %ReferenceCount %referenceCount, label %decrement [%ReferenceCount 0, label %free]
|
|
474
474
|
|
|
475
475
|
decrement:
|
|
476
476
|
%newReferenceCount = sub %ReferenceCount %referenceCount, 1
|
|
477
|
-
store %ReferenceCount %newReferenceCount, ptr %referenceCount_pointer
|
|
477
|
+
store %ReferenceCount %newReferenceCount, ptr %referenceCount_pointer, !alias.scope !4
|
|
478
478
|
ret void
|
|
479
479
|
|
|
480
480
|
free:
|
|
@@ -484,9 +484,9 @@ free:
|
|
|
484
484
|
|
|
485
485
|
define private void @sharePrompt(%Prompt %prompt) alwaysinline {
|
|
486
486
|
%referenceCount_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 0
|
|
487
|
-
%referenceCount = load %ReferenceCount, ptr %referenceCount_pointer
|
|
487
|
+
%referenceCount = load %ReferenceCount, ptr %referenceCount_pointer, !alias.scope !4
|
|
488
488
|
%newReferenceCount = add %ReferenceCount %referenceCount, 1
|
|
489
|
-
store %ReferenceCount %newReferenceCount, ptr %referenceCount_pointer
|
|
489
|
+
store %ReferenceCount %newReferenceCount, ptr %referenceCount_pointer, !alias.scope !4
|
|
490
490
|
ret void
|
|
491
491
|
}
|
|
492
492
|
|
|
@@ -498,7 +498,7 @@ define private %Stack @underflowStack(%Stack %stack) {
|
|
|
498
498
|
%rest = load %Stack, ptr %stackRest
|
|
499
499
|
|
|
500
500
|
%promptStack_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
501
|
-
store %Stack null, ptr %promptStack_pointer
|
|
501
|
+
store %Stack null, ptr %promptStack_pointer, !alias.scope !4
|
|
502
502
|
|
|
503
503
|
call void @erasePrompt(%Prompt %prompt)
|
|
504
504
|
call void @free(%Stack %stack)
|
|
@@ -630,12 +630,12 @@ define void @eraseStack(%Stack %stack) alwaysinline {
|
|
|
630
630
|
%rest = load %Stack, ptr %rest_pointer
|
|
631
631
|
|
|
632
632
|
%promptStack_pointer = getelementptr %PromptValue, %Prompt %prompt, i64 0, i32 1
|
|
633
|
-
%promptStack = load %Stack, ptr %promptStack_pointer
|
|
633
|
+
%promptStack = load %Stack, ptr %promptStack_pointer, !alias.scope !4
|
|
634
634
|
%isThisStack = icmp eq %Stack %promptStack, %stack
|
|
635
635
|
br i1 %isThisStack, label %clearPrompt, label %free
|
|
636
636
|
|
|
637
637
|
clearPrompt:
|
|
638
|
-
store %Stack null, ptr %promptStack_pointer
|
|
638
|
+
store %Stack null, ptr %promptStack_pointer, !alias.scope !4
|
|
639
639
|
br label %free
|
|
640
640
|
|
|
641
641
|
free:
|
|
@@ -721,7 +721,7 @@ define private %Stack @withEmptyStack() {
|
|
|
721
721
|
%stack = call %Stack @reset(%Stack %globals)
|
|
722
722
|
|
|
723
723
|
%globalStack = getelementptr %PromptValue, %Prompt @global, i64 0, i32 1
|
|
724
|
-
store %Stack %stack, ptr %globalStack
|
|
724
|
+
store %Stack %stack, ptr %globalStack, !alias.scope !4
|
|
725
725
|
|
|
726
726
|
%stackStackPointer = getelementptr %StackValue, %Stack %stack, i64 0, i32 1
|
|
727
727
|
%stackPointer = load %StackPointer, ptr %stackStackPointer
|
|
@@ -807,6 +807,9 @@ define void @run_Pos(%Neg %f, %Pos %argument) {
|
|
|
807
807
|
|
|
808
808
|
; Scopes
|
|
809
809
|
!1 = !{!"stackValues", !0}
|
|
810
|
+
!2 = !{!"prompts", !0}
|
|
810
811
|
|
|
811
812
|
; Scope lists
|
|
812
|
-
!
|
|
813
|
+
!3 = !{!1} ; stackValues
|
|
814
|
+
!4 = !{!2} ; prompts
|
|
815
|
+
!5 = !{!1, !2} ; stackValues & prompts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang=en><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Eclipse Public License 2.0 (EPL) | The Eclipse Foundation</title><meta property="og:title" content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=twitter:title content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta property="og:description" content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=twitter:description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=author content="Wayne Beaton"><link href=/favicon.ico rel=icon type=image/x-icon><meta property="og:image" content="https://www.eclipse.org/images/logos/eclipse-foundation-400x400.png"><meta name=twitter:image content="https://www.eclipse.org/images/logos/eclipse-foundation-400x400.png"><meta name=twitter:card content="summary"><meta name=twitter:site content="@eclipsefdn"><meta name=twitter:creator content="@eclipsefdn"><meta property="og:url" content="https://www.eclipse.org/legal/epl-2.0/"><meta property="og:type" content="website"><meta property="og:site_name" content="Eclipse Foundation"><meta name=keywords content="epl,epl-2.0,legal,foundation,eclipse,eclipse public license,license,licenses"><meta name=generator content="Hugo 0.110.0"><link rel=canonical href=https://www.eclipse.org/legal/epl-2.0/><link rel=alternate href=/legal/epl-2.0/index.xml type=application/rss+xml title><link rel=stylesheet href="/public/css/styles.css?v=
|
|
1
|
+
<!doctype html><html lang=en><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Eclipse Public License 2.0 (EPL) | The Eclipse Foundation</title><meta property="og:title" content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=twitter:title content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta property="og:description" content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=twitter:description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=author content="Wayne Beaton"><link href=/favicon.ico rel=icon type=image/x-icon><meta property="og:image" content="https://www.eclipse.org/images/logos/eclipse-foundation-400x400.png"><meta name=twitter:image content="https://www.eclipse.org/images/logos/eclipse-foundation-400x400.png"><meta name=twitter:card content="summary"><meta name=twitter:site content="@eclipsefdn"><meta name=twitter:creator content="@eclipsefdn"><meta property="og:url" content="https://www.eclipse.org/legal/epl-2.0/"><meta property="og:type" content="website"><meta property="og:site_name" content="Eclipse Foundation"><meta name=keywords content="epl,epl-2.0,legal,foundation,eclipse,eclipse public license,license,licenses"><meta name=generator content="Hugo 0.110.0"><link rel=canonical href=https://www.eclipse.org/legal/epl-2.0/><link rel=alternate href=/legal/epl-2.0/index.xml type=application/rss+xml title><link rel=stylesheet href="/public/css/styles.css?v=1740338125"><script>(function(e,t,n,s,o){e[s]=e[s]||[],e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5WLCZXC")</script><script>var tableClasses="table"</script><link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel=stylesheet type=text/css></head><body><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5WLCZXC" height=0 width=0 style=display:none;visibility:hidden></iframe></noscript><a class=sr-only href=#content>Skip to main content</a><header class="header-wrapper header-wrapper" id=header><div class=header-toolbar><div class=container><div class=header-toolbar-row><div class="toolbar-btn toolbar-search-btn dropdown"><button class=dropdown-toggle id=toolbar-search type=button data-toggle=dropdown tabindex=0 aria-label=Search>
|
|
2
2
|
<i class="fa fa-search fa-lg" aria-role=none></i></button><div class="toolbar-search-bar-wrapper dropdown-menu dropdown-menu-right" aria-labelledby=toolbar-search><form action=https://www.eclipse.org/home/search method=get><div class=search-bar><input class=search-bar-input name=q placeholder=Search>
|
|
3
3
|
<button>
|
|
4
4
|
<i class="fa fa-search" type=submit></i></button></div></form></div></div><div class="toolbar-btn toolbar-user-menu-btn dropdown"><button class=dropdown-toggle id=toolbar-user-menu type=button data-toggle=dropdown tabindex=0 aria-label="User Menu">
|
|
@@ -10,7 +10,7 @@ Projects</button></li><li class=navbar-nav-links-item><button class="nav-link-js
|
|
|
10
10
|
Supporters</button></li><li class=navbar-nav-links-item><button class="nav-link-js btn-link link-unstyled" type=button aria-expanded=true data-menu-target=collaborations-menu>
|
|
11
11
|
Collaborations</button></li><li class=navbar-nav-links-item><button class="nav-link-js btn-link link-unstyled" type=button aria-expanded=true data-menu-target=resources-menu>
|
|
12
12
|
Resources</button></li><li class=navbar-nav-links-item><button class="nav-link-js btn-link link-unstyled" type=button aria-expanded=true data-menu-target=the-foundation-menu>
|
|
13
|
-
The Foundation</button></li></ul></nav><div class=header-navbar-end><a class="header-navbar-end-download-btn btn btn-primary" href=/downloads
|
|
13
|
+
The Foundation</button></li></ul></nav><div class=header-navbar-end><a class="header-navbar-end-download-btn btn btn-primary" href=/downloads/ id=download-now-top-nav-20250207><i class=fa aria-hidden=true></i>
|
|
14
14
|
Download</a>
|
|
15
15
|
<button class=mobile-menu-btn aria-label="Toggle mobile navigation menu" aria-expanded=false>
|
|
16
16
|
<i class="fa fa-bars fa-xl"></i></button></div></div></div></div><nav class="mobile-menu hidden" aria-expanded=false><ul><li class=mobile-menu-dropdown><a class="mobile-menu-item mobile-menu-dropdown-toggle" data-target=projects-menu><span>Projects</span>
|
|
@@ -47,9 +47,11 @@ open source software collaboration and innovation.</p></div><div class=mega-menu
|
|
|
47
47
|
<i class="main-sidebar-item-icon fa fa-chevron-down" aria-hidden=true></i></a><div class=collapse id=legal-epl-20><ul class="main-sidebar-item-submenu list-unstyled"><li class=submenu-item><a class=link-unstyled href=/legal/epl-2.0/ target=_self>About</a></li><li class=submenu-item><a class=link-unstyled href=/org/documents/epl-2.0/EPL-2.0.html target=_self>Plain HTML</a></li><li class=submenu-item><a class=link-unstyled href=/org/documents/epl-2.0/EPL-2.0.txt target=_self>Plain Text</a></li><li class=submenu-item><a class=link-unstyled href=/org/documents/epl-2.0/EPL-2.0.pdf target=_self>PDF</a></li><li class=submenu-item><a class=link-unstyled href=/legal/epl-2.0/faq/ target=_self>FAQ</a></li></ul></div></li></li><li class="main-sidebar-item main-sidebar-item-indented"><li class="main-sidebar-item main-sidebar-item-indented"><a class=link-unstyled role=button data-toggle=collapse href=#legal-epl-10 aria-expanded=false aria-controls=legal-epl-10><span>EPL-1.0</span>
|
|
48
48
|
<i class="main-sidebar-item-icon fa fa-chevron-down" aria-hidden=true></i></a><div class=collapse id=legal-epl-10><ul class="main-sidebar-item-submenu list-unstyled"><li class=submenu-item><a class=link-unstyled href=/org/documents/epl-v10.php target=_self>About</a></li><li class=submenu-item><a class=link-unstyled href=/org/documents/epl-v10.html target=_self>Plain HTML</a></li><li class=submenu-item><a class=link-unstyled href=/org/documents/epl-1.0/EPL-1.0.txt target=_self>Plain Text</a></li><li class=submenu-item><a class=link-unstyled href=/legal/epl/faq target=_self>FAQ</a></li></ul></div></li></li><li class="main-sidebar-item main-sidebar-item-indented"><li class="main-sidebar-item main-sidebar-item-indented"><a class=link-unstyled role=button data-toggle=collapse href=#legal-licenses aria-expanded=false aria-controls=legal-licenses><span>Licenses</span>
|
|
49
49
|
<i class="main-sidebar-item-icon fa fa-chevron-down" aria-hidden=true></i></a><div class=collapse id=legal-licenses><ul class="main-sidebar-item-submenu list-unstyled"><li class=submenu-item><a class=link-unstyled href=/legal/licenses#approved target=_self>Approved 3rd Party</a></li><li class=submenu-item><a class=link-unstyled href=/legal/licenses#nonapproved target=_self>Non Approved</a></li><li class=submenu-item><a class=link-unstyled href=/projects/handbook/#ip-copyright-headers target=_self>File Headers</a></li><li class=submenu-item><a class=link-unstyled href=/legal/non-code-licenses target=_self>Docs & Examples</a></li></ul></div></li></li><li class="main-sidebar-item main-sidebar-item-indented"><li class="main-sidebar-item main-sidebar-item-indented"><a class=link-unstyled role=button data-toggle=collapse href=#legal-specs aria-expanded=false aria-controls=legal-specs><span>Specifications</span>
|
|
50
|
-
<i class="main-sidebar-item-icon fa fa-chevron-down" aria-hidden=true></i></a><div class=collapse id=legal-specs><ul class="main-sidebar-item-submenu list-unstyled"><li class=submenu-item><a class=link-unstyled href=/projects/efsp/ target=_self>Specifications Process</a></li><li class=submenu-item><a class=link-unstyled href=/projects/efsp/operations.php target=_self>Specifications Operations</a></li><li class=submenu-item><a class=link-unstyled href=/legal/efsl target=_self>Specification License</a></li><li class=submenu-item><a class=link-unstyled href=/legal/tck target=_self>TCK License</a></li></ul></div></li></li></ul></aside></div></div></div></main><div class="eclipsefdn-featured-footer featured-footer" id=featured-footer data-publish-target=eclipse_org><div class=container><div class=row><div class="col-sm-24 featured-container"></div></div></div></div><p id=back-to-top><a class=visible-xs href=#>Back to the top</a></p><footer class=footer id=footer><div class=container><div class="footer-end-social-container margin-bottom-30"><div class=footer-end-social><p class="footer-end-social-text hidden-xs">Follow Us:</p><ul class="footer-end-social-links list-inline"><li><a class=link-unstyled href=https://
|
|
50
|
+
<i class="main-sidebar-item-icon fa fa-chevron-down" aria-hidden=true></i></a><div class=collapse id=legal-specs><ul class="main-sidebar-item-submenu list-unstyled"><li class=submenu-item><a class=link-unstyled href=/projects/efsp/ target=_self>Specifications Process</a></li><li class=submenu-item><a class=link-unstyled href=/projects/efsp/operations.php target=_self>Specifications Operations</a></li><li class=submenu-item><a class=link-unstyled href=/legal/efsl target=_self>Specification License</a></li><li class=submenu-item><a class=link-unstyled href=/legal/tck target=_self>TCK License</a></li></ul></div></li></li></ul></aside></div></div></div></main><div class="eclipsefdn-featured-footer featured-footer" id=featured-footer data-publish-target=eclipse_org><div class=container><div class=row><div class="col-sm-24 featured-container"></div></div></div></div><p id=back-to-top><a class=visible-xs href=#>Back to the top</a></p><footer class=footer id=footer><div class=container><div class="footer-end-social-container margin-bottom-30"><div class=footer-end-social><p class="footer-end-social-text hidden-xs">Follow Us:</p><ul class="footer-end-social-links list-inline"><li><a class=link-unstyled href=https://x.com/EclipseFdn title="X account"><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
51
51
|
<i class="fa-brands fa-x-twitter fa-stack-1x fa-inverse" aria-hidden=true></i>
|
|
52
|
-
<span class=sr-only>
|
|
52
|
+
<span class=sr-only>X account</span></span></a></li><li><a class=link-unstyled href=https://bsky.app/profile/eclipsefdn.bsky.social title="Bluesky account"><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
53
|
+
<i class="fa-brands fa-bluesky fa-stack-1x fa-inverse" aria-hidden=true></i>
|
|
54
|
+
<span class=sr-only>Bluesky account</span></span></a></li><li><a class=link-unstyled href=https://www.facebook.com/eclipse.org title="Facebook account"><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
53
55
|
<i class="fa-brands fa-facebook-f fa-stack-1x fa-inverse" aria-hidden=true></i>
|
|
54
56
|
<span class=sr-only>Facebook account</span></span></a></li><li><a class=link-unstyled href=https://www.youtube.com/user/EclipseFdn title="Youtube account"><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
55
57
|
<i class="fa-brands fa-youtube fa-stack-1x fa-inverse" aria-hidden=true></i>
|
|
@@ -57,5 +59,5 @@ open source software collaboration and innovation.</p></div><div class=mega-menu
|
|
|
57
59
|
<i class="fa-brands fa-linkedin-in fa-stack-1x fa-inverse" aria-hidden=true></i>
|
|
58
60
|
<span class=sr-only>Linkedin account</span></span></a></li></ul></div></div><div class="footer-sections row equal-height-md font-bold"><div class=col-md-15><div class=row><section id=footer-eclipse-foundation class="footer-section col-sm-8"><div class=menu-heading>Eclipse Foundation</div><ul class=nav><li><a href=https://www.eclipse.org/org/>About</a></li><li><a href=https://projects.eclipse.org/>Projects</a></li><li><a href=https://www.eclipse.org/collaborations/>Collaborations</a></li><li><a href=https://www.eclipse.org/membership/>Membership</a></li><li><a href=https://www.eclipse.org/sponsor/>Sponsor</a></li></ul></section><section id=footer-legal class="footer-section col-sm-8"><div class=menu-heading>Legal</div><ul class=nav><li><a href=https://www.eclipse.org/legal/privacy/>Privacy Policy</a></li><li><a href=https://www.eclipse.org/legal/terms-of-use/>Terms of Use</a></li><li><a href=https://www.eclipse.org/legal/compliance/>Compliance</a></li><li><a href=https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php>Code of Conduct</a></li><li><a href=https://www.eclipse.org/legal/>Legal Resources</a></li><li><a class=toolbar-manage-cookies href=# onclick=event.preventDefault()>Manage Cookies</a></li></ul></section><section id=footer-more class="footer-section col-sm-8"><div class=menu-heading>More</div><ul class=nav><li><a href=https://www.eclipse.org/security/>Report a Vulnerability</a></li><li><a href=https://status.eclipse.org/>Service Status</a></li><li><a href=https://www.eclipse.org/org/foundation/contact.php>Contact Us</a></li><li><a href=https://www.eclipse.org/projects/support/>Support</a></li></ul></section></div></div><div id=footer-end class="footer-section col-md-8 col-md-offset-1 col-sm-24"><div class=footer-end-newsletter><form id=mc-embedded-subscribe-form action="https://eclipse.us6.list-manage.com/subscribe/post?u=eaf9e1f06f194eadc66788a85&id=e7538485cd&f_id=00f9c2e1f0" method=post novalidate target=_blank><label class=footer-end-newsletter-label for=email>Subscribe to our Newsletter</label><div class=footer-end-newsletter-input-wrapper><input class=footer-end-newsletter-input type=email id=email name=EMAIL autocomplete=email placeholder="Enter your email address">
|
|
59
61
|
<button class="footer-end-newsletter-submit btn btn-link" id=mc-embedded-subscribe type=submit name=subscribe>
|
|
60
|
-
<i class="fa fa-solid fa-envelope fa-lg" aria-hidden=true></i></button></div></form></div></div></div><div class="col-sm-24 margin-top-20"><div class=row><div id=copyright class=col-md-16><p id=copyright-text>Copyright © Eclipse Foundation AISBL. All Rights Reserved.</p></div></div></div><a href=# class=scrollup>Back to the top</a></div></footer><div id=footer-js><script src="/public/js/main.js?v1.0?v=
|
|
62
|
+
<i class="fa fa-solid fa-envelope fa-lg" aria-hidden=true></i></button></div></form></div></div></div><div class="col-sm-24 margin-top-20"><div class=row><div id=copyright class=col-md-16><p id=copyright-text>Copyright © Eclipse Foundation AISBL. All Rights Reserved.</p></div></div></div><a href=# class=scrollup>Back to the top</a></div></footer><div id=footer-js><script src="/public/js/main.js?v1.0?v=1740338125"></script>
|
|
61
63
|
<script>(function(){})(jQuery,document)</script></div></body></html>
|