Questions tagged [dynamic-compilation]

Questions about code compilation in runtime. Alternatively, "Just-in-time compilation", "dynamic translation" or "runtime compilation". Used mostly by the runtime environment of tokenizing or interpreted languages.

Questions about code compilation in runtime.

Advantages

  • Compilation can be optimized for the current runtime system. This information is normally unavailable in compilation time.
  • Compilation to binary code is possible even independently from the CPU architecture.
  • Compilation can happen into memory, resulting platform-independent code combined with nearly binary code performance.

Disadvantages

  • Compiler must be part of the runtime environment.
  • Slow startup time.
  • Compile-time errors might appear only in runtime.

References

121 questions
3
votes
0 answers

Sbt 0.13 ScriptEngine is Null for getEngineByName(“scala”)

I have problem in using ScriptEngine from sbt 0.13.8 build.sbt fork in run := true scalaVersion := "2.11.6" libraryDependencies ++= Seq( "org.scala-lang" % "scala-compiler" % "2.11.6" ) UseConfig.scala object UseConfig { def main(args:…
3
votes
1 answer

dynamic code compilation of winform gives error in C#

I have simple windows app where a dynamically Win Form is created and displayed along with tool-box. User drags and drops the control on this dynamically created form and accordingly writes the code. Below is not entire code but piece where me…
user1291401
  • 264
  • 1
  • 6
  • 18
3
votes
1 answer

Using the GHC API to do a "dry run" of code compilation

I'm working on a fairly simple text-editor for Haskell, and I'd like to be able to highlight static errors in code when the user hits "check." Is there a way to use the GHC-API to do a "dry-run" of compiling a haskell file without actually compiling…
jmite
  • 8,171
  • 6
  • 40
  • 81
3
votes
1 answer

Dynamic Java Compilation: BeanShell, Janino, JavaCompiler?

I am about to start developing a small Java desktop app. The app is just an engine for which the user provides Java classes to do the work (translating input to output). I would like the user to provide actual Java classes as files that can be…
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421
3
votes
3 answers

Dynamically Compiling and Executing Conditional Statements

We want to give a user a graphical format to design conditional statements on some data. Our application would take that graphical format, translate it into C#, compile it, and run the conditional statement against some data, returning a…
Hungry Beast
  • 3,677
  • 7
  • 49
  • 75
3
votes
1 answer

Treating a String as a Haskell Program

As a small part of a larger University project, I need to write what is essentially an extremely crude IDE. The idea is to to take input from a gtk text box, treat that string as if it is in a .hs file, and evaluate a function within it. My main…
Craig Innes
  • 1,573
  • 11
  • 23
3
votes
1 answer

Convert string to c# executable code

I have a small solution, I did a research on this topic but couldn't find exactly what i am looking for, the examples was either to compile a whole method in a string or a full expression. What i want is say i have this code which i am trying to…
Hasitha Shan
  • 2,900
  • 6
  • 42
  • 83
2
votes
1 answer

Can I check OpenCL kernel syntax at compilation time?

I'm working on some OpenCL code within a larger project. The code only gets compiled at run-time - but I don't want to deploy a version and start it up just for that. Is there some way for me to have the syntax of those kernels checked (even without…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

visual studio 2010 c# run-time compilation of winforms

I have the following problem, will try to describe it shortly. In my program there is to be a possibility to compile a winform to an .exe by clicking on a button. Now I tried to do it with CodeDom, so in my program I have the following…
2
votes
0 answers

Compile java file at runtime

I'm trying to compile a java file at runtime. If I run my code in Eclipse there is no problem, I can compile the external java file and instantiate the object of that class. The problem occur when I generate the jar of my application (using the…
Fabry
  • 1,498
  • 4
  • 23
  • 47
2
votes
2 answers

An OCaml program for checking if OCaml code compiles

I would like to write an OCaml module having a compile function which will take a string containing an OCaml program and output the outcome of compilation as either Correct or Error, and in the Error case, information on the line and character of…
Surikator
  • 1,463
  • 9
  • 26
2
votes
1 answer

In UWP can we dynamically compile and invoke new Page in UWP using Dynamic compilation and member invocation using C# Reflection?

Using System.CodeDom.Compiler.CodeDomProvider I can able to compile codes till .Net 4+. So I can dynamically compile the code in runtime and invoke any WinFrom forms using C# Reflection programmatically. Similarly can we do that in UWP platform? I…
Ramanan
  • 159
  • 1
  • 11
2
votes
0 answers

JavaCompiler interface usage and its default implementation

I'm trying to understand how default JavaCompiler implementation, the one you can get by invoking ToolProvider.getSystemJavaCompiler(). How do you use it with a JavaFileManager? I understand that the compiler uses the file mananger it's given…
nadavgam
  • 2,014
  • 5
  • 20
  • 48
2
votes
3 answers

ASP.NET: WCF and Could not load file or assembly 'App_Web_hamznvwf

I have recently begun working with AJAX-Enabled WCF, and have been plagued with this .NET caching issue - Could not load file or assembly App__Web__hamznvwf I was having issues with this 4 to 5 times a day on my server (Win 2003) - see first post So…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
2
votes
1 answer

How to execute code from string in UWP?

I have simple code snippet from outside (backend server), basically simple mathematics, which I want to execute in Windows store/Windows phone universal application. This code changes state of static fields of one of my classes (set its values to…
Tertium
  • 6,049
  • 3
  • 30
  • 51
1 2
3
8 9