php - What are bytecode and opcode? What's the difference?
怪我咯
怪我咯 2017-06-05 11:07:43
0
2
690
Q1

What are bytecode bytecode and opcode operation code?

Q2

What's the difference?

Q3

Do all interpreted languages ​​have similar codes?

My understanding is:

  • bytecode and opcode are both intermediate codes

  • Interpreted languages ​​will translate the source code into intermediate code, which is then interpreted and executed by the virtual machine (such as jvm, zend)

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
洪涛

opcode is Operation Code.

The bytecode used in java is also a kind of opcode. Because each operation code uses one byte, it is called bytecode (actually there are also multi-byte ones).

Each byte is used to represent an instruction, and theoretically there can be 256 opcodes.

The iadd (add two integers) and dadd (add two floating point numbers) that we often see are not bytecodes, but mnemonics.

Many interpreted languages ​​do not have similar codes.

伊谢尔伦

Bytecode and opcode are both intermediate codes and are not comparable. Java is compiled into intermediate code bytecode and then executed in jvm. PHP is compiled into intermediate code opcode and executed in ZendVM.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template