PHEP: Compile-Time Literal Expression Syntax

DS
Daniel Slomovits
Thu, Jun 23, 2022 8:21 PM

Hello all,

I have submitted a Pharo Enhancement Proposal
https://github.com/pharo-project/pheps/pull/10 for a new compiler/syntax
feature, in collaboration with Marcus Denker. This is also serving as a
trial run of the PhEP process itself, being the first PhEP not about the
process.

Abstract: This PhEP describes an extension to the compiler that allows
arbitrary expressions to be evaluated at compile time, with the results
stored in the method's literal frame. This is inspired by and will be
compatible with the implementation in Dolphin Smalltalk. I refer to such
expressions interchangeably as "compile-time literals", "compile-time
expressions", and "optimized expressions".

A large portion of the code can be ported directly from Dolphin Smalltalk,
and I should be able to complete this part of the process. Marcus said he
could help with the integration with OpalCompiler etc., but we can probably
break this into several parts (compiler vs. decompiler, other peripheral
things) if others are interested.

I look forward to hearing what everyone thinks!

Thank you,
Daniel Slomovits

Hello all, I have submitted a Pharo Enhancement Proposal <https://github.com/pharo-project/pheps/pull/10> for a new compiler/syntax feature, in collaboration with Marcus Denker. This is also serving as a trial run of the PhEP process itself, being the first PhEP not *about* the process. Abstract: This PhEP describes an extension to the compiler that allows arbitrary expressions to be evaluated at compile time, with the results stored in the method's literal frame. This is inspired by and will be compatible with the implementation in Dolphin Smalltalk. I refer to such expressions interchangeably as "compile-time literals", "compile-time expressions", and "optimized expressions". A large portion of the code can be ported directly from Dolphin Smalltalk, and I should be able to complete this part of the process. Marcus said he could help with the integration with OpalCompiler etc., but we can probably break this into several parts (compiler vs. decompiler, other peripheral things) if others are interested. I look forward to hearing what everyone thinks! Thank you, Daniel Slomovits