remove dead code elimination option (#7669)

This commit is contained in:
Jacek Sieka 2018-04-23 17:02:38 +08:00 • committed by Andreas Rumpf
commit 72dfe176f5
57 changed files with 67 additions and 122 deletions

View file

@ -32,7 +32,7 @@
include "system/inclrtl"
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
when hostOS == "solaris":
{.passl: "-lsocket -lnsl".}

View file

@ -81,7 +81,7 @@
##
## theDb.close()
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
import strutils, sqlite3

View file

@ -13,7 +13,7 @@
## is used. This suffices because Windows' console already provides the
## wanted functionality.
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
when defined(Windows):
proc readLineFromStdin*(prompt: string): TaintedString {.

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
from posix import SocketHandle

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
# Get the platform-dependent flags.
# Structure describing an inotify event.

View file

@ -7,8 +7,6 @@
# distribution, for details about the copyright.
#
{.deadCodeElim:on.}
from posix import Timespec
when defined(macosx) or defined(freebsd) or defined(openbsd) or
@ -61,7 +59,7 @@ const
EV_CLEAR* = 0x0020 ## Clear event state after reporting.
EV_RECEIPT* = 0x0040 ## Force EV_ERROR on success, data == 0
EV_DISPATCH* = 0x0080 ## Disable event after reporting.
EV_SYSFLAGS* = 0xF000 ## Reserved by system
EV_DROP* = 0x1000 ## Not should be dropped
EV_FLAG1* = 0x2000 ## Filter-specific flag
@ -87,10 +85,10 @@ when defined(macosx) or defined(freebsd) or defined(dragonfly):
NOTE_FFAND* = 0x40000000'u32 ## AND fflags
NOTE_FFOR* = 0x80000000'u32 ## OR fflags
NOTE_FFCOPY* = 0xc0000000'u32 ## copy fflags
NOTE_FFCTRLMASK* = 0xc0000000'u32 ## masks for operations
NOTE_FFCTRLMASK* = 0xc0000000'u32 ## masks for operations
NOTE_FFLAGSMASK* = 0x00ffffff'u32
NOTE_TRIGGER* = 0x01000000'u32 ## Cause the event to be triggered
NOTE_TRIGGER* = 0x01000000'u32 ## Cause the event to be triggered
## for output.
# data/hint flags for EVFILT_{READ|WRITE}, shared with userspace

View file

@ -1,4 +1,4 @@
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
import posix

View file

@ -27,10 +27,10 @@
## resulting C code will just ``#include <XYZ.h>`` and *not* define the
## symbols declared here.
# This ensures that we don't accidentally generate #includes for files that
# might not exist on a specific platform! The user will get an error only
# if they actualy try to use the missing declaration
{.deadCodeElim: on.}
# Dead code elimination ensures that we don't accidentally generate #includes
# for files that might not exist on a specific platform! The user will get an
# error only if they actualy try to use the missing declaration
{.deadCodeElim: on.} # dce option deprecated
# TODO these constants don't seem to be fetched from a header file for unknown
# platforms - where do they come from and why are they here?

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
const
hasSpawnH = not defined(haiku) # should exist for every Posix system nowadays

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
import posix
type

View file

@ -10,7 +10,7 @@
## Floating-point environment. Handling of floating-point rounding and
## exceptions (overflow, division by zero, etc.).
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
when defined(Posix) and not defined(haiku):
{.passl: "-lm".}

View file

@ -12,7 +12,7 @@
## **Warning:** This module is deprecated since version 0.14.0.
{.deprecated.}
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
{.push debugger:off .} # the user does not want to trace a part
# of the standard library!

View file

@ -68,7 +68,7 @@
## ``newSocket()``. The difference is that the latter creates a new file
## descriptor.
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
import nativesockets, os, strutils, parseutils, times, sets, options
export Port, `$`, `==`
export Domain, SockType, Protocol

View file

@ -10,7 +10,7 @@
## This module contains basic operating system facilities like
## retrieving environment variables, reading command line arguments,
## working with directories, running shell commands, etc.
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
{.push debugger: off.}

View file

@ -11,7 +11,7 @@
##
## To unpack raw bytes look at the `streams <streams.html>`_ module.
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
{.push debugger:off .} # the user does not want to trace a part
# of the standard library!

View file

@ -19,7 +19,7 @@
include "system/inclrtl"
import streams
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
{.push debugger:off .} # the user does not want to trace a part
# of the standard library!

View file

@ -12,7 +12,7 @@
import strutils
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
proc expandTabs*(s: string, tabSize: int = 8): string {.noSideEffect,
procvar.} =

View file

@ -17,7 +17,7 @@ import parseutils
from math import pow, round, floor, log10
from algorithm import reverse
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
{.push debugger:off .} # the user does not want to trace a part
# of the standard library!

View file

@ -9,7 +9,7 @@
## This module provides support to handle the Unicode UTF-8 encoding.
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
include "system/inclrtl"

View file

@ -146,7 +146,7 @@ proc declared*(x: untyped): bool {.magic: "Defined", noSideEffect, compileTime.}
## # missing it.
when defined(useNimRtl):
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
proc definedInScope*(x: untyped): bool {.
magic: "DefinedInScope", noSideEffect, deprecated, compileTime.}

View file

@ -10,7 +10,7 @@
## This module implements a small wrapper for some needed Win API procedures,
## so that the Nim compiler does not depend on the huge Windows module.
{.deadCodeElim:on.}
{.deadCodeElim: on.} # dce option deprecated
import dynlib

View file

@ -34,7 +34,7 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# ****************************************************************************
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
when defined(windows):
const dllname = "iup(|30|27|26|25|24).dll"

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
{.push, callconv: cdecl.}
when defined(Unix):

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
when not defined(ODBCVER):
const

View file

@ -22,7 +22,7 @@
## ./bin/nim c -d:ssl -p:. -r tests/untestable/tssl.nim
## ./bin/nim c -d:ssl -p:. --dynlibOverride:ssl --passL:-lcrypto --passL:-lssl -r tests/untestable/tssl.nim
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
const useWinVersion = defined(Windows) or defined(nimdoc)

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
# The current PCRE version information.

View file

@ -15,7 +15,7 @@
# connection-protocol.
#
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
when defined(windows):
const

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
{.deadCodeElim: on.}
{.deadCodeElim: on.} # dce option deprecated
when defined(windows):
when defined(nimOldDlls):
const Lib = "sqlite3.dll"