A
A
Andrey Bogdanov2015-03-18 14:52:42
ActionScript
Andrey Bogdanov, 2015-03-18 14:52:42

After compilation to bytecode, operations on constants are converted to constants?

If we write:
const a = 1/2;
this will change to:
const a = 0.5;
or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cyril, 2015-03-21
@scaler

With a probability of 99.9% this is true. Most likely, this substitution will be performed by the compiler when parsing and optimizing the syntax tree.
I haven't seen a single compiler yet that doesn't do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question