chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e307b2
)
lowering: Do not construct range iter for empty plan entries
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 19 Jul 2021 23:44:04 +0000
(
00:44
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 19 Jul 2021 23:44:57 +0000
(
00:44
+0100)
We are going to want to let these have malformed reanges.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index 1a898ce0fd88a36f6d69ec67943db2fdbec93d6e..6f07040925d85f43fe9683e26b32320cfa934e67 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-798,7
+798,8
@@
function lower_pieces(targets_todo: LowerTodoList):
for (const pe of plan) {
let z_top = pe.z_top;
let z_bot = pe.z_bot;
- if (pe.content.length != 0 && z_bot == null) {
+ if (! pe.content.length) continue;
+ if (z_bot == null) {
let first_z = pe.content[0].p.z;
if (z_top >= first_z)
z_top = first_z;