Search Results

Search found 426 results on 18 pages for 'bytecode ninja'.

Page 1/18 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Book (or resource) on Java bytecode

    - by Andrea
    I am looking for some resources on the JVM bytecode. Ideally I would for a short book; something more than a blog post but not a 800 pages tome. If it is relevant, I am a Scala developer, not a Java one, although I know Java just fine. I would like something that allowed me to read JVM bytecode and answer questions such as: Why does the bytecode has to know about high level construct such as classes? Are subtyping relations still visible in bytecode? How does type erasure work exactly? How do Oracle and Dalvik bytecode differ, and what consequences does this have for, say, developing Android apps with Scala? How does the JVM manage the stack, and why exactly this creates issues with tail call elimination? and so on.

    Read the article

  • Stand-alone Bytecode Verifier

    - by HH
    In my bytecode instrumentation project, I stumble frequently on VerifyErrors. However, the default java Verifier gives little information on which instruction resulted in the error (it only gives the method and a small message). Is there any stand-alone bytecode verifier which provides with a little more advanced help in locating the error, at least the precise instruction location? Thank you.

    Read the article

  • How are Scala traits compiled into Java bytecode?

    - by Justin Ardini
    I have played around with Scala for a while now, and I know that traits can act as the Scala equivalent of both interfaces and abstract classes. Recently I've been wondering how exactly traits are compiled into Java bytecode. I found some short explanations that stated traits are compiled exactly like Java interfaces when possible, and interfaces with an additional class otherwise. I still don't understand, however, how Scala achieves class linearization, a feature not available in Java. Could anyone explain or provide a good source explains how traits compile to Java bytecode?

    Read the article

  • Bytecode and Objects

    - by HH
    Hey everyone, I am working on a bytecode instrumentation project. Currently when handling objects, the verifier throws an error most of the time. So I would like to get things clear concerning rules with objects (I read the JVMS but couldn't find the answer I was looking for): I am instrumenting the NEW instruction: original bytecode NEW <MyClass> DUP INVOKESPECIAL <MyClass.<init>> after instrumentation NEW <MyClass> DUP INVOKESTATIC <Profiler.handleNEW> DUP INVOKESPECIAL <MyClass.<init>> Note that I added a call to Profiler.handleNEW() which takes as argument an object reference (the newly created object). The piece of code above throws a VerificationError. While if I don't add the INVOKESTATIC (leaving only the DUP), it doesn't. So what is the rule that I'm violating? I can duplicate an uninitialized reference but I can't pass it as parameter? I would appreciate any help. Thank you

    Read the article

  • running jython bytecode using java

    - by noamtm
    It looks like I'm missing something. When using Jython to run my Python code in Java, Java bytecode files are generated (test.py - [email protected]). Can I run these classes directly using java? In other words, I want to make this: $ java test@py [additional cp args] work. The intent: writing Python code and not having to give away source code.

    Read the article

  • Types in Bytecode

    - by HH
    Hey everyone, I've been working for some time on (Java) Bytecode, however, it had never occurred to me to ask why are some instructions typed? I understand that in an ADD operation, we need to distinguish between an integer addition and a FP addition (that's why we have IADD and FADD). However, why do we need to distinguish between ISTORE and FSTORE? They both involve the exact same operation, which is moving 32 bits from the stack to a local variable position? The only answer I can think of is for type-safety, to prevent this: (ILOAD, ILOAD, FADD). However, I believe that type-safety is already enforced at the Java language level. OK, the Class file format is not directly coupled with Java, so is this a way to enforce type-safety for languages that do not support it? Any thought? Thank you.

    Read the article

  • Implementing a wrapping wire (like the Worms Ninja Rope) in a 2D physics engine

    - by Andrew Russell
    I've been trying out some rope-physics recently, and I've found that the "standard" solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. Especially when rope swinging is relevant to gameplay. I don't really care about a rope's ability to wrap up or sag (this can be faked for visuals anyway). For gameplay, what is important is the ability for the rope to wrap around the environment and then subsequently unwrap. It doesn't even have to behave like rope - a "wire" made up of straight line segments would do. Here's an illustration: This is very similar to the "Ninja Rope" from the game Worms. Because I'm using a 2D physics engine - my environment is made up of 2D convex polygons. (Specifically I am using SAT in Farseer.) So my question is this: How would you implement the "wrapping" effect? It seems pretty obvious that the wire will be made up of a series of line segments that "split" and "join". And the final (active) segment of that line, where the moving object attaches, will be a fixed-length joint. But what is the maths / algorithm involved for determining when and where the active line segment needs to be split? And when it needs to be joined with the previous segment? (Previously this question also asked about doing this for a dynamic environment - I've decided to split that off into other questions.)

    Read the article

  • Converting ANTLR AST to Java bytecode using ASM

    - by Nick
    I am currently trying to write my own compiler, targeting the JVM. I have completed the parsing step using Java classes generated by ANTLR, and have an AST of the source code to work from (An ANTLR "CommonTree", specifically). I am using ASM to simplify the generating of the bytecode. Could anyone give a broad overview of how to convert this AST to bytecode? My current strategy is to explore down the tree, generating different code depending on the current node (using "Tree.getType()"). The problem is that I can only recognise tokens from my lexer this way, rather than more complex patterns from the parser. Is there something I am missing, or am I simply approaching this wrong? Thanks in advance :)

    Read the article

  • Is there a way in .NET to access the bytecode/IL/CLR that is currently running?

    - by Alix
    Hi. I'd like to have access to the bytecode that is currently running or about to run in order to detect certain instructions and take specific actions (depending the instructions). In short, I'd like to monitor the bytecode in order to add safety control. Is this possible? I know there are some AOP frameworks that notify you of specific events, like an access to a field or the invocation of a method, but I'd like to skip that extra layer and just look at all the bytecode myself, throughout the entire execution of the application. I've already looked at the following questions (...among many many others ;) ):     Preprocessing C# - Detecting Methods     What CLR/.NET bytecode tools exist? as well as several AOP frameworks (although not in great detail, since they don't seem to do quite what I need) and I'm familiar with Mono.Cecil. I appreciate alternative suggestions, but I don't want to introduce the overhead of an AOP framework when what I actually need is access to the bytecode, without all the stuff they add on top to make it more user-friendly (... admittedly very useful stuff when you don't want to go low-level). Thanks :)

    Read the article

  • jQuery: Novice to Ninja

    <b>A Million Chimpanzees:</b> "Who should read this book? There was the usual blurb in the book's front matter about "If you're a front-end web designer looking to..." which I expected, but what are the minimal qualifications the reader should have before shelling out his or her hard earned dough for this text?"

    Read the article

  • How to Become a Marketing Ninja

    Are you interested in discovering the best ways to optimize your websites, blogs and online CPA campaigns? There's a very handy suite of tolls available at an a modest price the can help you get organic traffic through SEO. With this useful software suite, you can track your page rank, optimize your content for SEO, even automatically import relevant content to your sites.

    Read the article

  • NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException

    - by Shane
    I have the following code set up in my Startup IDictionary properties = new Dictionary(); properties.Add("connection.driver_class", "NHibernate.Driver.SqlClientDriver"); properties.Add("dialect", "NHibernate.Dialect.MsSql2005Dialect"); properties.Add("proxyfactory.factory_class", "NNHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle"); properties.Add("connection.provider", "NHibernate.Connection.DriverConnectionProvider"); properties.Add("connection.connection_string", "Data Source=ZEUS;Initial Catalog=mydb;Persist Security Info=True;User ID=sa;Password=xxxxxxxx"); InPlaceConfigurationSource source = new InPlaceConfigurationSource(); source.Add(typeof(ActiveRecordBase), (IDictionary<string, string>) properties); Assembly asm = Assembly.Load("Repository"); Castle.ActiveRecord.ActiveRecordStarter.Initialize(asm, source); I am getting the following error: failed: NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException : Unable to load type 'NNHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle' during configuration of proxy factory class. Possible causes are: - The NHibernate.Bytecode provider assembly was not deployed. - The typeName used to initialize the 'proxyfactory.factory_class' property of the session-factory section is not well formed. I have read and read I am referecning the All the assemblies listed and I am at a total loss as what to try next. Castle.ActiveRecord.dll Castle.DynamicProxy2.dll Iesi.Collections.dll log4net.dll NHibernate.dll NHibernate.ByteCode.Castle.dll I am 100% sure the assembly is in the bin. Anyone have any ideas?

    Read the article

  • Java: Is there a way to obtain the bytecode for a class at runtime?

    - by Adam Paynter
    In Java, is there a way (at runtime) to obtain the bytecode which defined a particular class? Put another way, is there a way to obtain the byte[] array passed to ClassLoader.defineClass(String name, byte[] b, int off, int len) when a particular class was loaded? I see that this method is declared final, so creating a custom ClassLoader to intercept class definitions seems out of the question. In the past, I have used the class's ClassLoader to obtain the bytecode via the getResourceAsStream(String) method, but I would prefer a more canonical solution.

    Read the article

  • Dealing with Try/Catch Exceptions in Java bytecode? ("stack height inconsistent")

    - by Cogwirrel
    I am trying to do some error handling in java bytecode. I first tried to implement some catch-like subroutines, where I would check for the error condition, and jump to the appropriate subroutine, a little like: iconst_1 iconst_0 dup ifeq calldiverr goto enddivtest calldiverr: jsr divError enddivtest: idiv ...More instructions... divError: getstatic java/lang/System/out Ljava/io/PrintStream; ldc "Oh dear you divided by 0!" invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V The problem with the above is that when I have multiple instructions that jump to this subroutine, I get an error message when running the bytecode, saying that the stack height is inconsistent. Perhaps using exceptions is the best way to get around this? From some googling I have found that you can create instances of Exception classes and initialise them with something like: new java/lang/Exception dup ldc "exception message!" invokespecial java/lang/Exception/<init>(Ljava/lang/String;)V I have also found that you can throw them with athrow and this seems ok. What is confusing me however is exactly how exceptions are caught. There seems to be a magical "Exception table" which glues the throwing and catching of exceptions together, but I do not know how to define one of these when writing bytecode from scratch (and assembling using Jasmin). Can somebody tell me the secret of creating an exception table? And possibly give me an example of exception handling that will assemble with jasmin?

    Read the article

  • Is it possible to cache JSP bytecode to avoid recompiles w/ Tomcat?

    - by Computer Guru
    Hi, Is there any way of caching the bytecode for JSP webapps/ In particular, using Tomcat as the Java servlet? I'm getting really fed up of Tomcat taking up all the CPU for 10 minutes while it compiles 4 different webapps every time I restart it.... I'm already using Jikes to "speed up" the compiles, but it's really killing me. The code does not change unless the webapp is upgraded (very rarely), and I cannot believe that there is no way to cache the compiled java bytecode instead of recompiling it each and every time. I'd appreciate any advice on the matter!

    Read the article

  • Google libère le système de build utilisé pour Chrome, « Ninja » serait dix fois plus rapide que GNU Make

    Google libère le système de build utilisé pour Chrome « Ninja » serait dix fois plus rapide que GNU Make Evan Martin, l'un des développeurs de Google Chrome, vient de passer sous licence open-source son système de Build baptisé « Ninja », actuellement utilisé pour porter le navigateur de Google sur plusieurs plateformes. Ninja serait considérablement plus rapide que les autres moteurs de production existants, d'où son nom. Martin affirme sur son site personnel que Ninja finit le Build de Chrome (environ 30 000 fichiers source, Webkit compris) en seulement une seconde après la modification d'un seul fichier (contre 10 pour GNU Make et 40 secondes préalables mêmes au ...

    Read the article

  • Using JRuby/Jython for Ruby/Python interoperability?

    - by dbr
    Quite-probably a silly question, as I don't know much about Java/Jython/JRuby/bytecode, but.. I stumbled across _why's unholy again today.. It allows you to output Python bytecode from Ruby code.. Basically allowing them to produce the same bytecode.. Jython outputs Java bytecode, as does JRuby.. Since these both compile to the same bytecode, does this mean you could potentially use any Python library from Ruby, and Ruby libraries from Python?

    Read the article

  • Any C/C++ to non-native bytecode compiler/interpreters?

    - by Matt
    As the title indicates, are there any C/C++ bytecode compilers/interpreters? I'm writing an application in an interpreted language that depends on certain libraries that are fully cross-compilable (there are no special flags to indicate code changes during compilation for a certain platform) but are written in C and C++. Rather than shipping n-platform-specific-libs with each platform, it would be nice to ship one set of libs which are interpreted by one platform specific interpreter. Possible and/or available?

    Read the article

  • Keep a Window on top with a handy AutoHotkey script

    - by Matthew Guay
    Are you tired of shuffling back and forth between windows to get your work done?  Here’s a handy tool that lets you keep any window always on top when you need it. There are many ways to use multiple windows efficiently, but sometimes it seems you need to keep a smaller one in front of a larger window and they never quite fit right.  Whether you’re trying to use Calculator and a web form at the same time, or see what music is playing while you’re catching up on your news, there’s many scenarios where it can be useful to keep one window always on top.  There are many utilities to do this, but they are often needlessly complicated and bloated.  Here we look at a better solution from Amit, our friend at Digital Inspiration. Always on Top Thanks to AutoHotkey, you can easily always keep any window on top of all the others on your screen.  You can download this as a small exe and run it directly, or can create it with a simple script in AutoHotkey.  For simplicity, we simply downloaded the application and ran it directly. To do this, download Always on Top (link below), and unzip the file. Once you’ve launched it, simply select the window you want to keep on top and press Ctrl+Space.  This program will now stay in front, even when it is not the active window.  Here’s a screenshot of a Hotmail signup dialog in Chrome with Notepad kept on top.  Notice Notepad isn’t the active application, but it is still on top. If you wish to un-pin the window from being on top, simply select the window and press Ctrl+space again.  You can keep multiple windows pinned at once, too, though you may clutter your desktop quickly! Always on Top will keep running in your system tray, and you can exit or suspend it by right-clicking on its tray icon and selecting exit or suspend, respectively. Create Your Own Always on Top Utility with AutoHotkey If you’re a fan of AutoHotkey, you can create your own AutoHotkey script to keep windows on top simply and easily with only one line of code: ^SPACE:: Winset, Alwaysontop, , A Simply create a new file, insert the code, and save it as plaintext with the .ahk file extension.  If you have AutoHotkey installed, simply double-click this file for the exact same functionality as the premade version. Conclusion This is a great way to keep a window handy, and it can be beneficial in many scenarios.  For instance you can use it to copy data from a PDF or image into a form or spreadsheet, and it saves a lot of clicks and time.  Links: Download Always on Top from Digital Inspiration Download AutoHotkey if you want to make it yourself Similar Articles Productive Geek Tips Get the Linux Alt+Window Drag Functionality in WindowsGet Mac’s Hide Others (cmd+opt+H) Keyboard Shortcut for WindowsAdd "Run as Administrator" for AutoHotkey Scripts in Windows 7 or VistaKeyboard Ninja: Pop Up the Vista Calendar with a Single HotkeyKeyboard Ninja: Assign a Hotkey to any Window TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional OutSync will Sync Photos of your Friends on Facebook and Outlook Windows 7 Easter Theme YoWindoW, a real time weather screensaver Optimize your computer the Microsoft way Stormpulse provides slick, real time weather data Geek Parents – Did you try Parental Controls in Windows 7?

    Read the article

  • Writing a Compiler for .net - IL or Bytecode?

    - by Michael Stum
    I'm currently diving into the inner workings of .net, which means IL. As an exercise, I want to build a brainf..k compiler for .net (yes, they already exist, but as said it's for learning purposes). For the moment I'm just writing some text files that contain .il and compile them with ilasm, which works. But I wonder if I could/should go one level deeper and write bytecode directly? My "concern" is the Windows PE Stuff when compiling an EXE - instead of ilasm I would need some sort of Bytecode linker that would take my MSIL/CIL bytecode and generate the PE Stuff for it? Or do compilers "only" compile their language to IL and execute ilasm? Is there a managed version of it that I can call/embed from my compiler?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >