summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-02-12 14:04:44 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2016-02-13 17:04:21 +0100
commitf70c77e1c4d5b6c951669d79cf73a1ff0b932312 (patch)
tree02c0f226445a2e0002bbfb472ad9f337b02e5c3f /CONTRIBUTING.md
parent7c25282ff91445dc1bdc20e49b68c2d20c318876 (diff)
downloadscala-f70c77e1c4d5b6c951669d79cf73a1ff0b932312.tar.gz
scala-f70c77e1c4d5b6c951669d79cf73a1ff0b932312.tar.bz2
scala-f70c77e1c4d5b6c951669d79cf73a1ff0b932312.zip
Generate leaner code for branches
GenBCode used to generate more bytecode for branching instructions than GenASM. A simple method def f(x: Int, b: Boolean) = if (b) 1 else 2 would generate ILOAD 2 IFNE L1 GOTO L2 L1 ICONST_1 GOTO L3 L2 ICONST_2 L3 IRETURN If the conditional branch is negated (IFEQ) the GOTO is unnecessary. While -Yopt:l:method would clean this up, it's also not too hard to generate the leaner bytecode in the first place.
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions