2023 2024 Student Forum > Management Forum > Entrance Exams

 
  #1  
14th April 2015, 10:47 AM
Unregistered
Guest
 
Dce haxe

I am computer processional and my boss tell me to read about the Dead Code Elimination – Haxe which the latest complier? I haven’t heard this term before? Will you please share the basis idea about DCE HAXE? If you can’t do it then tell me about the websites from where I can read the contents?
  #2  
1st September 2018, 08:21 AM
Unregistered
Guest
 
Re: Dce haxe

Can you tell me in detail about the Compiler Features - Dead Code Elimination or DCE - offered by Haxe Foundation?
  #3  
1st September 2018, 08:23 AM
Super Moderator
 
Join Date: Aug 2012
Re: Dce haxe

Dead Code Elimination or DCE offered by Haxe Foundation is a compiler feature which removes unused code from the output. After typing, the compiler evaluates the DCE entry-points (usually the main-method) and recursively determines which fields and types are used.

Used fields are marked accordingly and unmarked fields are then removed from their classes. DCE has 3 modes which are set when invoking the command line:
-dce std: Only classes in the Haxe Standard Library are affected by DCE. This is the default setting on all targets.
-dce no: No DCE is performed.
-dce full: All classes are affected by DCE.

The DCE-algorithm works well with typed code, but may fail when dynamic or reflection is involved. This may require explicit marking of fields or classes as being used by attributing the following metadata:
@:keep: If used on a class, the class along with all fields is unaffected by DCE. If used on a field, that field is unaffected by DCE.
@:keepSub: If used on a class, it works like @:keep on the annotated class as well as all subclasses.
@:keepInit: Usually, a class which had all fields removed by DCE (or is empty to begin with) is removed from the output. By using this metadata, empty classes are kept.

Compiler Features - Dead Code Elimination or DCE - Haxe Foundation




Quick Reply
Your Username: Click here to log in

Message:
Options

Thread Tools Search this Thread



All times are GMT +5. The time now is 04:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
SEO by vBSEO 3.6.0 PL2

1 2 3 4