Author:admin

Date:2008-09-17T13:53:28.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@3 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
jfiat
2008-09-17 13:53:28 +00:00
parent 4fee9356ea
commit 2ee31ab9c7
763 changed files with 36576 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
[[Property:title|Enabling the profiler]]
[[Property:weight|4]]
To profile an executable, the profiler must first be enabled. To enable the profiler:
* Open the [[General Target Options|Project Settings]] dialog.
* In the '''Target''' section, enable '''Profile'''.
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{seealso| '''See Also''' <br/>
[[Profiler wizard: Introduction|Profiler reference]] }}

View File

@@ -0,0 +1,19 @@
[[Property:title|Generating executables]]
[[Property:weight|0]]
There are several ways to compile an executable with EiffelStudio.
Compilation modes include the following: melting, freezing and finalizing. To learn more about the compilation semantics in EiffelStudio, see the [[Compiler: introduction|compiler reference]] .
There is a command for all compilation modes in the '''Project''' menu, under the entries '''Compile''', '''Freeze''' and '''Finalize'''. There is also a
These commands are also available in the '''Project''' toolbar [[Image:project-melt-icon]] , [[Image:project-freeze-icon]] , [[Image:project-finalize-icon]] .
To solve the errors that occur during the Eiffel compilation, use the [[Error wizard|compilation error wizard]] . For errors occurring during the C compilation, check that the installation is not corrupted and refer to your C compiler documentation for more information.
{{seealso| '''See Also''' <br/>
[[Command line: Introduction|Command line options]] <br/>
[[Compiler: introduction|Compiler reference]] }}

View File

@@ -0,0 +1,32 @@
[[Property:title|Generating libraries]]
[[Property:weight|1]]
There are two main types of libraries in Eiffel: precompiled Eiffel libraries and C libraries. Both kinds of libraries can be created via EiffelStudio. The former can only be used in Eiffel projects, C libraries can be used either in Eiffel programs, or in standard C programs.
To generate an Eiffel precompiled library:
* Select the '''Precompilation Wizard''' in the '''Tools''' menu and follow the instructions,
or
* Launch a new EiffelStudio session,
* Select your project
* Change the action to '''Precompile''',
* Click '''Open'''
To generate a dynamically linked C library using Eiffel code:
* Generate a definition file for this library, via the [[Dynamic library builder|Dynamic library Builder]] ,
* Open the [[Advanced Options|Project Settings]] dialog,
* In the '''Advanced''' section, set the '''Shared Library Definition''',
* Enter the name of the definition you created in the first step(including the path if necessary),
* Compile the current project.
The generated C library should be located in the EIFGENs|target_name|W_code directory in the directory of your project.
To generate a C library from a C compiler, please refer to the documentation of your C compiler.
{{seealso| '''See Also''' <br/>
[[Using libraries|Using libraries]] <br/>
[[CECIL|CECIL library: calling Eiffel routines from C programs]] <br/>
[[Command line: Introduction|Command line options]] }}

View File

@@ -0,0 +1,13 @@
[[Property:title|Compiling]]
[[Property:weight|3]]
* [[Generating executables|Generating executables]]
* [[Generating libraries|Generating libraries]]
* [[Setting the assertion level|Changing the assertion level]]
* [[Enabling the profiler|Enabling the profiler]]
* [[Using libraries|Using libraries]]
* [[Tuning a program|Tuning a program]]
* [[Using threads|Using threads]]

View File

@@ -0,0 +1,14 @@
[[Property:title|Setting the assertion level]]
[[Property:weight|2]]
To modify the assertion level in a generated binary (executable or library),
* Open the [[Assertion Options|Project Settings]] dialog.
* In the '''Target, Assertions'''section, select the assertions you want to check (among require, ensure, check, loop and class invariant).
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{seealso| '''See Also''' <br/>
[[8 Design by Contract (tm), Assertions and Exceptions|Assertions in Eiffel]] }}

View File

@@ -0,0 +1,24 @@
[[Property:title|Tuning a program]]
[[Property:weight|6]]
The best way to speed up a program is of course to improve the algorithms and data structures you are using. Spotting the functions that slow down the execution and improving can change a lot in a program. [[Profiling|Profiling]] can be used for this.
Try to keep the number of classes and objects in your system as low as possible to ensure maximum efficiency. This should never hinder the design of the system, though.
You can also use the functionality provided by the [[ref:/libraries/base/reference/memory_chart|MEMORY]] class to tweak the garbage collector behavior according to your needs. However, be careful with this, since providing erroneous parameters might lead to memory leaks, huge memory consumption, or on the contrary a dramatic slow down of the application. If you are not entirely sure what a parameter is for, avoid changing it. The default values should fit for most standard applications.
On top of that, EiffelStudio provides powerful optimizations, some being done automatically, others being configurable. To obtain a maximum efficiency, it is recommended to [[Generating executables|Finalize]] your program from scratch and without using precompiled libraries.
In the [[Advanced Options|Project Settings dialog advanced section]] , try experimenting with the '''Inlining''' option, and setting the maximum size of features that should be inlined. Only Eiffel features are inlined by this option, to see how to inline the C functions you may be using in your program, please refer to your C compiler documentation.
In the [[Advanced Options|Project Settings dialog advanced section]] , enabling the '''Dead code removal''' will help produce smaller executables.
Removing the '''Execution Trace''' will optimize the executable in size and speed, but in case of crash no information will be available.
All these options are located in the [[Advanced Options|Project Settings]] dialog, in the '''Advanced''' section. They are only effective during finalizations.
{{seealso| '''See Also''' <br/>
[[Profiler wizard: Introduction|Profiler reference]] }}

View File

@@ -0,0 +1,26 @@
[[Property:title|Using libraries]]
[[Property:weight|5]]
There are two kinds of libraries in Eiffel: precompiled Eiffel libraries and C libraries.
To use an Eiffel precompiled library:
* Open the [[Group Options|Project Settings]] dialog.
* Add a new precompile group to your target.
* You must [[Generating executables|recompile]] your project from scratch for the changes to take effect.
{{note| '''Note''': You can only use one precompiled library at a time in a project. To use more than one, you should precompile all the libraries you want to use together in a single precompiled library. }}
To use a C library:
* Open the [[Externals Options|Project Settings]] dialog.
* Add an include external for the directory where the header files needed to use the library are.
* Add an object external for each object file needed to use the library. These files can be either library files (.lib, .a, etc) or object files (.obj, .o, etc)
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{seealso| '''See Also''' <br/>
[[Generating libraries|Creating libraries]] <br/>
[[Adding a cluster|Adding classes and clusters from Eiffel libraries without precompiling the library]] <br/>
[[C externals|Making C calls in Eiffel]] }}

View File

@@ -0,0 +1,18 @@
[[Property:title|Using threads]]
[[Property:weight|7]]
Eiffel supports multithreaded programs. The [[EiffelThread Library|thread library]] provides ways to handle threads safely inside an Eiffel program. Make sure you [[Adding a library|add]] it to your project if you want to use threads.
To create a multithreaded program or library:
* Open the [[Advanced Options|Project Settings]] dialog.
* In the '''Advanced''' section, enable '''Multithreaded''' option.
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{warning| '''Caution''': Make sure the external and precompiled libraries you use have also been compiled with support for threads. }}
{{seealso| '''See Also''' <br/>
[[Generating libraries|Creating libraries]] }}