Bytecode - CompWisdom
About us  |  Why use us?  |  Press  |  Contact us

 

Topic: Bytecode



  
 Just-in-time compilation - Wikipedia, the free encyclopedia
Bytecode is not the machine code for any particular computer, and may be portable among computer architectures.
The bytecode is then interpreted, or run on a virtual machine.
Dynamic translation was pioneered by the commercial Smalltalk implementation currently known as VisualWorks, in the early 1980s.
http://en.wikipedia.org/wiki/Just-in-time

  
 byte code - a Whatis.com definition - see also: bytecode
Bytecode is computer object code that is processed by a program, usually referred to as a virtual machine, rather than by the "real" computer machine, the hardware processor.
Most computer languages, such as C and C++, require a separate compiler for each computer platform - that is, for each computer operating system and the hardware set of instructions that it is built on.
The LISP language, used in artificial intelligence applications, is an earlier language that compiled bytecode.
http://whatis.techtarget.com/definition/0,,sid9_gci211722,00.html

  
 Bytecode basics
The bytecodes for a method are executed when that method is invoked during the course of running the program.
All primitive types that occupy more than 1 byte are stored in big-endian order in the bytecode stream, which means higher-order bytes precede lower-order bytes.
All instructions, except two that deal with table jumping, are aligned on byte boundaries.
http://www.javaworld.com/javaworld/jw-09-1996/jw-09-bytecodes.html

  
 PEP 304 -- Controlling Generation of Bytecode Files
A bytecode file in the augmented directory is only considered when the source file is present and it thus never considered when looking for module files ending in ".pyc".
Conceptually, the augmented directory for a bytecode file is the directory in which the source file exists prefixed by the bytecode base.
However, when a possible bytecode file is considered, an extra probe for a bytecode file may be made.
http://www.python.org/peps/pep-0304.html

  
 XIDEK: Interpreter Development Kit -- Bytecode Interpreter Definitions
A virtual machine, or bytecode interpreter, is a sort of simulation of a computer, usually used to implement a script language.
The second bytecode, if it exists, is the index of a variable value in the data array, the index of a constant in the constant array, or the offset of a branch instruction.
The instructions for the virtual computer are called "bytecodes".
http://www.parsifalsoft.com/examples/xidek/xidek/doc/bcidefs.htm

  
 ONJava.com: Using the ASM Toolkit for Bytecode Manipulation
One of the oldest bytecode manipulation frameworks, Byte Code Engineering Library (BCEL), is used in a number of projects; however, it is rather difficult to learn and use.
The ASM bytecode manipulation framework has been designed and implemented to be small and as fast as possible.
Ideally, it is good to have an understanding of the bytecode structure and JVM opcodes (see the Resources section below), but it is possible to start digging in even without such knowledge.
http://www.onjava.com/pub/a/onjava/2004/10/06/asm1.html

  
 Chapter 24 -- The Java Virtual Machine
Therefore, an instruction in the bytecode instruction set consists of a 1-byte opcode specifying the operation to be performed, and zero or more operands that supply parameters or data that will be used by the operation.
As you read this section, keep in mind that each instruction in the bytecode instruction set consists of a 1-byte opcode specifying the operation to be performed, and zero or more operands that supply parameters or data that will be used by the operation.
Bytecode instructions that do not affect control flow simply execute and advance the program counter register so that it points to the address of the next bytecode instruction.
http://www.sheetudeep.com/res/javaapn/ch24.htm

  
 Jamaica: The Java Virtual Machine (JVM) Macro Assembler
In Jamaica, bytecode instructions (and macros, which are collections of instructions) are specified for program logic instead of Java statements and expressions.
The executable code is written in JVM bytecode instructions; the format of instructions uses mnemonics and symbolic names for labels, fields and variables.
The Jamaica language is a language to specify JVM bytecode instructions in a Java-like class structure that will be compiled into a JVM class.
http://www.judoscript.com/articles/jamaica.html

  
 Download bytecode
The bytecode interpreters coming with the O'Caml source distribution are always statically linked with a fixed set of libraries, and they can only run binaries that need exactly the same set.
The format of the bytecode executables changes frequently, such that you can only execute an O'Caml 3.01 binary with an O'Caml 3.01 interpreter.
The interpreter can execute all bytecode files using some or even all of the listed libraries.
http://www.ocaml-programming.de/programming/download-bytecode.html

  
 Code Generation Network - Alex Rojkov on Bytecode Generation
So bytecode generation becomes very deterministic in terms of what the generated code can and can not do, and JVM is by design a perfect execution environment for it.
Also, bytecode generation becomes a standard practice to solve many problems: RMI in JDK 1.5 generates stub classes on demand at runtime, obviating the need to use rmic.
Even with the way the framework works now, if the parent classloader happens to be one of the AOP capable ones the bytecode generated by the framework could be augmented.
http://www.codegeneration.net/tiki-read_article.php?articleId=67

  
 Bytecode Systems
Bytecode machines have traditionally been stack-oriented machines, where objects would be drawn in and out of memory onto a stack where they would then be processed.
In the hardware world, RISC may have become "king," in that it allows silicon to be devoted to having more registers and in improving the ability to execute code in parallel.
The same is not true for rarely-used bytecode instructions.
http://linuxfinances.info/info/bytecode.html

  
 JDC Tech Tips: August 29, 2000
Knowing a little bytecode is a valuable assist to any programmer coding in the Java programming language.
Better still, the bytecodes are designed so that these type-safety checks need only be performed once, at class load time.
Unless you have the source code for your virtual machine, you need to supplement your bytecode analysis with performance benchmarks.
http://java.sun.com/developer/TechTips/2000/tt0829.html

  
 SourceForge.net: yaml-core
When writing bytecodes out to a flat file, the file need not contain a null terminator; however, when read into memory it should always have a null terminator.
Since the bytecode is always one character, the event handler could just receive a string where the tuple is implicit.
Since the core complexity is in the bytecodes, the actual function signature is straight-forward allowing for relative language independence.
http://sourceforge.net/mailarchive/message.php?msg_id=6096494

  
 An On-the-fly Bytecode Compiler for Tcl
The command name object type is used by the bytecode interpreter to cache the result of command hashtable lookups.
Before executing a code unit, the bytecode interpreter checks whether the code unit's epoch matches the current epoch.
This means that operations on some lists will fail in the new system that would have succeeded in Tcl7.5: if a list has a syntax error after the elements being operated on, the new system will return an error message where Tcl7.5 would have ignored the bad syntax.
http://www.usenix.org/publications/library/proceedings/tcl96/full_papers/lewis

  
 jclasslib bytecode viewer help
If the referenced class is not the currently displayed class, the bytecode viewer will try to locate the class in the currently configured class path and open it in a new window.
If you are working with Java bytecode, you might also be interested in JProfiler, an all-purpose Java profiling suite.
The jclasslib bytecode viewer displays class files and bytecode and lets you navigate through the class file structure in a browser-like fashion.
http://resources.ej-technologies.com/jclasslib/doc/help.html

  
 Learn to speak Jamaican
Jamaica, the JVM Macro Assembler, is an easy-to-use assembly language for JVM bytecode programming.
Also, bytecode programs tend to be longer than other CPU assembly programs because JVM instructions mostly operate on the stack top.
Creating JVM classes at bytecode level is risky and error-prone.
http://www.javaworld.com/javaworld/jw-05-2004/jw-0503-jamaica.html

  
 CINT Documentation
very slow O1 : Loops are bytecode compiled O2 : + some instructions are optimized O3 : + some more instructions are optimized O4 : + function called within a loop is bytecode compiled O5 : All interpreted functions will be bytecode compiled when called Default is O4.
const int NUM=10000; double ary[NUM]; for(int i=0;ibytecode ary[i] = i*2; // bytecode } // bytecode If interpreted function is called with in the loop, that function is compiled as bytecode too.
You can choose level of bytecode optimization by '-O[n]' command line option or 'O[n]' interactive command.
http://root.cern.ch/root/Cint.phtml?bytecode

  
 Overview of the IBM Java Just-in-Time Compiler
Specifically, the bytecode level optimization features described in the section on optimization and the basic idea of register allocation and idiom-based code generation in the section on code generation are all applicable as cross-platforms.
The given bytecode is then converted into an internal representation, called extended bytecode, with some new opcodes introduced to represent operations resulting from the optimizations.
Finally, native code is generated on the basis of the optimized sequences of extended bytecode by allocating physical registers for each stack and local variable.
http://www.research.ibm.com/journal/sj/391/suganuma.html

  
 The Ocaml Bytecode
is a tail-call (and the bytecode instruction used is
Once the expression is written, ocaml evaluates it and prints the generated bytecode (seven instructions here).
This part presents in detail each instruction of the bytecode and gives some information about closures, exception handling, and environments.
http://pauillac.inria.fr/~lebotlan/docaml_html/english/english004.html

  
 PEP 339 -- How to Change CPython's Bytecode
This bytecode must implement enough semantics to perform the actions required by the Language Reference [1].
Running parrotbench [7] is also a good way to make sure existing semantics are not broken; this benchmark is practically a compliance test.
Skip Montanaro presented a paper at a Python workshop on a peephole optimizer [8].
http://www.python.org/peps/pep-0339.html

  
 CafeBabe Home Page
Note: this task works on bytecode level, thereby you can solve such task without a presence of sources.
Author think that migration is a sort of obfuscation when you don't change names for classes, fields and methods, only for packages by using information from specified migration table.
Other task for optimization is to find all methods that can be declared as final and set up method modifier to final value on bytecode level.
http://www.geocities.com/CapeCanaveral/Hall/2334/Programs/cafebabe.html

  
 Microsoft Security Bulletin MS03-011
The ByteCode Verifier is a low level process in the Microsoft VM that is responsible for checking the validity of code - or byte code - as it is initially being loaded into the Microsoft VM.
This new security vulnerability affects the ByteCode Verifier component of the Microsoft VM, and results because the ByteCode verifier does not correctly check for the presence of certain malicious code when a Java applet is being loaded.
The Vulnerability results because of a flaw in the way the ByteCode Verifier checks code when it is initially being loaded by the Microsoft VM.
http://www.microsoft.com/technet/security/bulletin/MS03-011.mspx

  
 Bytecode Outline plugin for Eclipse
Added "bytecode compare" for referenced or generated *.class files.
Fixed problems with shared sourcecode / bytecode output folders.
New bytecode reference view shows "javadoc" to the selected bytecode instruction.
http://andrei.gmxhome.de/bytecode

  
 The Java Language Environment
The bytecode verifier traverses the bytecodes, constructs the type state information, and verifies the types of the parameters to all the bytecode instructions.
The types of the parameters of all bytecode instructions are known to always be correct
While all this checking appears excruciatingly detailed, by the time the bytecode verifier has done its work, the Java interpreter can proceed, knowing that the code will run securely.
http://java.sun.com/docs/white/langenv/Security.doc3.html

  
 TechTrader Bytecode Toolkit
The TechTrader Bytecode Toolkit was used to create the bytecode enhancer for Kodo JDO, a Java Data Objects implementation for relational databases.
The Serp project at http://serp.sourceforge.net has taken over development of the TechTrader Bytecode Toolkit, and has released a new version with enhanced functionality and ease-of-use.
Macromedia will use the TechTrader Bytecode Toolkit in an upcoming version of its well-known JRun software.
http://tt-bytecode.sourceforge.net

  
 Alternative Java Implementations
Bytecode interpreter, JIT in development; depends on Classpath.
Scheme is a programming language similar to LISP and Algol and is often used in introductory Computer Science classes.
You might think twice about looking at the source code though if you want to be considered a "clean" developer of another implementation, i.e., someone who hasn't seen Sun's implementation and can create their own without being accused of copyright infringement.
http://www.dwheeler.com/java-imp.html

  
 JC Virtual Machine: Home
♦ Use of the Soot framework for sophisticated bytecode analysis, optimization, and code generation.
♦ Conversion of Java bytecode into C and optimized compilation using GCC into ELF object files resulting in fast execution.
When combined with the proven power of GCC's C optimizer the results are impressive.
http://jcvm.sourceforge.net

  
 Serp
While in order to perform any advanced manipulation, some understanding of the class file format and especially of the JVM instruction set is necessary, the framework makes it as easy as possible to enter the world of bytecode development.
Serp is an open source framework for manipulating Java bytecode.
The framework provides a set of high-level APIs for manipulating all aspects of bytecode, from large-scale structures like class member fields to the individual instructions that comprise the code of methods.
http://serp.sourceforge.net

  
 Rx: A Regex Debugger for Perl
I've arranged the bytes in four columns because the basic size of a bytecode 'node' is four bytes.
The strings themselves appear immediately after the four-byte bytecode (in rows 1-2, 5, 8, and 10) and are NUL-padded to an even multiple of four bytes.
The bytecode I just showed may be incomplete, because it finds only one match.
http://perl.plover.com/Rx/paper

  
 Squawks of the Parrot: Decompiling python bytecode
(Basically the bytecode object and the bytecode file object are the same thing, which isn't right--each file can have multiple bytecode objects in it) Anyone wanting to take a shot at fixing it while my machine gently weeps would be much appreciated.
First, the tests fail, because I switched out the test bytecode files.
(The tests actually work, just the data they're looking at is different than what they should be looking at) Second, it's convinced that there is a single code object in each bytecode file, which is definitetly Not True.
http://www.sidhe.org/~dan/blog/archives/000358.html

  
 Java Bytecode Obfuscator - Zelix KlassMaster
As well as protecting your Java bytecode from being decompiled to comprehensible source code, Zelix KlassMaster's Name Obfuscation functionality reduces your bytecode size by reducing the size of your package, class, field and method names.
Since its release in 1997, the Zelix KlassMaster Java bytecode obfuscator has been continually developed to keep it at the forefront of obfuscation technology.
It is Zelix KlassMaster's comprehensive Flow Obfuscation technology that made it the first, true second generation Java bytecode obfuscator.
http://www.zelix.com/klassmaster/features.html

  
 Annotating Java Bytecode
Soot is a Bytecode Optimization Framework being developed by the Sable Compiler Research Group.
Optimizing Java Bytecode using the Soot Framework: Is it Feasible?
This page reflects ongoing work concerning Annotating Java Bytecode done in the context of the course Optimizing Compilers given at McGill University and with the The Sable Compiler Research Group.
http://www.cs.mcgill.ca/~patrice/cs621

  
 B::Bytecode - Perl compiler's bytecode backend
Depending on the environment in which your program runs this may or may not be a help.
Compile as a module rather than a standalone program.
They're not needed at run-time but leaving them out will make it impossible to recompile or disassemble the resulting program.
http://www.xav.com/perl/lib/B/Bytecode.html

  
 Kestrel Institute - Current Projects - High-Assurance JVM
By executing bytecode, the JVM realizes the semantics of the Java programming language.
We have analyzed in detail Sun's specification of bytecode verification and exposed all its inadequacies and ambiguities.
This project is closely related to the High-Assurance Java Card Applets project, whose goal is to build an automatic generator of certifiably correct Java Card applets from high-level specifications.
http://www.kestrel.edu/HTML/projects/java

  
 Sable Research Group
CC2000: Optimizing Java Bytecode using the Soot Framework: Is it Feasible?
1999-3: Optimizing Java Bytecode using the Soot Framework: Is it Feasible?
Etienne Gagnon's PhD Thesis: A Portable Research Framework for the Execution of Java Bytecode
http://www.sable.mcgill.ca/publications

  
 FreeType and Patents
Note that some beta versions of FT2 did use the bytecode interpreter (since the auto-hinter wasn't available yet), and is still in use in certain products (this, and this one, for example).
The resulting glyphs will not be hinted and be of poor quality, but this makes the library still useful for a number of programs like font converters.
Finally, many Linux distributions seem to distribute a patched version of FT2 with an active bytecode interpreter, unlike the sources we distribute.
http://www.freetype.org/patents.html

  
 alphaWorks : Jikes Bytecode Toolkit : Overview
With the transition of HyperJ to the Eclipse project, the underlying JikesBT library was moved with it.
Laffra worked on Java compilers, Java development environments, Java virtual machines, performance analyzers, visualization of Java execution, and program understanding.
A 100%-Java class library that enables Java programs to create, read, and write binary Java class files.
http://www.alphaworks.ibm.com/tech/jikesbt

  
 gnu.bytecode
If you want to use them to generate bytecode from a high-level language, it is better to use the gnu.expr package, which works at the expression level, and handles all the code-generation for you.
An interface for objects that (may) contain Attribute objects.
Contains classes to generate, read, write, and print Java bytecode (
http://www.gnu.org/software/kawa/api/gnu/bytecode/package-summary.html

  
 Parrot FAQ -
Finally there is a reason the Parrot design keeps talking about running bytecode direct from disk rather than relying on doing compiling (from Perl or with a JIT) in memory.
With read only bytecode 300 different Perl scripts all share the same memory for Carp.pbc, warnings.pbc, etc. Without, and they're all swapping like crazy...
Clint Pierce wrote an Integer Basic implementation in parrot assembly, which is shipped with the parrot distribution, as are a few example programs.
http://www.parrotcode.org/faq

  
 nowrap.de - Flasm
The bytecodes are stored in SWF in binary form.
It's also possible to embed Flasm actions in your ActionScript, making optimizing of large projects more comfortable.
Besides of trivial optimizations Flasm does in update mode, there is one more reason for it.
http://www.nowrap.de/flasm.html

  
 OcamlJitRun
Usually you have one big bytecode segment (the initial program bytecode) and perhaps a few smaller more.
You might notice a small slowdown if you have many thousands of different bytecode segments e.g.
to run your debugged ocaml program (because debugging bytecodes, and in-place bytecode modification, don't work).
http://cristal.inria.fr/~starynke/ocamljit.html

  
 Coherence Engine
I contributed a chapter on bytecode transformation to Aspect-Oriented Software Development, a honking big book with material by almost everyone who's doing interesting work in this field.
http://www.coherenceengine.com/blog

  
 Java Practices: Examine bytecode
Examination of the bytecode of a class is occasionally useful, in particular for investigating performance optimizations.
Bytecode instructions are defined by the JVM specification.
Here is an example of its use, where it shows the effect on bytecode of setting fields explicitly to their default initial values :
http://www.javapractices.com/Topic146.cjp

  
 Javassist Home Page
If the users use the source-level API, they can edit a class file without knowledge of the specifications of the Java bytecode.
On the other hand, the bytecode-level API allows the users to directly edit a class file as other editors.
A Bytecode Translator for Distributed Execution of "Legacy" Java Software
http://www.csg.is.titech.ac.jp/~chiba/javassist

  
 Ada 95 Demo Combines Java Bytecode and Distributed Processing on the Web - AdaIC Newsletter Fall 1997
The generated Java bytecode runs on any Java Virtual Machine (JVM) -- for example, a Java-enabled Web browser such as Netscape 3.x, the Microsoft Internet Explorer 3.x, or a JVM Applet Viewer.
To support the warfighter, the Department of Defense (DOD) must move increasingly into systems of communications, data processing, and personal interaction that are seamlessly integrated in real time across great distances and across disparate hardware and software systems.
Looking, then, at the variety of needs and technologies, the Ada 95 programming language is uniquely positioned to meet those needs and to maximize use of those technologies.
http://archive.adaic.com/news/Newsletter/1997/fall/5.htm

  
 M-060: Sun Bytecode Verifier Vulnerability
A vulnerability in the Java(TM) Runtime Environment Bytecode Verifier may be exploited by an untrusted applet to escalate privileges.
Background A vulnerability in the Java(TM) Runtime Environment Bytecode Verifier may be exploited by an untrusted applet to escalate privileges.
An untrusted applet would have to be used to exploit this vulnerability.
http://www.ciac.org/ciac/bulletins/m-060.shtml

  
 __bytecode__
I have an idea for obfuscation using a cipher and would like to build out a tool which would grab bytecode on the file and obfuscate it.
Even if you could care less, you might like this...
In some respects you can use it for security, and like all things at this level, when you need it, you really need it.
http://blog.debreuil.com/archive/2003/10/15/150.aspx

  
 search.cpan.org: PAR::Filter::Bytecode - Bytecode filter
Bytecode support is considered to be extremely fragile on Perl versions earlier than 5.8.1, and is still far from robust (as of this writing).
This filter uses B::Bytecode to turn the script into comment-free, architecture-specific Perl bytecode, and uses ByteLoader to load back on execution.
http://search.cpan.org/dist/PAR/lib/PAR/Filter/Bytecode.pm

  
 BLOAT: The Bytecode-Level Optimizer and Analysis Tool
BLOAT is Java bytecode optimizer written entirely in Java that was developed by
BLOAT performs many traditional program optimizations such as constant/copy propagation, constant folding and algebraic simplefication, dead code elemination, and peephole optimizations.
By optimizing Java bytecode, code improvements can occur regardless of the compiler that compiled the bytecode or the virtual machine on which the bytecode is run.
http://www.cs.purdue.edu/homes/hosking/bloat

  
 Java(tm) Bytecode Assembler
Examples provide the best way to learn the Java assembly language.
The result of an independent study by Washington University undergraduate Jason Hunt, under the direction of Dr. Ron Cytron, Dept. of Computer Science
The Java Bytecode Assembler (or simply Assembler) is a program that converts code written in "Java Assembly Language" into a valid Java.class file.
http://www.bestuff.com/html/mirrors/javaa

Compwisdom
 About us   |  Why use us?   |  Press   |  Contact us

 Copyright © 2006 CompWisdom.com Usage implies agreement with terms.