From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qFbVA0MJDWchngAAqHPOHw:P1 (envelope-from ) for ; Mon, 14 Oct 2024 14:06:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qFbVA0MJDWchngAAqHPOHw (envelope-from ) for ; Mon, 14 Oct 2024 14:06:27 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b="hbLarz/x"; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=JWbU5wLz; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=pass (policy=none) header.from=maniero.me ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1728907586; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=xii3Pgl8QaYdQG1XUoFCF+f79ylfXz+hXkb9BP7ilYk=; b=Hmw9377rH8adkcqcgHqrb5DFXujKa17DZRG2MbU/pGAqyjlKge9FbpPOEa1pQomFYrt+eK ksLOr/cJH9SixUMPQMaVTE30VdrR+ePnOzpzgTEvu7qtkq6YpzUVHYyXSv5ZvwJHs88n/H AyInfxiX9aZc3gwS/wNuyUtzeDm1QdCVFL5wubFiyeWFuxcnkLyZk0h9FLLNPfBlaNu9Pu Q0Idbv46D9dfZL2UhEfgRWDjobpWzd8yGaJSnKxRwF2yHaWqaT92mhmd0OO2UcoQF0/sK4 t6x8NevNl2j8ES0pznLQIvr0wbD+aT+KXE/pMVSzPF98aGvP+5Wn0zwkZkQPzA== ARC-Seal: i=2; s=key1; d=johnnyrichard.com; t=1728907586; a=rsa-sha256; cv=pass; b=HzZ1v+kA1tFMqBaWoSv+laSZ0715/gDMgFe8uK50Qm0YY6+8CMR+aHQIQIYnzd/tAn3biM vNEjVvotOLE8ecwqxOoPD7VoDYLG+xOEvNV6LnKMDkFFUl5kCc5GbQuA4DwuYn1QkRrQmH idnUjh+Ws/cs1twrIxYngWZT3yNrVTBUjU+1PLJKmvTr/B/dcbtp3wF0CPnL9KjQ3O7uLW EzjdCjg56jwthVj2lu32mALkCFk4d8ocfaU7Nz3ss9imabq8p9OPQ2OIi1JsvLKPNUGpkf 6qVDKpRj6hs3jntBzEDaopegw9DbwQE0MYwtLNO1/ghUOzaa02iq6AJ1BOfRmA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b="hbLarz/x"; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=JWbU5wLz; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=pass (policy=none) header.from=maniero.me Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 647D55B5DE for ; Mon, 14 Oct 2024 14:06:23 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=3VWGeODtGl4C3+h5sctl51WOwmdu5DKDlm538rB58B8=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:Date:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1728907583; v=1; b=hbLarz/xqAfymvK/AK56fUKozlFqo6ru0FQpp1TinrC5hBZcc0S/yDlOrJN187vrTefJ1jn3 xgocUE4Jm8tSRv7P782L4zbsoJyc6JQz/xa3st4zyzDF++HfUjURtcbYbWrUyyrG4dHhRXD2wWy i7L8X0yFamV0aDPoIFs1jHu5Aee7n54Jv1bBkiATKucNlTeUGW0wEgdLSoAERHJ0HE4ddc03Zb4 UymW9wsnokJjwD3IL0Ze1347QLXtYdHdvBWBj3D2xsKVESfg7C2xT2hQzJbE9Xa7fTfKr4Jh0Ny 6c+EPxNCKheg//HEw55zp5lu/GZcJECAyTgTdAUX/tWZg== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 0C7C1201CE for ; Mon, 14 Oct 2024 12:06:23 +0000 (UTC) Received: from seashell.cherry.relay.mailchannels.net (seashell.cherry.relay.mailchannels.net [23.83.223.162]) by mail-a.sr.ht (Postfix) with ESMTPS id B1F212014C for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 14 Oct 2024 12:06:21 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 19E958A269E for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 14 Oct 2024 12:06:20 +0000 (UTC) Received: from nl-srv-smtpout1.hostinger.io (100-101-177-191.trex-nlb.outbound.svc.cluster.local [100.101.177.191]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 5DE858A5743 for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 14 Oct 2024 12:06:19 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1728907579; a=rsa-sha256; cv=none; b=K6MXV78c6lKVa2GxhJ/1BqddLn9VxK/5dqWXdnOoou+urFlBHxer9PBN5IePKJT82v8sC+ N8R+dvI9ncY4XMALFeexN/X7qTL/Cr5my8Bvvf+wMNXWmBwM9dq0AT2I6hN0P1q534fybY 76kevBne1baQUVGbMI7ZHBZzHwm70+nepqurzCRBJIggSRIo0yb/MBc8eeOs9mo6GUUZkd o/70mUYxI5hNj5LefQQ0NcKzSjZKCTOTPkQWmzCacbeJ0Vu16rlMwvjTz43m30D36nGBoa pVdLwyY2g4xuOiH6SvjzD+n2N/CZt8e/syQyOFQDG3ggexvMGBYanhxV6B+z1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1728907579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=xii3Pgl8QaYdQG1XUoFCF+f79ylfXz+hXkb9BP7ilYk=; b=ofTzgZ89NhTTuY+U7udHk3hDpOD1OVHt/sgXnw3V3CWn+0FphtVadybBMf13YMG3wyXC1d XAkbLpKWFweySNaMSpnJLtKxrKaxkPcuRiROpU3T4pbTMPn06TmNr9JBdPInjqS07btPOa eYzENeLgBVQflOvVnOJq6Iij0DBOcIgjuzpwcBNc6J7oSsbNTiZrnS9fFBLHiSg5+i+3Gq MI4RI1noWukh3Yl3pf3+ZvCoXghgK0t1OvqyBeXDbsO9klRrA3JYkzbDrszxKm1ejxEsaD mkiLCv++LLFu12S7eFqUTwTAGuNUkLQdDUYFEciZSuAZj5y/Fn0VUaWvplbVZw== ARC-Authentication-Results: i=1; rspamd-6b8cf4b767-lntlh; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Suffer-Macabre: 24b4575522c71d84_1728907579858_4066703332 X-MC-Loop-Signature: 1728907579858:2042354101 X-MC-Ingress-Time: 1728907579858 Received: from nl-srv-smtpout1.hostinger.io (nl-srv-smtpout1.hostinger.io [145.14.150.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.101.177.191 (trex/7.0.2); Mon, 14 Oct 2024 12:06:19 +0000 From: Carlos Maniero DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1728907577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=xii3Pgl8QaYdQG1XUoFCF+f79ylfXz+hXkb9BP7ilYk=; b=JWbU5wLzF6vTXRCjr0KQxi6alwO36uiHJgO1XtsmCnxeH9n/L896dgeM0v0gOzQejTPB+8 Vse+sfX9Sbp3V1LKX/kwXfRPMSgiWsgTK8ZfwwIAAKZS9X6eJYtUkWKztoLZWJ/Rprvyg7 9/j0gYIlQfPJ4yTRGZ3xdcx1HihfgW4mw1HQsy4WdzBEsPrLwkU5ziZPM1PRfEMWWirjJB rdK7XWoa0FiXYquxMFWQ+mHLET7Miu8FpFGLZSUvegB6OM4rD21Tgc7NC4DI4BbIScTCWP VTAI5G7FMohXyAd0tA16imxvSWmZHWWa/NMqz3Gj+HTjMY2B6tbTjszvjje2UQ== To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Carlos Maniero Subject: [PATCH olang v1 0/3] codege: initial implementation of pointers Message-ID: <20241014120607.90304-1-carlos@maniero.me> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Mon, 14 Oct 2024 12:06:17 +0000 (UTC) X-CM-Envelope: MS4xfIbNE/m0mbmpbwC+HiBCLeMEzMIM0EXlWAAZfM7WuMK+XGXZ9o+IOkNmcP8VMmvebM1ADhtHNjM4SYYPlQ5Vggt522hSFlL6//hiZfXCQ8ebBu8maZwF qscWUVOz/nAjJCIN2vtjiLZqMjGh2e7EMJPvF/B64Jjh+wfDTUdcu48oozWKPLlQwO6XZK/uXYgudKRAwR+IUIP41X2DTfdXzHlkk3CTk0m6Cf8BxqoxbJms X-CM-Analysis: v=2.4 cv=bZY5U/PB c=1 sm=1 tr=0 ts=670d0939 a=WwxFCuf3mf1fs3oSi6/dng==:117 a=WwxFCuf3mf1fs3oSi6/dng==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=vt3vviQ3-7bD2LnTgmMA:9 a=BXDaF_L80NY05PYiAFlV:22 X-AuthUser: carlos@maniero.me List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Spam-Score: -4.85 X-Spam-Score: -4.85 X-Migadu-Queue-Id: 647D55B5DE X-Migadu-Scanner: mx13.migadu.com X-TUID: grnXgO7rgNxG This patchset enables the following program in olang: fn main(): u32 { var a: u32 = 1 var b: u32* = &a *b = 0 return a } It is still not possible to perform multiple dereference (**b). There was an issue during the vardef scope population where the vardef value was not been populated (aka no scope set). Carlos Maniero (3): fix: checker: populate vardef value scope codegen: x64: generate address of (&) codegen: x64: generate dereference assignment src/checker.c | 5 +++ src/codegen_linux_x86_64.c | 89 ++++++++++++++++++++++++++++++-------- tests/olc/0034_pointers.ol | 4 +- 3 files changed, 79 insertions(+), 19 deletions(-) base-commit: f1a40e971f5a8890acf2015632a39b64ca29e30c -- 2.46.1