Skip to content

Commit

Permalink
remove flash8 target (see #3922)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadako committed Mar 16, 2015
1 parent 065ab67 commit 7eeeed0
Show file tree
Hide file tree
Showing 125 changed files with 200 additions and 4,757 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ CC_PARSER_CMD = $(COMPILER) -pp camlp4o $(CFLAGS) -c parser.ml
RELDIR=../../..

MODULES=ast type lexer common genxml parser typecore optimizer typeload \
codegen gencommon genas3 gencpp genjs genneko genphp genswf8 \
codegen gencommon genas3 gencpp genjs genneko genphp \
genswf9 genswf genjava gencs genpy interp dce analyzer filters typer matcher version main

ADD_REVISION=0
Expand Down Expand Up @@ -144,11 +144,9 @@ genphp.$(MODULE_EXT): type.$(MODULE_EXT) lexer.$(MODULE_EXT) common.$(MODULE_EXT

genpy.$(MODULE_EXT): type.$(MODULE_EXT) lexer.$(MODULE_EXT) common.$(MODULE_EXT) codegen.$(MODULE_EXT) ast.$(MODULE_EXT)

genswf.$(MODULE_EXT): type.$(MODULE_EXT) genswf9.$(MODULE_EXT) genswf8.$(MODULE_EXT) common.$(MODULE_EXT) ast.$(MODULE_EXT)
genswf.$(MODULE_EXT): type.$(MODULE_EXT) genswf9.$(MODULE_EXT) common.$(MODULE_EXT) ast.$(MODULE_EXT)

genswf8.$(MODULE_EXT): type.$(MODULE_EXT) lexer.$(MODULE_EXT) common.$(MODULE_EXT) codegen.$(MODULE_EXT) ast.$(MODULE_EXT)

genswf9.$(MODULE_EXT): type.$(MODULE_EXT) lexer.$(MODULE_EXT) genswf8.$(MODULE_EXT) common.$(MODULE_EXT) codegen.$(MODULE_EXT) ast.$(MODULE_EXT)
genswf9.$(MODULE_EXT): type.$(MODULE_EXT) lexer.$(MODULE_EXT) common.$(MODULE_EXT) codegen.$(MODULE_EXT) ast.$(MODULE_EXT)

genxml.$(MODULE_EXT): type.$(MODULE_EXT) lexer.$(MODULE_EXT) common.$(MODULE_EXT) ast.$(MODULE_EXT)

Expand Down
2 changes: 1 addition & 1 deletion analyzer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ module Run = struct
let run_on_expr com config is_var_expression e =
let do_simplify = (not (Common.defined com Define.NoSimplify) ) && match com.platform with
| Cpp when Common.defined com Define.Cppia -> false
| Cpp | Flash8 | Python -> true
| Cpp | Python -> true
| _ -> false
in
let with_timer s f =
Expand Down
20 changes: 0 additions & 20 deletions common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type stats = {

type platform =
| Cross
| Flash8
| Js
| Neko
| Flash
Expand Down Expand Up @@ -235,7 +234,6 @@ module Define = struct
| SwfDebugPassword
| SwfDirectBlit
| SwfGpu
| SwfMark
| SwfMetadata
| SwfPreloaderFrame
| SwfProtected
Expand Down Expand Up @@ -321,7 +319,6 @@ module Define = struct
| SwfDebugPassword -> ("swf_debug_password", "Set a password for debugging")
| SwfDirectBlit -> ("swf_direct_blit", "Use hardware acceleration to blit graphics")
| SwfGpu -> ("swf_gpu", "Use GPU compositing features when drawing graphics")
| SwfMark -> ("swf_mark","GenSWF8 internal")
| SwfMetadata -> ("swf_metadata", "=<file> Include contents of <file> as metadata in the swf")
| SwfPreloaderFrame -> ("swf_preloader_frame", "Insert empty first frame in swf")
| SwfProtected -> ("swf_protected","Compile Haxe private as protected in the SWF instead of public")
Expand Down Expand Up @@ -555,21 +552,6 @@ let get_config com =
match com.platform with
| Cross ->
default_config
| Flash8 ->
{
pf_static = false;
pf_sys = false;
pf_locals_scope = com.flash_version > 6.;
pf_captured_scope = false;
pf_unique_locals = false;
pf_capture_policy = CPLoopVars;
pf_pad_nulls = false;
pf_add_final_return = false;
pf_overload = false;
pf_pattern_matching = false;
pf_can_skip_non_nullable_argument = true;
pf_reserved_type_paths = [];
}
| Js ->
{
pf_static = false;
Expand Down Expand Up @@ -801,7 +783,6 @@ let file_extension file =
| [] -> ""

let platforms = [
Flash8;
Js;
Neko;
Flash;
Expand All @@ -814,7 +795,6 @@ let platforms = [

let platform_name = function
| Cross -> "cross"
| Flash8 -> "flash8"
| Js -> "js"
| Neko -> "neko"
| Flash -> "flash"
Expand Down
2 changes: 2 additions & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
2015-03-15: 3.2.0-RC1

This release removes support for Flash 8 target

New features:

all : added --display mode for toplevel completion
Expand Down
4 changes: 0 additions & 4 deletions extra/ImportAll.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class ImportAll {
if( !Context.defined("js") ) return;
case "cpp":
if( !Context.defined("cpp") ) return;
case "flash8":
if( !Context.defined("flash") || Context.defined("flash9") ) return;
case "flash":
if( !Context.defined("flash9") ) return;
case "sys":
Expand Down Expand Up @@ -74,8 +72,6 @@ class ImportAll {
var full = (pack == "") ? file : pack + "." + file;
if( StringTools.endsWith(file, ".hx") ) {
var cl = full.substr(0, full.length - 3);
if( StringTools.startsWith(cl,"flash8.") )
cl = "flash."+cl.substr(7);
switch( cl ) {
case "ImportAll", "neko.db.MacroManager": continue;
case "haxe.TimerQueue": if( Context.defined("neko") || Context.defined("php") || Context.defined("cpp") ) continue;
Expand Down
7 changes: 0 additions & 7 deletions extra/all.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@

--next

-swf all.swf
-swf-version 8
-xml flash8.xml
-D flash_lite

--next

-js all.js
-xml js.xml

Expand Down
2 changes: 1 addition & 1 deletion extra/release.neko
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ chdir(dir+"/std/tools");

chdir("haxedoc");
cmd("haxe haxedoc.hxml");
cmd(curdir+"haxedoc -v \"../../../../flash8.xml;flash8;flash\" \"../../../../neko.xml;neko\" \"../../../../js.xml;js\" \"../../../../flash9.xml;flash\" \"../../../../php.xml;php\" \"../../../../cpp.xml;cpp\"");
cmd(curdir+"haxedoc -v \"../../../../neko.xml;neko\" \"../../../../js.xml;js\" \"../../../../flash9.xml;flash\" \"../../../../php.xml;php\" \"../../../../cpp.xml;cpp\"");
cmd("mv index.html content ../../../doc");
cmd("mv haxedoc"+binext+" ../../..");
chdir("..");
Expand Down
4 changes: 2 additions & 2 deletions filters.ml
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ let rename_local_vars ctx e =
let old = save() in
(* we have to look ahead for vars on these targets (issue #3344) *)
begin match ctx.com.platform with
| Js | Flash8 ->
| Js ->
let rec check_var e = match e.eexpr with
| TVar (v,eo) ->
(match eo with None -> () | Some e -> loop e);
Expand Down Expand Up @@ -1098,7 +1098,7 @@ let run com tctx main =
Codegen.AbstractCast.handle_abstract_casts tctx;
blockify_ast;
( if (Common.defined com Define.NoSimplify) || (Common.defined com Define.Cppia) ||
( match com.platform with Cpp | Flash8 -> false | _ -> true ) then
( match com.platform with Cpp -> false | _ -> true ) then
fun e -> e
else
fun e ->
Expand Down
38 changes: 3 additions & 35 deletions genswf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -730,35 +730,6 @@ let remove_classes toremove lib hcl =
toremove := List.filter (fun p -> not (List.mem p classes)) !toremove;
fst lib, tags (snd lib)

let build_swf8 com codeclip exports =
let code, clips = Genswf8.generate com in
let cid = ref 0 in
let clips = List.fold_left (fun acc m ->
let ename = Ast.s_type_path m in
if Hashtbl.mem exports ename then
acc
else begin
incr cid;
tag ~ext:true (TClip { c_id = !cid; c_frame_count = 1; c_tags = [] }) ::
tag ~ext:true (TExport [{ exp_id = !cid; exp_name = ename }]) ::
acc
end;
) [] clips in
let code = (match codeclip with
| None -> List.map tag code
| Some link ->
incr cid;
[
tag (TClip {
c_id = !cid;
c_frame_count = 1;
c_tags = List.map tag code @ [tag TShowFrame];
});
tag (TExport [{ exp_id = !cid; exp_name = link }]);
]
) in
clips @ code

type file_format =
| BJPG
| BPNG
Expand Down Expand Up @@ -1062,7 +1033,6 @@ let merge com file priority (h1,tags1) (h2,tags2) =
classes := !classes @ List.map (fun e -> { f9_cid = Some e.exp_id; f9_classname = e.exp_name }) el;
false
| TF9Classes el when !nframe = 0 ->
if com.flash_version < 9. then failwith "You can't use AS3 SWF with Flash8 target";
classes := !classes @ List.filter (fun e -> e.f9_cid <> None) el;
false
| _ -> true
Expand Down Expand Up @@ -1108,9 +1078,7 @@ let merge com file priority (h1,tags1) (h2,tags2) =

let generate com swf_header =
let t = Common.timer "generate swf" in
let isf9 = com.flash_version >= 9. in
let swc = if Common.defined com Define.Swc then Some (ref "") else None in
if swc <> None && not isf9 then failwith "SWC support is only available for Flash9+";
let file , codeclip = (try let f , c = ExtString.String.split com.file "@" in f, Some c with _ -> com.file , None) in
(* list exports *)
let exports = Hashtbl.create 0 in
Expand Down Expand Up @@ -1144,15 +1112,15 @@ let generate com swf_header =
) tags;
) com.swf_libs;
(* build haxe swf *)
let tags = if isf9 then build_swf9 com file swc else build_swf8 com codeclip exports in
let tags = build_swf9 com file swc in
let header, bg = (match swf_header with None -> default_header com | Some h -> convert_header com h) in
let bg = tag (TSetBgColor { cr = bg lsr 16; cg = (bg lsr 8) land 0xFF; cb = bg land 0xFF }) in
let swf_debug_password = try
Digest.to_hex(Digest.string (Common.defined_value com Define.SwfDebugPassword))
with Not_found ->
""
in
let debug = (if isf9 && Common.defined com Define.Fdb then [tag (TEnableDebugger2 (0, swf_debug_password))] else []) in
let debug = (if Common.defined com Define.Fdb then [tag (TEnableDebugger2 (0, swf_debug_password))] else []) in
let meta_data =
try
let file = Common.defined_value com Define.SwfMetadata in
Expand All @@ -1165,7 +1133,7 @@ let generate com swf_header =
let fattr = (if com.flash_version < 8. then [] else
[tag (TFilesAttributes {
fa_network = Common.defined com Define.NetworkSandbox;
fa_as3 = isf9;
fa_as3 = true;
fa_metadata = meta_data <> [];
fa_gpu = com.flash_version > 9. && Common.defined com Define.SwfGpu;
fa_direct_blt = com.flash_version > 9. && Common.defined com Define.SwfDirectBlit;
Expand Down
Loading

0 comments on commit 7eeeed0

Please sign in to comment.