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
1
vote
0 answers

in release mode CompilationClass.GetAssembliesFile method fetchs different set of files

My windows app does run-time compilation of code written by user. In debug mode, CompilationClass instance fetch few files which is needed by app. But in release mode same class instance fetch files from different location and hence error occurs. //…
user1291401
  • 264
  • 1
  • 6
  • 18
1
vote
1 answer

Is it possible to dynamically generate Java code strings from Xtend strings?

In Java, it's possible to compile and load classes at runtime from source code contained in strings (e.g. using javax.tools.JavaCompiler, EclipseCompiler, or Janino). This process can be entirely in-memory, without writing any temporary files. The…
Jim Pivarski
  • 5,568
  • 2
  • 35
  • 47
1
vote
1 answer

Only dynamic silverlight code without any server compiling

Is it possible to only use a managed dynamic language such as javascript in a Silverlight application, with no server side compilation before deploying to the client? I'm looking for 0 server side compilation of any code here - would like the…
Alex
  • 9,250
  • 11
  • 70
  • 81
1
vote
0 answers

Using Hint to dynamically compile and load Haskell

In this post, the discussion makes it seem like Haskell's Hint package can compile source code and load compiled programs (as opposed to interpreting a source file). However, I don't really see any of that functionality in the API, and that post…
Joseph Victor
  • 819
  • 6
  • 16
1
vote
1 answer

Type macro are dead : how can i compute a type from a definition?

Type macros are off. However I have two important use cases that would have required them. The result is an important lost of extensibility in my application. Both are dynamic compile time generation of a type given other types. Basically i want to…
1
vote
3 answers

How can i create a partial class at runtime?

How can i create a partial class at runtime? Example: I have a class public partial class A { } I want to create partial of my A class at runtime from an XML file. because I don't compile my project when any change in code. I know this is little…
tobias
  • 1,502
  • 3
  • 22
  • 47
1
vote
1 answer

Dynamic Compilation in Memory for Java for classes and classes that have dependencies on those classes

I have a List of class names and class source code. I need to compile in memory these classes so I can use them in the program. Compiling a class is fine, except when that class requires another class that has to be compiled. For example, if I have…
TheDog
  • 355
  • 3
  • 12
1
vote
3 answers

Is there a high level language with an interpreter, dynamic compiler and static compiler(e.g. like the c++ compiler) along with a multimedia library?

The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.
1
vote
1 answer

VBCodeProvider not honoring OptionInfer in providerOptions?

I'm trying to dynamically compile some VB code in my C# project and I'm running into an issue with the VBCodeProvider. It doesn't seem to be honoring the OptionInfer flag that I'm putting in the providerOptions Dictionary. My code looks like…
micahtan
  • 18,530
  • 1
  • 38
  • 33
1
vote
1 answer

How can I access the classes loaded by Java Web Start when dynamically compiling code?

I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start. //The…
andersjanmyr
  • 11,302
  • 5
  • 29
  • 29
0
votes
1 answer

enable auto recompilation in grails vaadin project

I have a grails vaadin project. the auto recompilation feature used to work well until I began to use internationalization, since then I have to restart the server to recompile any change. Any Idea ?
mehdouch
  • 423
  • 1
  • 8
  • 20
0
votes
0 answers

DotNetCompilerPlatform: Upgrading C# version. Which version of csc.exe (C# compiler) to use?

I work on existing Windows form application (wasn't created by me) which can run C# scripts. The application uses .net Framework 4.7.2, compiled in AnyCPU mode. It uses Microsoft.CodeDom.Providers.DotNetCompilerPlatform NuGet package version 3.6.0…
ElDog
  • 1,230
  • 1
  • 10
  • 21
0
votes
0 answers

.NET hot reload feels like magic, how does it work?

In .NET 6 we got the "Hot Reload" feature. C# is a compiled language, so this new feature feels like magic. At a high level, how does it work? And what are its limitations - can we expect improvements so that it will feel even more like interpreted…
lonix
  • 14,255
  • 23
  • 85
  • 176
0
votes
0 answers

How to use function from my code in runtime-compiled code?

I know that I can compile function at runtime and use code copied from this CodeProject article: public static MethodInfo CreateFunction(string function) { string code = @" using System; namespace…
DrWh0
  • 126
  • 7
0
votes
1 answer

Angular 11 DI for dynamically compiled components

Using JitCompilerFactory and compiling components at runtime works (for example see here: https://stackoverflow.com/a/67122569/15816951) but injecting into dynamic component does not: // (1) define Component metadata const metadata = new…
1 2 3
8 9