summary refs log tree commit diff stats
path: root/lib/deprecated
Commit message (Expand)AuthorAgeFilesLines
* properly deprecate parseopt2 (#10452)Miran2019-01-251-0/+155
* Remove deprecated modules (asyncio, sockets, ftpclient) (#10401)Miran2019-01-223-3128/+0
* remove deprecated modules (#10215)Miran2019-01-076-386/+6
* Merge remote-tracking branch 'upstream/devel' into record-caseNeelesh Chandola2018-12-131-4/+0
|\
| * Give error when case has an else branch even though all cases are already cov...Neelesh Chandola2018-12-131-4/+0
* | Fix ftpclient.nimNeelesh Chandola2018-12-131-1/+0
|/
* Fixes #9671 (#9750)Randy Smith2018-11-191-0/+21
* removes deprecated T/P typesAraq2018-11-165-22/+0
* stdlib: documenation updates, the exception names have been changedAndreas Rumpf2018-10-252-19/+19
* Convert *_family fields to cushortLemonBoy2018-09-191-9/+9
* Merge branch 'devel' into araq-miscAndreas Rumpf2018-08-161-0/+2
|\
| * Haiku support for Nim (#8542)alaviss2018-08-141-0/+2
* | fixes more nil handling regressionsAraq2018-08-131-2/+1
|/
* Fix undefined PObject referenceJoey Yakimowich-Payne2018-07-121-1/+1
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-1/+1
* remove dead code elimination option (#7669)Jacek Sieka2018-04-231-1/+1
* Change type of `Timeval.tv_sec` to `posix.Time` (#7646)Oscar Nihlgård2018-04-182-6/+14
* Trim remaining expr/stmt from stdlib (#6742)Lynn C. Rees2017-11-151-2/+2
* make tests green againAndreas Rumpf2017-11-021-1/+1
* make tests green againAndreas Rumpf2017-10-291-2/+2
* more replacements for the deprecated '<'Andreas Rumpf2017-10-291-3/+3
* Fix compilation of the deprecated sockets module hackishly.Dominik Picheta2017-08-111-2/+4
* Remove expr/stmt (#5857)Arne Döring2017-07-251-17/+16
* Posix from detect (#5697)Jacek Sieka2017-04-121-1/+1
* make tests green againAndreas Rumpf2016-08-231-2/+2
* Added 'android4' define support that declares a different gethostbyaddr. Fixe...Ruslan Mustakov2016-06-221-2/+7
* Define ports as uint16s to fix #3484Josep Sanjuas2016-03-271-2/+14
* Revert two deprecation changesdef2016-01-261-1/+1
* Fix a few deprecation warningsdef2016-01-252-3/+2
* docs now build againAraq2015-10-121-178/+0
* Rename rawsockets module to nativesocketsAdam Strzelecki2015-10-033-3/+17
* Move deprecated modules into lib/deprecated/Adam Strzelecki2015-09-308-0/+3679
r ### Arithmetic Operations - ADD ; Add top two numbers - SUB ; Subtract - MUL ; Multiply - DIV ; Divide - REMAINDER ; Modulo operation ### Comparison Operations - EQ ; Generic equality test - NUM_EQ ; Numeric equality - NUM_LT ; Less than - NUM_GT ; Greater than ### Control Flow - JUMP offset ; Unconditional jump - JUMP_IF_FALSE offset ; Conditional jump - JUMP_IF_TRUE offset ; Conditional jump ### Type Operations - TYPE_OF ; Get type of value - IS_PAIR ; Test if value is pair - IS_NUMBER ; Test if value is number - IS_SYMBOL ; Test if value is symbol ## Example Instruction Sequences ### Function Definition ```scheme (define (add1 x) (+ x 1)) ``` Compiles to: ``` MAKE_FUNCTION L1 STORE_LOCAL 0 JUMP L2 L1: LOAD_LOCAL 0 ; Load x PUSH_CONST 1 ADD RETURN L2: ``` ### List Creation ```scheme (cons 1 (cons 2 '())) ``` Compiles to: ``` PUSH_CONST 1 PUSH_CONST 2 PUSH_CONST nil CONS CONS ``` ### Closure Creation ```scheme (let ((x 1)) (lambda (y) (+ x y))) ``` Compiles to: ``` PUSH_CONST 1 ; Push initial value of x MAKE_FUNCTION L1 ; Create function body MAKE_CLOSURE 1 ; Create closure capturing x JUMP L2 L1: LOAD_FREE 0 ; Load captured x LOAD_LOCAL 0 ; Load parameter y ADD RETURN L2: ``` ## Implementation Notes 1. The VM should implement proper tail-call optimization using the TAIL_CALL instruction. 2. Garbage collection can be implemented using a simple mark-and-sweep collector, scanning the stack and heap for reachable objects. 3. For efficiency, common constants (small integers, nil, etc.) can be preallocated and shared. 4. The environment model uses static scope, with closures capturing their creation environment. 5. Function calls maintain their own stack frame with local variables and operand stack.