众叛亲离什么意思| 高考成绩什么时间公布| 两个束念什么| 生长因子是什么| 为什么不一样| 为什么会得肿瘤| 焱加木念什么| 女人手指粗短是什么命| 芸字五行属什么| 黄泉是什么意思| 骗婚是什么意思| 三级医院什么意思| 妈妈姐姐的女儿叫什么| 什么是煞气| 尿道炎用什么药治疗最好| 觅食是什么意思| 梅州有什么大学| 宝藏是什么意思| 伊拉克是什么人种| 外阴又疼又痒用什么药| 银红色是什么颜色| 回南天什么意思| 拉锯战是什么意思| 公务员五行属什么| 高线是什么| 品保是做什么的| 右手手背有痣代表什么| 屿是什么意思| 口腔异味吃什么药| 77年属什么生肖| 人参和什么泡酒最好| 十一月一日是什么星座| 甲状腺结节对身体有什么影响| 八十岁叫什么之年| 哀大莫过于心死是什么意思| 隐血阳性是什么意思| 气虚吃什么中成药| 死党什么意思| 一戴套就软是什么原因| 1988是什么生肖| 考上公务员意味着什么| 一什么图画| 幼儿园中班学什么| tags是什么意思| c5是什么意思| 最近天气为什么这么热| 闹心是什么原因导致的| 仙女座是什么星座| 现在是什么年代| 蛋白肉是什么东西做的| 自然人是什么意思| 口嫌体正直是什么意思| 辽宁舰舰长是什么军衔| 手抖吃什么药马上控制| 不善言辞是什么意思| 感冒喉咙痛挂什么科| 元气是什么| 做梦梦见蛇是什么征兆| 杜鹃花是什么颜色| 84属什么生肖| 五一广场有什么好玩的| 双歧杆菌三联和四联有什么区别| 鸿运当头什么意思| 金疮是什么病| 肚子疼是为什么| 莯字五行属什么| 为什么会长汗疱疹| 瑄五行属什么| 哈根达斯是什么| 类风湿吃什么药最有效| 血白细胞高是什么原因| 澳大利亚属于什么国家| 不偏不倚是什么意思| 梦见给死人烧纸钱是什么意思| 兼得是什么意思| 鹿的部首是什么| 油粘米是什么米| 高锰酸钾用什么能洗掉| 缺陷的陷是什么意思| 车加昆念什么| 才华横溢是什么生肖| pet一ct是一种什么检查| 鳌虾吃什么| 看破不说破什么意思| 梦到孩子死了是什么征兆| 不老莓是什么| 叶黄素是什么| 吃过期的药有什么后果| 脑梗吃什么药可以恢复的快| 胃动力不足吃什么中成药| 儿保科主要是检查什么| 尿液红细胞高是什么原因| 甲状腺跟甲亢有什么区别| 涤纶是什么面料| 胎监是检查什么的| 促排卵针什么时候打| 尿频尿不尽吃什么药| 什么可以吃| 广东有什么特产| 食道炎症吃什么药最好| 双手发抖是什么原因| 月经不来是什么原因| 超市属于什么行业| 胎盘老化对胎儿有什么影响| 金牛座与什么星座最配| 90年出生属什么生肖| 火供是什么意思| 甲亢去医院挂什么科| 狗又吐又拉稀吃什么药| 水晶为什么要消磁| 慢性胰腺炎吃什么药| 乙肝抗体1000代表什么| 经期吃什么补气血| 受用是什么意思| 什么是荷尔蒙| 草是什么意思| 生化妊娠是什么意思| 寸关尺代表什么器官| 眼袋是什么原因引起的| 维生素c什么时候吃最好| 感冒发烧吃什么药| 许褚字什么| 过敏性皮炎吃什么药好| un读什么| 睡不着觉吃什么药| 瓤是什么意思| 下面干涩是什么原因导致的| 罗红霉素治什么病| 津液是什么意思| 什么意| 张钧甯为什么读mi| 缠头是什么意思| 什么是低碳生活| 总是干咳是什么原因| 莲子心和什么搭配最佳治失眠| 口苦吃什么药最有效| 花中皇后指的是什么花| 空降兵属于什么兵种| 甲硝唑是什么药| 女人眼角有痣代表什么| 什么是结核病| 嗣后是什么意思| psa是什么| 什么是梭织面料| 高处不胜寒是什么意思| senda是什么牌子| 胃镜预约挂什么科| 酉时是什么时候| 男性更年期吃什么药| 衍心念什么| 全蛋液是什么意思| 黄酒有什么功效与作用| 今年流行什么发型| 尿酸高吃什么食物| 五行缺什么查询免费| 繁字五行属什么| 献血后吃什么| 蜂窝织炎是什么病| 什么津津| 4月6日什么星座| 藏红花有什么功效| 6月13日是什么星座| 孩子百天有什么讲究| 桃花是什么颜色的| 冬天什么| 胰岛素针头4mm和5mm有什么区别| 被舔是什么感觉| 噤口痢是什么意思| 308是什么意思| 家里为什么有蚂蚁| 辣木籽主治什么病| 相濡以沫不如相忘于江湖是什么意思| 跳蛋什么感觉| u型压迹是什么意思| 诱惑是什么意思| 产前诊断是检查什么| 辅酶q10什么时候吃最好| 烘培是什么意思| 掌中宝是什么部位| 世界上最大的岛是什么岛| 剑锋金命五行缺什么| 宫颈切片检查是什么| 景五行属性是什么| 脸霜什么牌子的好| 减肥吃什么药效果最好| LC是什么| 金卡有什么好处和坏处| 半套是什么意思| 儿童肥胖挂什么科| 小孩一到晚上就发烧是什么原因| 地漏什么牌子的好| zoom是什么意思| 晶体是什么| 年柱比肩是什么意思| 上火吃什么最快能降火| 揽子是什么意思| 什么是三观| 减肥期间适合喝什么酒| 病毒性疣是什么病| 过期的酸奶有什么用| vivian是什么意思| 大小休是什么意思| 过敏是什么样的图片| 西替利嗪是什么药| 姨妈是什么意思| 心阳虚吃什么中成药| 眼睛充血用什么眼药水好| 信指什么生肖| 椎间盘膨隆是什么意思| 什么是指标生| 阴险是什么意思| 澳门有什么好玩的地方| 血是什么颜色| 板带是什么| 手一直抖是什么原因| 梓树为什么叫梧桐树| 荔枝晒干了叫什么| 猫什么时候传入中国| 什么歌最好听| 懿读什么| 什么是疣| 清洁度二度是什么意思| 心衰应该注意什么| 外阴白斑用什么药| 夏天手脱皮是什么原因| 遮羞布是什么意思| 为什么不能抠肚脐眼| 十面埋伏是什么生肖| 炒菜用什么油好吃又健康| 梦见卖东西是什么意思| 呈味核苷酸二钠是什么| 旦辞爷娘去的旦是什么意思| 六块钱麻辣烫什么意思| 省内流量是什么意思| 胃难受吃什么药| 肝昏迷是什么意思| 女人吃什么新陈代谢快| 红黑相间的蛇是什么蛇| 急性肾炎什么症状| 前纵韧带钙化是什么意思| 脑梗做什么检查最准确| 褪黑素是什么东西| 男女身份证号码有什么区分| 戊是什么生肖| 好学不倦什么意思| 不出汗的人是什么原因| 手抽筋是什么病的前兆| ab和ab生的孩子是什么血型| 孕妇梦见别人怀孕是什么意思| 血糖高吃什么可以降下来| 漠视是什么意思| 经常感冒吃什么提高免疫力| cm是什么岗位| 短效避孕药是什么| 吃紧急避孕药有什么副作用| 质问是什么意思啊| 长命百岁是什么意思| 什么是bp| 什么颜色可以调成紫色| 朱砂痣什么意思| davena手表什么牌子| 左耳发热是什么预兆| 回南天是什么时候| 匹维溴铵片治什么病| 百度Jump to content

《对手》第2期:小米手机4对比华为荣耀6小米华为

From Wikipedia, the free encyclopedia
(Redirected from Mod parrot)
Parrot virtual machine
Final release
8.1.0 / February 16, 2016; 9 years ago (2025-08-05)[1]
Repository
Written inC
Operating systemCross-platform
SuccessorMoarVM (for Raku)
TypeVirtual machine
LicenseArtistic License 2.0
Websitewww.parrot.org Edit this at Wikidata
百度 驻美大使馆发布关于美301调查结果的声明,称这是典型的单边贸易保护主义做法,中方对此强烈不满、坚决反对。

Parrot is a discontinued register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation (PIR, an intermediate language) to Parrot bytecode and execute it. Parrot is free and open-source software.[2]

Parrot was started by the Perl community and developed with help from the open-source and free software communities. As a result, it was focused on license compatibility with Perl (Artistic License 2.0), platform compatibility across a broad array of systems, processor architecture compatibility across most modern processors, speed of execution, small size (around 700k depending on platform), and the flexibility to handle the varying demands made by Raku and other modern dynamic languages.

Version 1.0, with a stable application programming interface (API) for development, was released on March 17, 2009.[3] The last version is release 8.1.0 "Andean Parakeet".[1] Parrot was officially discontinued in August 2021, after being supplanted by MoarVM in its main use (Raku) and never becoming a mainstream VM for any of its other supported languages.[4]

History

[edit]

The name Parrot came from an April Fool's joke which announced a hypothetical language, named Parrot, that would unify Python and Perl.[5][6] The name was later adopted by the Parrot project (initially a part of the Raku development effort) which aimed to support Raku, Python, and other programming languages.

The Parrot Foundation was dissolved in 2014.[7] The Foundation was created in 2008 to hold the copyright and trademarks of the Parrot project, to help drive development of language implementations and the core codebase, to provide a base for growing the Parrot community, and to reach out to other language communities.[8]

Historical design decisions are documented in the form of Parrot Design Documents, or PDDs, in the Parrot repository.[9]

Until late 2005, Dan Sugalski was the lead designer and chief architect of Parrot. Chip Salzenberg, a longtime Perl, Linux kernel, and C++ hacker, took over until mid-2006, when he became the lead developer. Allison Randal, the lead developer of Punie and chief architect of Parrot's compiler tools, was the chief architect until mid-October 2010 when she stepped down and chose Christoph Otto as the new chief architect.[10]

Languages

[edit]

The goal of the Parrot virtual machine was to host client languages and allow inter-operation between them. Several hurdles exist in accomplishing this goal, in particular the difficulty of mapping high-level concepts, data, and data structures between languages.

Static and dynamic languages

[edit]

The differing properties of statically and dynamically typed languages motivated the design of Parrot. Current popular virtual machines such as the Java virtual machine and the Common Language Runtime (for the .NET platform) have been designed for statically typed languages, while the languages targeted by Parrot are dynamically typed.

Virtual machines such as the Java virtual machine and the current Perl 5 virtual machine are also stack-based. Parrot developers chose a register-based design, reasoning that it more closely resembles a hardware design, allowing the vast literature on compiler optimization to be used in generating bytecode for the Parrot virtual machine that could run at speeds closer to machine code.[citation needed] Other register-based virtual machines inspired parts of Parrot's design, including LLVM, the Lua VM and Inferno's Dis.

Functional concepts

[edit]

Parrot has rich support for several features of functional programming including closures and continuations, both of which can be particularly difficult to implement correctly and portably, especially in conjunction with exception handling and threading. The biggest advantage is the dynamic extendability of objects with methods, which allows for polymorphic containers (PMCs) and associated opcodes. Implementing solutions to these problems at the virtual machine level obviates the need to solve them in the individual client languages.

Compiler tools

[edit]

Parrot provides a suite of compiler-writing tools[11] which includes the Parser Grammar Engine (PGE), a hybrid parser-generator that can express a recursive descent parser as well as an operator-precedence parser, allowing free transition between the two in a single grammar. The PGE feeds into the Tree Grammar Engine (TGE) which further transforms the parse-tree generated by PGE for optimization and ultimately for code generation.

Implementations

[edit]

The most complete language implementations targeting the Parrot VM were Raku (known at the time as Rakudo Perl 6), Lua and a new language called "Winxed".[12] Projects to implement many other languages were started, including PHP, Python, and Ruby; along with esoteric and demonstration languages such as Befunge and the "squaak" tutorial language.[13] None of these projects were successful in becoming the primary implementation of their respective languages.[4]

Internals

[edit]

There are three forms of program code for Parrot:

  • Bytecode[14] is binary and is natively interpreted by Parrot. Bytecode is usually stored in files with the filename extension ".pbc".
  • Parrot assembly language (PASM) is the low level language that compiles down to bytecode. PASM code is usually stored in files with the filename extension ".pasm".
  • Parrot intermediate representation (PIR[15]) is a slightly higher level language than PASM and also compiles down to bytecode. It is the primary target of language implementations. PIR transparently manages Parrot's inter-routine calling conventions, provides improved syntax, register allocation, and more. PIR code is usually stored in files with the filename extension ".pir".

Examples

[edit]

Registers

[edit]

Parrot is register-based like most hardware CPUs, and unlike most virtual machines, which are stack-based. Parrot provides four types of registers:

Parrot provides an arbitrary number of registers; this number is fixed at compile time per subroutine.

Arithmetic operations

[edit]

In PASM

    set I1, 4
    inc I1        # I1 is now 5
    add I1, 2     # I1 is now 7
    set N1, 42.0
    dec N1        # N1 is now 41.0
    sub N1, 2.0   # N1 is now 39.0
    print I1
    print ', '
    print N1
    print "\n"
    end

In PIR

 .sub 'main' :main
    $I1 = 4
    inc $I1     # $I1 is now 5
    $I1 += 2    # $I1 is now 7
    $N1 = 42.0
    dec $N1     # $N1 is now 41.0
    $N1 -= 2.0  # $N1 now 39.0
    print $I1
    print ', '
    print $N1
    print "\n"
 .end

mod_parrot

[edit]

mod_parrot is an optional module for the Apache web server. It embeds a Parrot virtual machine interpreter into the Apache server and provides access to the Apache API to allow handlers to be written in Parrot assembly language, or any high-level language targeted to Parrot.

See also

[edit]

References

[edit]
  1. ^ a b "New supported release 8.1.0 "Andean Parakeet"". Parrot Foundation. 2025-08-05. Retrieved 2025-08-05.
  2. ^ "Parrot Contributor License Agreement 1.0" (PDF). Parrot Foundation. Archived from the original (PDF) on 2025-08-05. Retrieved 2025-08-05.
  3. ^ "Parrot Roadmap". Parrot Foundation. 2025-08-05. Archived from the original on 2025-08-05. Retrieved 2025-08-05.
  4. ^ a b "Inactive Parrot | Parrot VM". www.parrot.org.
  5. ^ "The Story Behind the Parrot Prank - O'Reilly Media". Oreilly.com. 2025-08-05. Retrieved 2025-08-05.
  6. ^ "Programming Parrot". Perl.com. Archived from the original on 2025-08-05. Retrieved 2025-08-05.
  7. ^ "Corporations Advanced Search". Washington State Department of Licensing. UBI 602 839 536. Retrieved 2025-08-05.
  8. ^ Announcing the Parrot Foundation Archived June 29, 2008, at the Wayback Machine
  9. ^ "Parrot 6.1.0 - Parrot Design Documents (PDDs)". Docs.parrot.org. Retrieved 2025-08-05.
  10. ^ Otto, Christoph (2025-08-05). "reparrot: Parrot has a new architect. What now?". Reparrot.blogspot.com. Retrieved 2025-08-05.
  11. ^ [1] Archived May 9, 2009, at the Wayback Machine
  12. ^ "Languages - Parrot VM". parrot.org. Retrieved 2025-08-05.
  13. ^ "Languages – Parrot". Parrot development wiki. Retrieved 2025-08-05.
  14. ^ "The Parrot Bytecode (PBC) Format - parrotcode". Archived from the original on 2025-08-05. Retrieved 2025-08-05.
  15. ^ [2] Archived July 20, 2009, at the Wayback Machine
[edit]
酵母样真菌是什么意思 半夜口渴是什么原因 cd是什么元素 身体不适是什么意思 血涂片检查什么病
男性性功能减退吃什么药 相位是什么 细胞器是什么 什么叫台风 怀孕养狗对胎儿有什么影响
肠胃炎能吃什么水果 拉锯战是什么意思 为什么叫马路 什么食物胆固醇含量高 白话文是什么意思
tbs和tct有什么区别 甲子年是什么意思 什么叫情劫 抗坏血酸是什么意思 南屏晚钟什么意思
博字五行属什么hcv7jop5ns6r.cn 血脂粘稠有什么症状hcv9jop8ns2r.cn 薄荷与什么相克hcv9jop2ns1r.cn 13颗珠子的手串什么意思1949doufunao.com 尿道炎吃什么药好得快jiuxinfghf.com
hm是什么hcv8jop6ns8r.cn 周深为什么是女声hcv9jop6ns8r.cn 李世民是什么民族hcv9jop2ns1r.cn 软组织损伤用什么药hcv9jop6ns9r.cn 脚上有水泡是什么原因hcv8jop1ns4r.cn
墨西哥用什么货币gangsutong.com 下午5点是什么时辰clwhiglsz.com 幼儿十万个为什么hcv8jop7ns1r.cn 寒门什么意思hcv8jop7ns9r.cn 什么病可以办低保hcv9jop6ns9r.cn
黑枸杞泡水是什么颜色hcv9jop1ns4r.cn 合寿木是什么意思hcv9jop8ns0r.cn merrell是什么牌子hcv9jop6ns8r.cn 总是拉稀是什么原因hcv8jop9ns8r.cn 至死不渝下一句是什么520myf.com
百度