https://github.com/JuliaLang/julia
Revision f922a6371c6b658aa955e5096774509b12dd7579 authored by Jeff Bezanson on 07 September 2018, 03:32:38 UTC, committed by Keno Fischer on 08 September 2018, 19:47:23 UTC
In this case, the result of `iterate` has not been checked for
`nothing`, so we try to call `indexed_iterate` (for destructuring
assignment) on a Union of Nothing and the tuple returned by
`iterate`. That has two method matches, and so was excluded from
constant propagation. This commit fixes that by generalizing the
constant prop heuristic from requiring one method match to
requiring one non-Bottom method match.

This issue caused a large slowdown in DelimitedFiles, where
the inner loop consists of

```
        while idx <= slen
            val,idx = iterate(dbuff, idx)
```
1 parent 65e4c13
Raw File
Tip revision: f922a6371c6b658aa955e5096774509b12dd7579 authored by Jeff Bezanson on 07 September 2018, 03:32:38 UTC
fix #29036, poor inference of `val,i = iterate(x,i)`
Tip revision: f922a63
Windows.inc
!ifndef _MAKEFILE_INC_

_MAKEFILE_INC_ = 1

!if ( "$(TARGET_CPU)" == "X86" ) || ( "$(TARGET_CPU)" == "x86" )
CPU = i386
!elseif ( "$(TARGET_CPU)" == "X64" ) || ( "$(TARGET_CPU)" == "x64" )
CPU = AMD64
!else
CPU = $(PROCESSOR_ARCHITECTURE)
!endif

###############################################################################

!if "$(TARGET_OS)" == ""
TARGET_OS = 5.02
!endif

###############################################################################

!if "$(TARGET_OS)" == "5.0"
WINVER = 0x0500
!elseif "$(TARGET_OS)" == "5.01"
WINVER = 0x0501
!elseif "$(TARGET_OS)" == "5.02"
WINVER = 0x0502
!elseif "$(TARGET_OS)" == "6.0"
WINVER = 0x0600
!endif

###############################################################################

!ifdef INTEL
CC = icl /nologo /Qstd=c99
LINK = xilink /nologo
AR = xilib /nologo
!else
CC = cl /nologo /TP
LINK = link /nologo
AR = lib /nologo
!endif

###############################################################################

CFLAGS = /c /DCRTAPI1=_cdecl /DCRTAPI2=_cdecl /GS /D_WINNT /D_WIN32_WINNT=$(WINVER) /DNTDDI_VERSION=$(WINVER)0000 /DWINVER=$(WINVER) /DWIN32 /D_WIN32
LFLAGS = /INCREMENTAL:NO /NODEFAULTLIB:MSVCRT

!if "$(CPU)" == "i386"
CFLAGS = $(CFLAGS) /D_X86_=1
!elseif "$(CPU)" == "AMD64"
CFLAGS = $(CFLAGS) /D_AMD64_=1 /DWIN64 /D_WIN64
!endif

!ifdef JL_DEBUG_BUILD
CFLAGS = $(CFLAGS) /Zi /Od /DDEBUG /MDd
LFLAGS = $(LFLAGS) /DEBUG
!else
CFLAGS = $(CFLAGS) /Ox /DNDEBUG /MD
LFLAGS = $(LFLAGS) /RELEASE
!endif

!endif # _MAKEFILE_INC_

# vim: noexpandtab:ts=4:sw=4:ft=make:

back to top