unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Sean Lynch <sean@seanplynch.com>
To: guile-devel@gnu.org
Cc: Sean Lynch <sean@seanplynch.com>
Subject: [PATCH 1/4] Support ecmascript return operator with no operand.
Date: Wed, 28 Oct 2020 00:03:29 -0400	[thread overview]
Message-ID: <20201028040330.22051-2-sean@seanplynch.com> (raw)
In-Reply-To: <20201028040330.22051-1-sean@seanplynch.com>

* module/language/ecmascript/compile-tree-il.scm: Support return
  operator with no operand.
---
 module/language/ecmascript/compile-tree-il.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/module/language/ecmascript/compile-tree-il.scm b/module/language/ecmascript/compile-tree-il.scm
index d61f7120d..074674142 100644
--- a/module/language/ecmascript/compile-tree-il.scm
+++ b/module/language/ecmascript/compile-tree-il.scm
@@ -375,6 +375,8 @@
       ((call ,proc ,args)
        `(call ,(comp proc e)                
               ,@(map (lambda (x) (comp x e)) args)))
+      ((return)
+       (return (@implv *undefined*)))
       ((return ,expr)
        (return (comp expr e)))
       ((array . ,args)
-- 
2.29.1




  reply	other threads:[~2020-10-28  4:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  4:03 [PATCH 0/4] Support ECMAScript Test262 Assertion Harness Sean Lynch
2020-10-28  4:03 ` Sean Lynch [this message]
2020-10-28  4:03 ` [PATCH 2/4] Implement ecmascript try/catch Sean Lynch
2020-10-28  4:03 ` [PATCH 3/4] Implement ecmascript function prototype Sean Lynch
2020-10-28  4:03 ` [PATCH 4/4] Fix some reserved word usages in ecmascript implementation Sean Lynch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201028040330.22051-2-sean@seanplynch.com \
    --to=sean@seanplynch.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).