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

Provide an Explicit Assembly Name for a Dynamically Compiled ASP.NET Website's App_Code Folder?

In a dynamically compiled ASP.NET Website project, can the assembly for the App_Code folder be explicitly named? For example, under regular circumstances when I run an ASP.NET website the assembly name generated into the Temporary ASP.NET Files\…
John K
  • 28,441
  • 31
  • 139
  • 229
3
votes
1 answer

Is there any solution for runtime code compilation in Unity3D for IL2Cpp builds?

I'm trying to compile C# code at runtime in Unity3D for IL2CPP build 64 bit Android. I have a string of code that I want to compile and execute dynamically. The things that I've tried…
Bipin
  • 451
  • 4
  • 14
3
votes
1 answer

How to compile s-expression at runtime and then execute it in Common Lisp

I am working on a program that generates program (Genetic Programming). I build at runtime an s-expression and today I use eval like this: (defvar *program* '(+ x 1)) (defvar x 10) (eval *program*) ;; returns 11 Evaluation is done for multiple x…
3
votes
1 answer

Getting Culture specific errors from Roslyn Compilation

I am trying to compile some code which has incorrect syntax using the Roslyn Emit Api. The thread compiling the code has Culture set to "fr-Fr" but the diagnostic messages I obtain from the Roslyn api are in English. e.g. error BC30037: Character…
Anoop
  • 101
  • 1
  • 10
3
votes
1 answer

How to get the full class name of a dynamically created class in Scala

I have a situation where I have to get the fully qualified name of a class I generate dynamically in Scala. Here's what I have so far. import scala.reflect.runtime.universe import scala.tools.reflect.ToolBox val tb =…
Jon
  • 3,985
  • 7
  • 48
  • 80
3
votes
2 answers

Why doesn't Compile() run every time the method is called?

Here is a code piece from MiscUtil library (by Jon Skeet & Marc Gravell): static T Add(T a, T b) { //TODO: re-use delegate! // declare the parameters ParameterExpression paramA = Expression.Parameter(typeof(T), "a"), paramB =…
starikcetin
  • 1,391
  • 1
  • 16
  • 24
3
votes
3 answers

Loading external source code and using them internally (by re-compiling or something)

Is there a way in using externally stored sourcecode and loading it into a Java programm, so that it can be used by it? I would like to have a program that can be altered without editing the complete source code and that this is even possible…
Andreas Hornig
  • 2,439
  • 5
  • 28
  • 36
3
votes
2 answers

Measuring memory use of a piece of code at runtime in Java as an on-going functionality of a service

I have a project where I need to be able to measure the efficiency in CPU and in memory space of functions I receive as text and compile at run-time using the Java Compiler API. I am using ThreadMXBean to measure running time. Is there a better/more…
3
votes
1 answer

where/what is the output of hotspot's -XX:-CITime flag?

I am trying to use the '-XX:-CITime' flag (documentation) for hotspot JVM, but I have some questions: If I want to enable printing compilation time, then do I type '-XX:-CITime' (with a minus) or '-XX:+CITime' (with a plus)? Where does it output…
Alexander Bird
  • 38,679
  • 42
  • 124
  • 159
3
votes
1 answer

Lambda compilation throws "variable '' of type '' referenced from scope '', but it is not defined"

When I attempt to compile the lambda shown below, it throws: variable 'model' of type 'System.Collections.Generic.IEnumerable`1[WheelEndCatalogKendo.Models.SapBasicData]' referenced from scope '', but it is not defined public static…
CalvinDale
  • 9,005
  • 5
  • 29
  • 38
3
votes
3 answers

the number of constructors during runtime and compile time for java.math.BigDecimal do not match

i defined a new class called BigDecimalWithAttrDisplay with the following implementation: class BigDecimalWithAttrDisplay extends BigDecimal{ String display; BigDecimalWithAttrDisplay(String val){super(val)} public String toString(){ …
Yosefki
  • 383
  • 7
  • 22
3
votes
2 answers

Time Complexities of recursive algorithms

Whenever I see a recursive solution, or I write recursive code for a problem, it is really difficult for me to figure out the time complexity, in most of the cases I just say its exponential? How is it exponential actually? How people say it is 2^n,…
Peter
  • 2,719
  • 4
  • 25
  • 55
2
votes
2 answers

Dynamic program updating, runtime compilation, and class loaders

I have an application that needs the ability to update parts of itself (one class at a time) without stopping and restarting. With the JavaCompiler API, it is straightforward to generate modified class source code, recompile, load, and instantiate a…
user1198411
  • 139
  • 10
2
votes
1 answer

How can I run generated code during script runtime?

During the running of a scala script, I would like it to generate some code and execute this. I thought I had found two examples online that might work, but they aren't successful import scala.reflect.runtime.universe._ import…
user13800089
2
votes
1 answer

Problem with CSS Isolation when I use AddRazorRuntimeCompilation

I use CSS Isolation, but when I use builder.Services.AddRazorPages().AddRazorRuntimeCompilation(); CSS Isolation not works. All styles will be loaded, but not…
Milad Ahmadi
  • 267
  • 4
  • 8
1
2
3
8 9