Clarifying your audience for bigger profits in your business

Do you know who your ideal client is? Most of the people I talk to either have only a vague description or their ideal client, or don’t know who they are at all. This topic gets talked about to no…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Comprehensive Bytecode Basics

To put bytecode simply, it is a set of instructions that can do two different actions: push or pull.

Here is a very basic piece of bytecode with its Java counterpart:

The different between a pushing or pulling instruction is simple:

It may be simpler to sort by pulling instructions and indent what it is pulling, as it will look more readable to a human. (Hint: basic Abstract Syntax Tree)

Reading through it will give you a better sense of it, but as a very small rundown, here are some:

You can use this concept to create a very basic Abstract Syntax Tree. Putting this simple concept into a recursive pattern adding to a tree would yield code similar to the indented instructions above.

Here is a very basic piece of code that requires a recursive structure:

So let’s disect this using the JVM Specification and write down what we know:

Now we can use this to create our more human-readable structure! Remember to start at the “lowest” pulling instruction. Every time you hit a pulling instruction, to pull data recursively.

After this, you now have a queryable structure that can be used for analysis. You now also have a bit more of an understanding of the basics of bytecode!

Let me know if there’s anything else you’d like to see covered!

Add a comment

Related posts:

This Will Change How You Think About Eggs

When think about eggs, you probably picture the pastel cartons in the refrigerator section of the grocery store. Pay a few bucks and you can take home a dozen for baking, frying or scrambling. Eggs…

How to Allow Yourself to Share

There are a few easy ways to spot what is happening to you. In the middle of trying to over effort to complete the task, STOP.

Create your own WSL distro using Docker

As Windows Subsystem for Linux matures and gains more support across the industry, it is rapidly becoming an attractive alternative to traditional VM tools used for development work such as…