Jump to content

Talk:p-code machine

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Untitled

[edit]

Am I missing the reason the term "machine language", which seems to be correct, is aliased to "assembly language", which seems to be incorrect, in the first paragraph? Wjl2 (talk) 15:22, 13 January 2012 (UTC)[reply]


There seems to be a lot of vagueness here as to whether p-code is a generic term or a specific encoding. Which is it? Nentuaby 07:14, 10 June 2006 (UTC)[reply]

P-code was, once, the specific code (and its design) distributed for the P-Pascal from ETH, Zürich, and was later transferred to mean a similar, but further developed code, used by the UCSD Pascal. It also became one of several words to express the idea of either virtual machines as a kind of intermediate representation for compiler code generators, or of (virtual) hardware designed for the support of a programming language (or a closely related group of them). There was, at the time, the MxN problem of programming language implementation: M programming languages for N hardware architectures meant a lot of work (effort MxN). With a universal intermediate language (as some people hoped to find) it would become a M+N problem. That universal intermediate language never materialized, although for a group of languages related to Algol, something fairly close to it was achieved. If I remember, the Amsterdam Compiler Kit was based on the EM-1 virtual engine -- and that was an engine which shared (shares?) many design elements with p-code, although it necessarily is 'wider' in application. Athulin (talk) 09:18, 10 January 2011 (UTC)[reply]

"In computer programming, a virtual machine executing p-code." That sentence doesn't even make sense! I'm going to change it to something better MichaelBillington 00:52, 2 April 2006 (UTC)[reply]

Infact, the whole opening paragraph is filled with senseless jargon MichaelBillington 00:53, 2 April 2006 (UTC)[reply]


1. Changed "P-code was the target of early compilers" to "P-code was the target of some Pascal implementations". Not all early Pascals were interpreted. The first CDC 6000 implementation was not, nor the IBM 360 implementation and several others. In fact, UCSD was the only one until a few UCSD imitators showed up. I changed the "compilers" part because it wasn't a true compiler.--192.18.42.11 29 June 2005 22:59 (UTC)

More importantly, the UCSD Pascal implementation was a subset, roughly based on the subset of one of the bootstrapping stages (P4) of real PASCAL. It was very prolific though, which is why it went into history. 88.159.71.34 (talk) 18:16, 23 May 2014 (UTC)[reply]


"In computer programming, a P-code machine or pseudo-code machine is a specification of a cpu whose instructions are expected to be executed in software rather than in hardwar. " - "There seems to be a lot of vagueness here as to whether p-code is a generic term or a specific encoding." I cannot agree more. From the first sentence, it seems there can be many types of P-code machines. But then later it seems that there is only one. For example, "The p-Code machine is stack-oriented." _The_ p-Code machine? Only one? So, a machine that is not stack-oriented cannot be _a_ p-code machine? [User:M K Lai] 6 Jan 2007

IP Issues?

[edit]

The popular implementations i'd heard about were commercial I've read about USCD licencing P-System to Pecan etc. What I've never understood is exactly what was being licensed. Was it specific implementations or did P-Code instelf have some sort of intellectual property protection Were there ever any unencumbered (public domain, etc) implementations? What affect did this have on it's popularity? —The preceding unsigned comment was added by 68.38.203.239 (talk) 14:34, 29 January 2007 (UTC).[reply]

Pascal implementation

[edit]

Is it intentional that the "instruction" type definition is missing from the Pascal implementation of p-code included on the page? Espertus 13:57, 13 March 2007 (UTC)[reply]

The definition of the code[] array also seems to be missing.
This appears to be an excerpt from one of the programs[1] in "Algorithms + Data Structures = Programs".
Would some other p-code interpreter[2][3] be easier for our readers to understand? --68.0.124.33 (talk) 16:06, 21 January 2009 (UTC)[reply]

Cleanup: inconsistent capitalization

[edit]

The capitalization of "p-code"/"P-code"/"p-Code" is inconsistent, perhaps because people are referring to specific implementations that used different capitalization. Espertus 14:02, 13 March 2007 (UTC)[reply]

The link "p code of the compiler" is broken. —Preceding unsigned comment added by 193.163.1.105 (talk) 15:34, 24 March 2011 (UTC)[reply]

Example machine

[edit]

Originally posted in the article:

I see this code read variable a many times, but where does it write to a ? I see this code read f once (case f of), but where does it write to f ? -- 75.19.73.101

a and f are not variables! They are fields of the variable i. Normally they would be referenced as i.a and i.f, but the with i in the code makes them directly visable. -- RTC (talk) 00:54, 11 December 2007 (UTC)[reply]
I see l (lowercase L) read in lod and sto, but never defined or written to. Is it another field of the variable i ? --68.0.124.33 (talk) 14:14, 21 January 2009 (UTC)[reply]

Merge with bytecode

[edit]

Should this article be merged with bytecode? They appear to be describing the same thing by two different names. They even mention some of the same examples. --Rob (talk) 23:45, 22 January 2009 (UTC)[reply]

I agree, p-code and bytecode are more or less the same thing. But the value of this article is the examples from Wirth and the UCSD p-System, which really don't belong under bytecode. Also it's nominally about the machine and not p-code itself (which should be clearer now), so I think it's OK to keep it as a separate article. --Margin1522 (talk) 10:48, 31 January 2009 (UTC)[reply]

I would strip this article, removing all general bytecode stuff, and leave it as an article describing the first mass-deployment of a bytecode system (UCSD p-code) 88.159.78.61 (talk) 19:26, 28 February 2015 (UTC)[reply]

p-code has sufficient historical importance and is distinct enough from the more general concept of bytecode to deserve its own article. Looking at t he JVM and z-code articles for comparison, they establish the notability of their subjects much better. So rather than merging this page it should be improved. Rob Myers (talk) 19:20, 19 January 2017 (UTC)[reply]

I think the articles are and should be distinct. A p-code machine runs bytecodes. It's not like the machine code article is about microprocessors. Jeffrey Henning (talk) 14:31, 27 April 2017 (UTC)[reply]

Does JVM has more than one stack?

[edit]

This article mentions that p-code machine has only one stack shared by procedure frames and local variables and it is different from JVM and Forth. But opposite to Forth that has two stacks, JVM has one stack though it may not be contiguous. I think JVM must be removed from the sentence. Dynaxis (talk) 14:34, 20 December 2010 (UTC)[reply]

Integer overflow, bounds checking

[edit]

I was looking at WebAssembly and was disappointed at it having no means to check integer overflow. The underlying CPU has JO instruction, but WebAssembly stands in between, and AdaMagic compiler has to jump through the hoops to implement error-hostile execution environment over defective format. It is possible to count trailing zeroes using single instruction in Wasm, but not possible to detect overflows. Who on Earth needs to count trailing zeroes more than to check integer overflows? They totally gone nuts there. So I wondered how does WebAssembly compare to p-code? Checking bounds is probably done with ordinary instructions. Intel has a special BOUND instruction, but optimizing compilers are almost always getting with conditional jumps nowadays. Integer overflow is a completely different thing. If not supported natively, several bitwise and comparison operations are required to compensate the defect. But this feature (or lack of) of p-code is not described in the article. OCTAGRAM (talk) 19:08, 25 August 2018 (UTC)[reply]

Merge into Bytecode

[edit]

Bytecode seems like a more up-to-date term. François Robere (talk) 22:12, 17 September 2020 (UTC)[reply]

Rather disagree, as p-code has a specific meaning in history, as strongly associated with Pascal generally and UCSD Pascal specifically. pbannister (talk) 01:26, 9 March 2021 (UTC)[reply]

Closing, given the uncontested objection and no support. Klbrain (talk) 11:46, 18 September 2021 (UTC)[reply]

Why no mention of p-code hardware?

[edit]

I did use the Pascaline (a french microcomputer based on slice AMD) that directly *ran* p-code, and it's not been the only one. Why no mentions of it in this article as it is more than mentionned in this other article? https://wiki.riteme.site/wiki/Pascal_MicroEngine 109.10.201.182 (talk) 13:50, 6 January 2024 (UTC)[reply]

Thoughts about removing "Benefits and weaknesses of implementing p-code" section?

[edit]

I feel like the warning on the section is correct, it really is only promoting the subject with benefits, and offering one weakness which just transitions into where p-code is used. I feel like this section could use rephrasing or migration into another section. OnlyNano (talk) 19:29, 13 January 2024 (UTC)[reply]