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
0
votes
1 answer

Digital Signature for ASP.NET Dynamic Binaries

Is there a way to put a digital signature on the Temporary Binaries generated as part of ASP.NET Dynamic Compilation?
0
votes
2 answers

Why isn't there a widely used tool to "warmup" .NET applications to prevent "cold start"?

I understand why cold starts happen (Byte code needs to be turned into machine code through JIT compilation). However with all the generated meta data available for binaries these days I do not understand why there isn't a simple tool that…
0
votes
0 answers

Javassist.CannotCompileException when trying to create method with String and Object array as input parameters

I need to create a method using JavaAssist CtMethod. This method need to accept a String and an array of objects as input parameters as below String methodBody = "$1.look(\"" + (lname).replace("\"", "").trim() + "\"" + " ," + new Object[] {…
javaseeker
  • 73
  • 1
  • 9
0
votes
1 answer

Use JDK6 to dynamic compile src but after switching to JDK environment still get a null from ToolProvider.getSystemJavaCompiler();

I'm using JDK6 to compile the input src from UI and to run immediately. But the problem is that by default my app is using the jre not jdk, so: JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); always return null; And I noticed that on…
JerryCai
  • 1,663
  • 4
  • 21
  • 36
0
votes
0 answers

CSharpCodeProvider override, recompile or replace an existing function by dynamic compilation

I have looked every resources in the net and I could not find any answer! I want to know if its possible to override or recompile a function in the parent application by Dynamic Compilation, by using C# CSharpCodeProvider. I have provide a simple…
Emily Wong
  • 297
  • 3
  • 10
0
votes
0 answers

MemberInfo to Func

I have attempted to implement the solution in this question outlined by @Marc Gravell. I am having difficulty getting a MemberInfo to cast to a MethodInfo, however. I am using .NET 4.7, and doing some funky dynamic compilation using CodeDOM. I…
Ian Ray
  • 117
  • 4
0
votes
2 answers

ASP.NET Dynamic Compilation Failing

I have an ASP.NET project set to utilize dynamic compilation - it has been set for almost a year now and no large changes to the project have been made. Randomly today, the pages have stopped compiling when I visit them... I can completely remove…
CTDev
  • 226
  • 2
  • 12
0
votes
1 answer

Validate and check user code

If anyone has seen the games on Code.org, users can enter code and submit their code. The server validates the code and sends the code to the javascript game which seemingly runs the code in the game to perform some action. How do you validate/check…
NeoShow
  • 43
  • 5
0
votes
0 answers

Dynamic compilation and sharing class between AppDomains

I am using simple C# scripts in my program to manipulate some data dynamically. Currently they are compiled and loaded to program's AppDomain which is nice for simplicity but downside is that there is no way to unload dynamic assemblies. Lets say my…
itix
  • 59
  • 11
0
votes
1 answer

asp.net compilation - temp file naming convention

Under heavy stress and load, our implementation of Cache with Virtual path provider is having issues with ASP.NET NOT clearing out the temporary files (compilation files) i.e; Cache is updated but sometimes the ASP .NET compilation is holding the…
Shiva
  • 125
  • 7
0
votes
2 answers

Dynamic generation of the model and repository

I generated .java files dynamically model, repository, and compiled them into .class format. I used statically @EntityScan and @EnableJpaRepositories to scan packages. Is it possible to dynamically use the .class file to initialize the model and…
0
votes
1 answer

The type or namespace Windows does not exists in namespace System when compiling code dynamically c#

I need to compile some code dynamically in my Winform application to execute C# code wrote by a user. To make some tests, I wrote this function : public object executeDynamicCode(string code) { using…
Thomas Rollet
  • 1,573
  • 4
  • 19
  • 33
0
votes
0 answers

create class file at specific location in web application at runtime

I was trying to make an application wherein i can modify the code already written, compile and run the same from within the web application. Example, i have a java file, compiled it but during execution i found out that there is some error, i change…
Rishabh Toki
  • 58
  • 10
0
votes
0 answers

c# CompileAssemblyFromSource slower than Visual Studio

I've a simple class (600 lines) that I compiling by CompileAssemblyFromSource method. This method take over than 1 minute to finish, I tried to compile the code directly in Visual Studio and it takes less than one second... What's wrong? How can I…
Matteo Fioroni
  • 103
  • 2
  • 4
0
votes
0 answers

Angular Js dynamically loaded directives are still active after DOM is cleared

I have a dropdown list that dynamically loads a directive. When I choose "option a" it loads "directive a", when I choose "option b" it loads "directive b". However when the second directive is loaded and the DOM is overwritten with the new one,…
1 2 3
8 9