Questions tagged [dynamic-execution]
17 questions
9
votes
2 answers
How to dynamically execute/eval JavaScript code that contains an ES6 module / requires some dependencies?
I want my users to be able to use JavaScript as a scripting language inside my JavaScript application. In order to do so, I need to dynamically execute the source code.
There seem to be two main options for dynamically executing JavaScript:
a) Use…

Stefan
- 10,010
- 7
- 61
- 117
7
votes
2 answers
Python: how to dynamically set function closure environment
I want to declare a function dynamically and I want to wrap any access to global variables OR alternatively define which variables are free and wrap any access to free variables.
I'm playing around with code like this:
class D:
def…

Albert
- 65,406
- 61
- 242
- 386
7
votes
1 answer
Out-of-order instruction execution: is commit order preserved?
On the one hand, Wikipedia writes about the steps of the out-of-order execution:
Instruction fetch.
Instruction dispatch to an instruction queue (also called instruction buffer or reservation stations).
The instruction waits in the queue until its…

undermind
- 1,779
- 13
- 33
7
votes
5 answers
Is there a way to trick the .NET JIT compiler into running another method?
OK, say that my application is emitting (x86) instructions into memory, making the page executable, etc. Is there a way of altering the method stub of an un-JITted method to point to my emitted instruction stream?
E.g.:
Suppose I have created an x86…

TraumaPony
- 10,742
- 12
- 54
- 74
7
votes
3 answers
Compiling code containing dynamic parallelism fails
I am doing dynamic parallelism programming using CUDA 5.5 and an NVDIA GeForce GTX 780 whose compute capability is 3.5. I am calling a kernel function inside a kernel function but it is giving me an error:
error : calling a __global__…

user2865500
- 81
- 1
- 4
3
votes
2 answers
Example to find a value in a list using common expression language (CEL)
I was following google common expression language specification, can some one guide me if i could do something like this:
I need to write an expression to find if "345" is in the phone_numbers list using google CEL .
json : {"phone_numbers":…

Chetana Dixit
- 51
- 1
- 3
3
votes
2 answers
Passing operators as functions to use with Pandas data frames
I am selecting data from series on basis of threshold .
>>> s = pd.Series(np.random.randn(5))
>>> s
0 -0.308855
1 -0.031073
2 0.872700
3 -0.547615
4 0.633501
dtype: float64
>>> cfg = {'threshold' : 0 , 'op' : 'less' }
>>> ops = {'less'…

Bharat Sharma
- 1,081
- 3
- 11
- 23
2
votes
0 answers
Dynamic C code execution: memory references
tl;dr : I'm trying to execute dynamically some code from another snippet. But I am stuck with handling memory reference (e.g. mov 40200b, %rdi): can I patch my code or the snippet running code so that 0x40200b is resolved correctly (as the offset…

Maxime B.
- 1,116
- 8
- 21
2
votes
2 answers
How can you get a DLL to be deleted when its owner process exits?
I have a .NET assembly DLL that is created on-the-fly from pre-compiled code in a database. Is there a way to create the DLL file, put data into it, load it with the Assembly class, then when the process exits, have that DLL be deleted?
My first…

Joe
- 16,328
- 12
- 61
- 75
2
votes
1 answer
Dynamic execution is not working when the plugin was installed
I am developing an Eclipse plugin that runs the current active file. I am using this method
public static void runIt(String fileToCompile,String packageName) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException,…

student1234
- 201
- 1
- 8
2
votes
4 answers
how to run some code in memory?
I have a compiler which compiles assembly language to machine language (in memory).
My project is in C# .net.
Is there any way to run the memory on a thread?
How can DEP prevent it?
byte[] a:
01010101 10111010 00111010 10101011 ...

Behrooz
- 1,696
- 2
- 32
- 54
1
vote
0 answers
Solidity Gas Optimization dynamic function execution
Anyone know which is more efficient dynamic function execution
function push(
History storage self,
function(uint256, uint256) view returns (uint256) op,
uint256 delta
) internal returns (uint256, uint256) {
return push(self,…

Ritzy Dev
- 387
- 3
- 10
1
vote
1 answer
Obtaining result of Dynamic execution of a java file
I am using the method below to execute a file called NewFile.java.
The line thisMethod.invoke(instance,(Object)m); automatically
runs the NewFile.java and prints the result [if existed] in the
console, Is there anyway that I can obtain the…

CSstudent
- 43
- 6
0
votes
0 answers
Aarch64, ldd command retruns "Not a dynamic executable"
I have been trying to use run a simulator built for ubuntu from my m1 macbook. I am using parallels and a Ubuntu virtual machine. There seems to be a problem with one of the .so files.
$ldd libepanet.so
not a dynamic executable
When I run the same…

Murat Göğebakan
- 1
- 1
0
votes
1 answer
Is it an out of order execution case?
Consider the code below.
#include
#include
#include
#include
const int N = 1 << 28;
int main()
{
const int seed = 0;
std::mt19937 gen;
std::uniform_real_distribution dis;
…

user3786219
- 177
- 1
- 2
- 11