Questions tagged [runtime-compilation]

Use this tag for questions related to Runtime Compilation, i.e. the compilation of a program during Runtime.

is used in its general meaning, and is usually accompanied by Java, C based languages, Scala, ASP.NET, etc. .

123 questions
2
votes
0 answers

Parallel compilation of java classes in runtime

I want to compile java classes in runtime in parallel. Since it takes time to compile them sequentially. I used OpenHFT/Java-Runtime-Compiler (https://github.com/OpenHFT/Java-Runtime-Compiler, version 2.3.6) to compile and load java classes in…
Noam Gershi
  • 87
  • 1
  • 9
2
votes
1 answer

the project must provide a value for configuration Error when install Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation in Core3.1

When I install Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation in a Web project and in Startup add : services.AddMvc().AddRazorRuntimeCompilation(); ,the project does not run and the error is: the project must provide a value for…
MrJahanbin
  • 243
  • 1
  • 2
  • 20
2
votes
1 answer

Compile Java class in runtime with dependencies to nested jar

In a Spring Boot app I'm doing the following at runtime: Generating a Java class Compiling it Accessing some static fields of the compiled class using reflection. I've based my code on this post and got a problem compiling my generated class in…
forhas
  • 11,551
  • 21
  • 77
  • 111
2
votes
0 answers

Compiling multiple assemblies at run-time using Roslyn

I am trying to Create multiple assemblies at runtime. I am using Roslyn to compile each assembly in serial. I am not able to leverage multithreading because Roslyn internally uses multithreading for compiling a single dll. The compilation time of a…
Anoop
  • 101
  • 1
  • 10
2
votes
2 answers

Run-time compilation: How is it possible that this isn't a performance hit?

I've heard that some types of runtime compilation aren't a performance hit. The official Python documentation asserts that running a .pyc file is no faster than .py. (I can't find the link right now.) How is this possible? Doesn't it take time to…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
2
votes
1 answer

Is there Something in the Standard Library or Boost to Compile a dll at Runtime?

In C# I can use CSharpCodeProvider to take in a file and compile it on the fly. I want the same thing for C++. Essentially I'm trying to compile a .dll from a file specified at runtime and dynamically link it to the executing program. I'm sure…
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
2
votes
0 answers

CodeDom Compiler: Which assemblies are referenced by default?

Short: Which assemblies (Framework DLLs) are included by default in .NET CodeDom Compilers (CSharpCodeProvider or VBCodeProvider) without explicitely adding the reference to CompilerParameters? I am using the CodeDom tools, namely…
Jens
  • 6,275
  • 2
  • 25
  • 51
2
votes
1 answer

Need to replace the existing class in runtime by a dynamically generated and compiled java .classfile at runtime

My purpose is to dynamically inject new attributes + getter setter methods to a class definition at runtime. Currently I have a method to regenerate the code with newly added attributes which then will compile the generated code. Initially I'll…
2
votes
3 answers

Is it possible to compile a class on the fly in Java without using external libraries?

It seems to me that the Java Compiler API allows to compile at runtime a class, writing its output (the .class file) to the file system. However, in-memory compilation is not supported. Is this correct ? or is possible to use this API to compile a…
Sergio
  • 8,532
  • 11
  • 52
  • 94
2
votes
0 answers

Is it possible to compile a class in memory from a String representation in an Android application?

I know that in Java is possible to compile a Java class at runtime on the fly (in memory) from a String representation. Afterwards, such class can be instantiated in the application. For example, some libraries providing support for this are…
Sergio
  • 8,532
  • 11
  • 52
  • 94
2
votes
1 answer

Best practices for runtime code generation in Ruby

I recently started playing around with parsers and parser generators and their uses in DSL design. To get things started, and to kill two birds with one stone, I wrote a pure Ruby PEG parser DSL by stealing some ideas from peg.js. The difference is…
David K.
  • 6,153
  • 10
  • 47
  • 78
2
votes
5 answers

Getting x raised to the nth power

I'm a newbie and I know that this C program which I got somewhere on the Internet (credits: http://www.geeksforgeeks.org/archives/28) works properly. #include float power(float x, int y) { float temp; if( y == 0) return…
First Lady
  • 79
  • 2
  • 3
  • 15
1
vote
1 answer

Razor Pages only render when using RuntimeCompilation .NET 8 Preview 6

I experience some strange behaviour. When using the standard ASP .NET 8 (or .NET 7) Web App template, the template does not render (or the route is not recognized) unless I use RuntimeCompilation - and I don't want to. In the browser I'm presented…
Lindstrøm
  • 396
  • 2
  • 16
1
vote
0 answers

Enable Runtime Compilation in ASP.Net RCL Project

I have created a new Razor Class Library (.Net 5) and added it as a Project reference in another ASP.Net Core Web application . In this Web app, I added services.AddControllersWithViews().AddRazorRuntimeCompilation() in Startup.cs. Now any view…
Muhamed Shafi
  • 43
  • 1
  • 5
1
vote
1 answer

Dependency inject a custom file provider for runtime compilation

I am experimenting with loading views from a database, and as suggested in the article one might want to add some caching to prevent hitting the database every…
Asons
  • 84,923
  • 12
  • 110
  • 165
1 2
3
8 9