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
6
votes
3 answers

Invoke `racket` in a Racket script

General question: Can I invoke the current racket executable from within a running Racket script? Basically, I'd like a replacement for (system "racket ...") in the case that (find-executable-path "racket") does not return a path to the Racket…
Ben Greenman
  • 1,945
  • 12
  • 22
6
votes
1 answer

System.Plugins loader seems to assume failure after seeing a failure once

I am currently working on a haskell program which takes a users input from a text box, then compiles and loads it using the System.Plugins library in order to extract a picture to draw to the screen. The user can edit the code in the text box, then…
5
votes
1 answer

Angular 5 dynamic templates using AoT

Thanks to this very insightful post I am able to create components on the fly with a dynamic template fetched from an endpoint, however these components are compiled at runtime using the RuntimeCompiler, which is disabled when using AoT…
Cec
  • 1,726
  • 3
  • 18
  • 31
5
votes
3 answers

Generating Dynamic Class Java

I am generating a dynamic class in my java program by writing all my code into a java file, compiling the java file into a class file and then loading the class file with a URLClassLoader. The problem with this is that it creates a lot of files on…
Josh Sobel
  • 1,268
  • 3
  • 14
  • 27
5
votes
2 answers

Loading ASCX control created dynamically (via code)

I am creating Web User Controls via code (my C# code write-out markup, code-behind and designer files to disk on a callback). The controls are created all fine. I can add them to my web-project and put them on a page. When I try to load the control…
TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188
4
votes
1 answer

How to dynamically compile Java classes in Google App Engine

In answers to this question, I learned that it is not possible to invoke the Java Compiler in javax.tools from a GAE app. Does this limitation still apply? If so, what are my options for compiling Java source code into loadable class files "on the…
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
4
votes
8 answers

dynamic code compilation

I'm working on a program that renders iterated fractal systems. I wanted to add the functionality where someone could define their own iteration process, and compile that code so that it would run efficiently. I currently don't know how to do this…
Mark
  • 267
  • 5
  • 10
3
votes
2 answers

C# Scripting and Security

In my game (that is also written in C#) I want to include some kind of customization support. Speed is a great concern as I plan to offload major parts of the gameplay to scripts. As a result I choose to use C# for scripting ingame events and…
Riki
  • 1,776
  • 1
  • 16
  • 31
3
votes
1 answer

Access Denied while deleting the assembly created by a CodeDomProvider compile?

If you use the CodeDomProvider class in .NET after the compilation is complete you can't delete the output assembly. I want to be able to delete the output assembly. File.Delete returns an access denied exception. string asmPath =…
3
votes
1 answer

How do I use cl_amd_offline_devices to compile a kernel for a specific GPU?

I want to compile an OpenCL kernel for a certain AMD GPU - which is not available on my machine -, so that later I'm able to just load and run it when that GPU is present. I've read this question here on SO: Offline compilation for AMD and NVIDIA…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
3
votes
1 answer

How to pass current ClassLoader to KotlinToJVMBytecodeCompiler for dynamic (runtime) compilation kotlin code programmatically?

I created simple utility for runtime compilation kotlin code: package com.example import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot import…
3
votes
1 answer

C# dynamic compiler, get standard output when compile in memory

I want to get the stdout of a dynamically compiled code. My code: using System; using System.Collections.Generic; using System.Reflection; using Microsoft.CSharp; using System.CodeDom.Compiler; using System.IO; namespace ConsoleApplication2 { …
Emily Wong
  • 297
  • 3
  • 10
3
votes
1 answer

Static vs Dynamic bootstrapping of Angular2 app

In angular2 RC5, we launch the application by bootstrapping the main module of the app and angular provides two options for bootstrapping when targeting the browser. There is the option for dynamic bootstrapping or static. Docs mention that Static,…
koninos
  • 4,969
  • 5
  • 28
  • 47
3
votes
1 answer

Dynamic compilation still does not work in ASP.NET 5 RC1?

The scenario from the "Dynamic Development" section from here http://weblogs.asp.net/scottgu/introducing-asp-net-5 does not work in ASP.NET RC1. I start a new MVC6 project, run it with the debugger, change some string, save the changes, nothing…
3
votes
1 answer

Java - Dynamic Compilation without JDK

im aware that j2se 6 has introduced the JavaCompiler API; however, it's cumbersome to use and require a JDK not JRE. Is it possible to do dynamic compilation without a JDK? (im very interested in all-in-memory compilation.) additionally, i expect…
Defd
  • 470
  • 3
  • 16
1
2
3
8 9