{"id":16754707,"url":"https://github.com/evilpie/python-js-jit","last_synced_at":"2025-07-06T01:36:13.258Z","repository":{"id":137635786,"uuid":"1557687","full_name":"evilpie/python-js-jit","owner":"evilpie","description":null,"archived":false,"fork":false,"pushed_at":"2011-04-17T11:19:47.000Z","size":167,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T06:14:13.648Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evilpie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-01T22:25:22.000Z","updated_at":"2023-07-18T18:22:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a0095cc-8242-48a4-898c-8d02fc22a9e2","html_url":"https://github.com/evilpie/python-js-jit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evilpie/python-js-jit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilpie%2Fpython-js-jit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilpie%2Fpython-js-jit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilpie%2Fpython-js-jit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilpie%2Fpython-js-jit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evilpie","download_url":"https://codeload.github.com/evilpie/python-js-jit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilpie%2Fpython-js-jit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263836833,"owners_count":23517919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T03:05:41.121Z","updated_at":"2025-07-06T01:36:12.868Z","avatar_url":"https://github.com/evilpie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"(Pretty) (naive) try to compile javascript to native code, with python.\n\npython compiler.py script.js\n\nImplementation\n-------------\nValues are represented as 32 bit integers, called BoxedInt (in v8 this is called smi):\n    [ 31b data | 1b tag]\n    tag: 1 = object, 0 = integer\n    data: pointer/integer\n\nCurrently we lack any kind of memory allocator or garbage collector.\nIf you always wanted to test some GC scheme, that's your chance, go ahead and implement it.\n\nOnly some basic operations are implemented, the most of them as so named stub calls\n(call to python function instead of machine code).\n\n*Variable Deceleration*\n\n     var x = 1, y; var z;\n\n*Identifier assignment* (needs to be a declared variable)\n\n     x = 'hello world';\n\n*if / conditional operator / for*\n\n     if (true) {\n     }\n     (x ? true : else);\n     for (var i = 0; ; i++) { /* attention! never stops */\n     }\n\n*(unary) plus / minus*\n\n     -1, +15, 1 + 1, x - 16.5;\n\n*increment / decrement*\n*void (used for logging)*\n\n     void 'foobar' /* would generator console output [heap object] @ 0xdeadbeef [string] \"foobar\" */\n\n*Array literals*\n\n     [1, 2, 3, 4];\n\n*Some other stuff that's merely an idea or doesn't work*\n\n     \"\".length, [].length\n\nCredits\n-------\n- [SpiderMonkey](https://wiki.mozilla.org/JavaScript:Home_Page)\n- [v8](http://code.google.com/p/v8/) (clever stuff there!)\n- [pynarcissus](http://code.google.com/p/pynarcissus/) (used for generating the ast)\n- [pyasm](http://codeflow.org/entries/2009/jul/31/pyasm-python-x86-assembler/)\n\nLicense\n-------\npyasm\n\n\u003e:copyright: 2008 by Florian Boesch \u003cpyalot@gmail.com\u003e.\n\u003e:license: GNU AGPL v3 or later, see LICENSE for more details.\n\npynarcissus\n\n\u003eVersion: MPL 1.1/GPL 2.0/LGPL 2.1\n\u003eThe Initial Developer of the Original Code is\n\u003eBrendan Eich \u003cbrendan@mozilla.org\u003e.\n\u003ePortions created by the Initial Developer are Copyright (C) 2004\n\u003ethe Initial Developer. All Rights Reserved.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilpie%2Fpython-js-jit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilpie%2Fpython-js-jit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilpie%2Fpython-js-jit/lists"}