Javascript bytecode

Rainer Schuetze r.sagitario at gmx.de
Fri Dec 21 03:32:23 PST 2012



On 21.12.2012 10:20, Timon Gehr wrote:
> On 12/21/2012 09:37 AM, Rainer Schuetze wrote:
>>
>>
>> On 21.12.2012 08:02, Walter Bright wrote:
>>> On 12/20/2012 10:05 PM, deadalnix wrote:
>>>> No you explained that java's bytecode doesn't solve that problem.
>>>> Which is quite
>>>> different.
>>>
>>> I did, but obviously you did not find that satisfactory. Let me put it
>>> this way:
>>>
>>> Design a bytecode format, and present it here, that is CTFEable and is
>>> not able to be automatically decompiled.
>>
>> Sorry, can't resist: How about feeding the x86 machine byte code
>> (including some fixup information) into an interpreter? Maybe not
>> realistic,
>
> http://bellard.org/jslinux/

Incredible ;-)

>
>> but a data point in the field of possible "byte codes". The
>> interpreter might even enjoy hardware support ;-)
>>
>
> Direct hardware support is not achievable because CTFE needs to be pure
> and safe.
>

True, you would have to trust the library code not to do unpure/unsafe 
operations. Some of this might be verifiable, e.g. not allowing fixups 
into mutable global memory.


>> That might not cover all possible architectures, but if the distributed
>> library is compiled for one platform only, CTFEing against another won't
>> make much sense anyway.
>>
>


More information about the Digitalmars-d mailing list