Selaa lähdekoodia

Merge pull request #4057 from HaxeFoundation/development

3.2.0-rc2
Simon Krajewski 10 vuotta sitten
vanhempi
commit
27fa742abf
100 muutettua tiedostoa jossa 1236 lisäystä ja 733 poistoa
  1. 2 2
      .travis.yml
  2. 3 3
      appveyor.yml
  3. 2 2
      common.ml
  4. 1 0
      extra/CHANGES.txt
  5. 1 1
      extra/haxelib_src
  6. 35 6
      filters.ml
  7. 34 23
      gencpp.ml
  8. 11 0
      genjs.ml
  9. 1 1
      libs
  10. 0 5
      main.ml
  11. 356 0
      std/cpp/_std/haxe/Int64.hx
  12. 0 139
      std/cpp/_std/haxe/Int64.hx2
  13. 31 85
      std/cs/_std/Std.hx
  14. 0 1
      std/flash/Boot.hx
  15. 43 25
      std/haxe/CallStack.hx
  16. 1 1
      std/haxe/unit/TestCase.hx
  17. 35 93
      std/java/_std/Std.hx
  18. 3 0
      std/java/lang/Byte.hx
  19. 322 0
      std/java/lang/Character.hx
  20. 2 0
      std/java/lang/Integer.hx
  21. 3 0
      std/java/lang/Long.hx
  22. 2 0
      std/java/lang/Short.hx
  23. 11 0
      std/js/Boot.hx
  24. 0 8
      std/js/_std/HxOverrides.hx
  25. 5 5
      std/js/_std/haxe/io/Bytes.hx
  26. 1 1
      std/js/html/AnchorElement.hx
  27. 1 1
      std/js/html/Animation.hx
  28. 1 1
      std/js/html/AppletElement.hx
  29. 1 1
      std/js/html/AreaElement.hx
  30. 1 1
      std/js/html/Attr.hx
  31. 1 1
      std/js/html/BRElement.hx
  32. 1 1
      std/js/html/BaseElement.hx
  33. 1 1
      std/js/html/BodyElement.hx
  34. 1 1
      std/js/html/ButtonElement.hx
  35. 1 1
      std/js/html/CanvasElement.hx
  36. 2 2
      std/js/html/CanvasRenderingContext2D.hx
  37. 2 2
      std/js/html/CharacterData.hx
  38. 1 1
      std/js/html/ContentElement.hx
  39. 1 1
      std/js/html/DListElement.hx
  40. 223 0
      std/js/html/DOMElement.hx
  41. 1 1
      std/js/html/DataElement.hx
  42. 1 1
      std/js/html/DataListElement.hx
  43. 2 2
      std/js/html/DataTransfer.hx
  44. 1 1
      std/js/html/DirectoryElement.hx
  45. 1 1
      std/js/html/DivElement.hx
  46. 17 17
      std/js/html/Document.hx
  47. 4 4
      std/js/html/DocumentFragment.hx
  48. 3 166
      std/js/html/Element.hx
  49. 1 1
      std/js/html/EmbedElement.hx
  50. 1 1
      std/js/html/FieldSetElement.hx
  51. 1 1
      std/js/html/FontElement.hx
  52. 1 1
      std/js/html/FormElement.hx
  53. 1 1
      std/js/html/FrameElement.hx
  54. 1 1
      std/js/html/FrameSetElement.hx
  55. 1 1
      std/js/html/HRElement.hx
  56. 3 3
      std/js/html/HTMLCollection.hx
  57. 2 2
      std/js/html/HTMLDocument.hx
  58. 0 61
      std/js/html/HTMLElement.hx
  59. 1 1
      std/js/html/HTMLOptionsCollection.hx
  60. 1 1
      std/js/html/HeadElement.hx
  61. 1 1
      std/js/html/HeadingElement.hx
  62. 1 1
      std/js/html/HitRegionOptions.hx
  63. 1 1
      std/js/html/HtmlElement.hx
  64. 1 1
      std/js/html/IFrameElement.hx
  65. 1 1
      std/js/html/ImageElement.hx
  66. 2 2
      std/js/html/InputElement.hx
  67. 1 1
      std/js/html/LIElement.hx
  68. 2 2
      std/js/html/LabelElement.hx
  69. 1 1
      std/js/html/LegendElement.hx
  70. 1 1
      std/js/html/LinkElement.hx
  71. 1 1
      std/js/html/MapElement.hx
  72. 1 1
      std/js/html/MediaElement.hx
  73. 1 1
      std/js/html/MenuElement.hx
  74. 1 1
      std/js/html/MenuItemElement.hx
  75. 1 1
      std/js/html/MetaElement.hx
  76. 1 1
      std/js/html/MeterElement.hx
  77. 1 1
      std/js/html/ModElement.hx
  78. 1 1
      std/js/html/Node.hx
  79. 1 1
      std/js/html/OListElement.hx
  80. 1 1
      std/js/html/ObjectElement.hx
  81. 1 1
      std/js/html/OptGroupElement.hx
  82. 1 1
      std/js/html/OptionElement.hx
  83. 1 1
      std/js/html/OutputElement.hx
  84. 1 1
      std/js/html/ParagraphElement.hx
  85. 1 1
      std/js/html/ParamElement.hx
  86. 1 1
      std/js/html/PictureElement.hx
  87. 1 1
      std/js/html/PreElement.hx
  88. 1 1
      std/js/html/ProgressElement.hx
  89. 1 1
      std/js/html/QuoteElement.hx
  90. 1 1
      std/js/html/ScriptElement.hx
  91. 3 3
      std/js/html/SelectElement.hx
  92. 1 1
      std/js/html/ShadowElement.hx
  93. 1 1
      std/js/html/ShadowRoot.hx
  94. 1 1
      std/js/html/SourceElement.hx
  95. 1 1
      std/js/html/SpanElement.hx
  96. 1 1
      std/js/html/StyleElement.hx
  97. 1 1
      std/js/html/TableCaptionElement.hx
  98. 1 1
      std/js/html/TableCellElement.hx
  99. 1 1
      std/js/html/TableColElement.hx
  100. 6 6
      std/js/html/TableElement.hx

+ 2 - 2
.travis.yml

@@ -31,13 +31,13 @@ before_script:
 
 install:
   - if [ -z "${TRAVIS_OS_NAME}" ]; then export TRAVIS_OS_NAME=linux; fi; # for our forks that do not have mult-os enabled.
-  - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then travis_retry sudo apt-get update -qq; travis_retry sudo apt-get install ocaml zlib1g-dev libgc-dev -qq; fi
+  - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then travis_retry sudo apt-get update -qq; travis_retry sudo apt-get install ocaml-native-compilers zlib1g-dev libgc-dev -qq; fi
   - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then travis_retry brew update; travis_retry brew install caskroom/cask/brew-cask; travis_retry brew install ocaml camlp4; fi
   - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then travis_retry git clone https://github.com/HaxeFoundation/neko.git ~/neko && cd ~/neko && make os=${TRAVIS_OS_NAME} -s && sudo make install -s && cd $TRAVIS_BUILD_DIR; fi
   - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then travis_retry brew install neko --HEAD; fi
 
 script:
-  - make -s
+  - make OCAMLOPT=ocamlopt.opt -s
   - make tools -s
   - sudo make install -s
   - cd tests/

+ 3 - 3
appveyor.yml

@@ -35,7 +35,7 @@ install:
     - '%CYG_ROOT%/bin/bash -lc "godi_add godi-zip"'
     - 'set PATH=%PATH%;%CYG_ROOT%/opt/wodi%WODI_ARCH%/bin'
     # Install neko
-    - cinst make
+    - cinst make -y
     - 'git clone --recursive https://github.com/HaxeFoundation/neko.git %NEKO_ROOT%'
     - 'cd %NEKO_ROOT%'
     - set PATH=%PATH%;%NEKO_ROOT%/bin
@@ -50,8 +50,8 @@ install:
 build_script:
     - 'cd %APPVEYOR_BUILD_FOLDER%'
     - 'set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%'
-    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -f Makefile.win WODI=wodi%WODI_ARCH%"'
-    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -f Makefile.win WODI=wodi%WODI_ARCH% tools"'
+    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -f Makefile.win WODI=wodi%WODI_ARCH% OCAMLOPT=ocamlopt.opt"'
+    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -f Makefile.win WODI=wodi%WODI_ARCH% OCAMLOPT=ocamlopt.opt tools"'
     - cd %APPVEYOR_BUILD_FOLDER%/tests/
     - mkdir "%HAXELIB_ROOT%"
     - haxelib setup "%HAXELIB_ROOT%"

+ 2 - 2
common.ml

@@ -565,7 +565,7 @@ let get_config com =
 			pf_overload = false;
 			pf_pattern_matching = false;
 			pf_can_skip_non_nullable_argument = true;
-			pf_reserved_type_paths = [([],"Object")];
+			pf_reserved_type_paths = [([],"Object");([],"Error")];
 		}
 	| Neko ->
 		{
@@ -610,7 +610,7 @@ let get_config com =
 			pf_overload = false;
 			pf_pattern_matching = false;
 			pf_can_skip_non_nullable_argument = false;
-			pf_reserved_type_paths = [([],"Object")];
+			pf_reserved_type_paths = [([],"Object");([],"Error")];
 		}
 	| Php ->
 		{

+ 1 - 0
extra/CHANGES.txt

@@ -14,6 +14,7 @@
 	python : added python target
 	flash : flash player 12-14 support
 	js : added @:jsRequire and js.Lib.require
+	js : support haxe.CallStack.exceptionStack
 	cs : added @:bridgeProperties
 	cs : added -D erase_generics
 	cs : added -D dll_import to import haxe-generated dlls

+ 1 - 1
extra/haxelib_src

@@ -1 +1 @@
-Subproject commit 333d439cba419746655b169e62f22df4d1c4cf0a
+Subproject commit 0dfb33242a28d5a89178c1e48968174646e0fefe

+ 35 - 6
filters.ml

@@ -139,6 +139,28 @@ let rec add_final_return e =
 			{ e with eexpr = TFunction f }
 		| _ -> e
 
+let rec wrap_js_exceptions com e =
+	let terr = List.find (fun mt -> match mt with TClassDecl {cl_path = ["js";"_Boot"],"HaxeError"} -> true | _ -> false) com.types in
+	let cerr = match terr with TClassDecl c -> c | _ -> assert false in
+
+	let rec is_error t =
+		match follow t with
+		| TInst ({cl_path = (["js"],"Error")},_) -> true
+		| TInst ({cl_super = Some (csup,tl)}, _) -> is_error (TInst (csup,tl))
+		| _ -> false
+	in
+
+	let rec loop e =
+		match e.eexpr with
+		| TThrow eerr when not (is_error eerr.etype) ->
+			let ewrap = { eerr with eexpr = TNew (cerr,[],[eerr]) } in
+			{ e with eexpr = TThrow ewrap }
+		| _ ->
+			Type.map_expr loop e
+	in
+
+	loop e
+
 (* -------------------------------------------------------------------------- *)
 (* CHECK LOCAL VARS INIT *)
 
@@ -705,13 +727,13 @@ let save_class_state ctx t = match t with
 	| TClassDecl c ->
 		let mk_field_restore f =
 			let rec mk_overload_restore f =
-				f.cf_kind,f.cf_expr,f.cf_type,f.cf_meta,f.cf_params
+				f.cf_name,f.cf_kind,f.cf_expr,f.cf_type,f.cf_meta,f.cf_params
 			in
 			( f,mk_overload_restore f, List.map (fun f -> f,mk_overload_restore f) f.cf_overloads )
 		in
 		let restore_field (f,res,overloads) =
-			let restore_field (f,(kind,expr,t,meta,params)) =
-				f.cf_kind <- kind; f.cf_expr <- expr; f.cf_type <- t; f.cf_meta <- meta; f.cf_params <- params;
+			let restore_field (f,(name,kind,expr,t,meta,params)) =
+				f.cf_name <- name; f.cf_kind <- kind; f.cf_expr <- expr; f.cf_type <- t; f.cf_meta <- meta; f.cf_params <- params;
 				f
 			in
 			let f = restore_field (f,res) in
@@ -998,9 +1020,14 @@ let commit_features ctx t =
 	) m.m_extra.m_features
 
 let check_reserved_type_paths ctx t =
-	let m = t_infos t in
-	if List.mem m.mt_path ctx.com.config.pf_reserved_type_paths then
-		ctx.com.warning ("Type path " ^ (s_type_path m.mt_path) ^ " is reserved on this target") m.mt_pos
+	let check path pos =
+		if List.mem path ctx.com.config.pf_reserved_type_paths then
+			ctx.com.warning ("Type path " ^ (s_type_path path) ^ " is reserved on this target") pos
+	in
+	match t with
+	| TClassDecl c when not c.cl_extern -> check c.cl_path c.cl_pos
+	| TEnumDecl e when not e.e_extern -> check e.e_path e.e_pos
+	| _ -> ()
 
 (* PASS 3 end *)
 
@@ -1088,6 +1115,7 @@ let run com tctx main =
 		let filters = [
 			Optimizer.sanitize com;
 			if com.config.pf_add_final_return then add_final_return else (fun e -> e);
+			if com.platform = Js then wrap_js_exceptions com else (fun e -> e);
 			rename_local_vars tctx;
 		] in
 		List.iter (run_expression_filters tctx filters) new_types;
@@ -1113,6 +1141,7 @@ let run com tctx main =
 			captured_vars com;
 			promote_complex_rhs com;
 			if com.config.pf_add_final_return then add_final_return else (fun e -> e);
+			if com.platform = Js then wrap_js_exceptions com else (fun e -> e);
 			rename_local_vars tctx;
 		] in
 		List.iter (run_expression_filters tctx filters) new_types;

+ 34 - 23
gencpp.ml

@@ -367,11 +367,6 @@ let get_meta_string_path ctx meta key =
    loop meta
 ;;
 
-let has_meta_key meta key =
-   List.exists (fun m -> match m with | (k,_,_) when k=key-> true | _ -> false ) meta
-;;
-
-
 let get_field_access_meta field_access key =
 match field_access with
    | FInstance(_,_,class_field)
@@ -384,6 +379,19 @@ let get_code meta key =
    if (code<>"") then code ^ "\n" else code
 ;;
 
+let has_meta_key meta key =
+   List.exists (fun m -> match m with | (k,_,_) when k=key-> true | _ -> false ) meta
+;;
+
+let type_has_meta_key haxe_type key =
+   match follow haxe_type with
+   | TInst (klass,_) -> has_meta_key klass.cl_meta key
+   | TType (type_def,_) -> has_meta_key type_def.t_meta key
+   | TEnum (enum_def,_) -> has_meta_key enum_def.e_meta key
+   | _ -> false
+;;
+
+
 (*
 let dump_meta meta =
    List.iter (fun m -> match m with | (k,_,_) -> print_endline ((fst (MetaInfo.to_string k)) ^ "=" ^ (get_meta_string meta k) ) | _ -> () ) meta;;
@@ -489,15 +497,6 @@ let rec remove_parens_cast expression =
    | _ -> expression
 ;;
 *)
-
-let cant_be_null type_string =
-   is_numeric type_string
-;;
-
-let is_object type_string =
-   not (is_numeric type_string || type_string="::String");
-;;
-
 let is_interface_type t =
    match follow t with
    | TInst (klass,params) -> klass.cl_interface
@@ -609,6 +608,7 @@ let rec class_string klass suffix params remap =
             | TInst ({ cl_path = [],"Int" },_)
             | TInst ({ cl_path = [],"Float" },_)
             | TEnum ({ e_path = [],"Bool" },_) -> "Dynamic"
+            | t when type_has_meta_key t Meta.NotNull -> "Dynamic"
             | _ -> "/*NULL*/" ^ (type_string t) )
          | _ -> assert false);
    (* Normal class *)
@@ -640,6 +640,7 @@ and type_string_suff suffix haxe_type remap =
             | TInst ({ cl_path = [],"Int" },_)
             | TInst ({ cl_path = [],"Float" },_)
             | TEnum ({ e_path = [],"Bool" },_) -> "Dynamic" ^ suffix
+            | t when type_has_meta_key t Meta.NotNull -> "Dynamic" ^ suffix
             | _ -> type_string_suff suffix t remap)
          | _ -> assert false);
       | [] , "Array" ->
@@ -692,7 +693,7 @@ and type_string haxe_type =
 
 and array_element_type haxe_type =
    match type_string haxe_type with
-   | x when cant_be_null x -> x
+   | x when cant_be_null haxe_type -> x
    | x when is_interface_type (follow haxe_type) -> x
    | "::String" -> "::String"
    | _ -> "::Dynamic"
@@ -725,15 +726,20 @@ and cpp_function_signature_params params = match params with
 
 and gen_interface_arg_type_name name opt typ =
    let type_str = (type_string typ) in
-   (if (opt && (cant_be_null type_str) ) then
+   (if (opt && (cant_be_null typ) ) then
       "hx::Null< " ^ type_str ^ " > "
    else
       type_str )
    ^ " " ^ (keyword_remap name)
 and gen_tfun_interface_arg_list args =
    String.concat "," (List.map (fun (name,opt,typ) -> gen_interface_arg_type_name name opt typ) args)
+and cant_be_null haxe_type =
+   is_numeric (type_string haxe_type) || (type_has_meta_key haxe_type Meta.NotNull )
 ;;
 
+let is_object type_string =
+   not (is_numeric type_string || type_string="::String");
+;;
 
 
 
@@ -867,7 +873,7 @@ let gen_arg_type_name name default_val arg_type prefix =
    let type_str = (type_string arg_type) in
    match default_val with
    | Some TNull  -> (type_str,remap_name)
-   | Some constant when (cant_be_null type_str) -> ("hx::Null< " ^ type_str ^ " > ",prefix ^ remap_name)
+   | Some constant when (cant_be_null arg_type) -> ("hx::Null< " ^ type_str ^ " > ",prefix ^ remap_name)
    | Some constant  -> (type_str,prefix ^ remap_name)
    | _ -> (type_str,remap_name);;
 
@@ -1830,7 +1836,7 @@ and gen_expression ctx retval expression =
       | TInst (klass,[element]) ->
          ( match type_string element with
          | _ when is_struct_access element -> ()
-         | x when cant_be_null x -> ()
+         | x when cant_be_null element -> ()
          | _ when is_interface_type element -> ()
          | "::String" | "Dynamic" -> ()
          | real_type -> gen_array_cast cast_name real_type call
@@ -2411,9 +2417,14 @@ and gen_expression ctx retval expression =
       gen_expression ctx retval cast;
    | TCast (cast,None) ->
       let ret_type = type_string expression.etype in
-      output ("((" ^ ret_type ^ ")(");
-      gen_expression ctx true cast;
-      output "))";
+      let from_type = if is_dynamic_in_cpp ctx cast then "Dynamic" else type_string cast.etype in
+      if (from_type = ret_type) then begin
+         gen_expression ctx true cast
+      end else begin
+         output ("((" ^ ret_type ^ ")(");
+         gen_expression ctx true cast;
+         output "))";
+      end;
    | TCast (e1,Some t) ->
       let class_name = (join_class_path_remap (t_path t) "::" ) in
       if (class_name="Array") then
@@ -5559,13 +5570,13 @@ let generate_source common_ctx =
                | ([],"Array"), [t] -> "Array<" ^ (stype t) ^ ">"
                | (["haxe";"io"],"Unsigned_char__"),_ -> "uint8"
                | ([],"EnumValue"),_ -> "Dynamic"
-               | ([],"Null"),[t] when cant_be_null (type_string t) -> "Null<" ^ (stype t) ^ ">"
+               | ([],"Null"),[t] when cant_be_null t -> "Null<" ^ (stype t) ^ ">"
                | ([],"Null"),[t] -> (stype t)
                | _ -> spath klass.cl_path
                )
             | TType (type_def,params) ->
                (match type_def.t_path, params with
-               | ([],"Null"),[t] when cant_be_null (type_string t) -> "Null<" ^ (stype t) ^ ">"
+               | ([],"Null"),[t] when cant_be_null t -> "Null<" ^ (stype t) ^ ">"
                | ([],"Array"), [t] -> "Array< " ^ (stype (follow t) ) ^ " >"
                | _,_ ->  stype (apply_params type_def.t_params params type_def.t_type)
                )

+ 11 - 0
genjs.ml

@@ -663,6 +663,17 @@ and gen_expr ctx e =
 		let bend = open_block ctx in
 		let last = ref false in
 		let else_block = ref false in
+
+		if (has_feature ctx "haxe.CallStack.exceptionStack") then begin
+			newline ctx;
+			print ctx "%s.lastException = %s" (ctx.type_accessor (TClassDecl { null_class with cl_path = ["haxe"],"CallStack" })) vname
+		end;
+
+		if (has_feature ctx "js.Boot.HaxeError") then begin
+			newline ctx;
+			print ctx "if (%s instanceof %s) %s = %s.val" vname (ctx.type_accessor (TClassDecl { null_class with cl_path = ["js";"_Boot"],"HaxeError" })) vname vname;
+		end;
+
 		List.iter (fun (v,e) ->
 			if !last then () else
 			let t = (match follow v.v_type with

+ 1 - 1
libs

@@ -1 +1 @@
-Subproject commit 371962aacc1bcd1b5578df62a1500f436d6f0c73
+Subproject commit 8bba5315cabf666f94031436653ee0c6115a1762

+ 0 - 5
main.ml

@@ -1396,16 +1396,11 @@ try
 	process_ref := process;
 	process ctx.com.args;
 	process_libs();
-	(try ignore(Common.find_file com "mt/Include.hx"); Common.raw_define com "mt"; with Not_found -> ());
 	if com.display <> DMNone then begin
 		com.warning <- message ctx;
 		com.error <- error ctx;
 		com.main_class <- None;
 		let real = get_real_path (!Parser.resume_display).Ast.pfile in
-		(* try to fix issue on windows when get_real_path fails (8.3 DOS names disabled) *)
-		let real = (match List.rev (ExtString.String.nsplit real path_sep) with
-		| file :: path when String.length file > 0 && file.[0] >= 'a' && file.[1] <= 'z' -> file.[0] <- char_of_int (int_of_char file.[0] - int_of_char 'a' + int_of_char 'A'); String.concat path_sep (List.rev (file :: path))
-		| _ -> real) in
 		classes := lookup_classes com real;
 		if !classes = [] then begin
 			if not (Sys.file_exists real) then failwith "Display file does not exist";

+ 356 - 0
std/cpp/_std/haxe/Int64.hx

@@ -0,0 +1,356 @@
+/*
+ * Copyright (C)2005-2012 Haxe Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+package haxe;
+
+
+
+@:notNull
+
+@:native("cpp::Int64Struct")
+private extern class ___Int64 { public function get():cpp.Int64; }
+
+private typedef __Int64 = ___Int64;
+
+@:coreApi
+abstract Int64( __Int64 ) from __Int64 to __Int64
+{
+   /**
+		Makes a copy of `this` Int64.
+	**/
+	public #if !cppua inline #end function copy():Int64 return this;
+
+
+	public static #if !cppia inline #end function make( high : Int32, low : Int32 ) : Int64 {
+      return untyped __cpp__("cpp::Int64Struct(( ( (cpp::Int64)((unsigned int){0}) ) << 32 ) | ((unsigned int){1}))",high, low);
+	}
+
+	@:from public static function ofInt( x : Int ) : Int64 {
+		return untyped __cpp__("((cpp::Int64)({0}))", x);
+	}
+
+
+	/**
+		Returns an Int with the value of the Int64 `x`.
+		Throws an exception  if `x` cannot be represented in 32 bits.
+	**/
+	public static #if !cppia inline #end function toInt( x : Int64 ) : Int {
+		if( x.high != x.low >> 31 )
+			throw "Overflow";
+
+		return x.low;
+	}
+
+	/**
+		Returns whether the value `val` is of type `haxe.Int64`
+	**/
+	public static #if !cppia inline #end function is( val : Dynamic ) : Bool
+      return untyped __cpp__("(cpp::Int64Struct::is({0}))",val);
+
+	/**
+		Returns the high 32-bit word of `x`.
+	**/
+	@:deprecated("Use high instead")
+	public static #if !cppia inline #end function getHigh( x : Int64 ) : Int32
+		return x.high;
+
+	/**
+		Returns the low 32-bit word of `x`.
+	**/
+	@:deprecated("Use low instead")
+	public static #if !cppia inline #end function getLow( x : Int64 ) : Int32
+		return x.low;
+
+	/**
+		Returns `true` if `x` is less than zero.
+	**/
+	public static #if !cppia inline #end function isNeg( x : Int64) : Bool
+		return untyped __cpp__("(({0}.get()) < 0)", x);
+
+	/**
+		Returns `true` if `x` is exactly zero.
+	**/
+	public static #if !cppia inline #end function isZero( x : Int64 ) : Bool
+		return untyped __cpp__("(({0}.get()) == 0)", x);
+
+	/**
+		Compares `a` and `b` in signed mode.
+		Returns a negative value if `a < b`, positive if `a > b`,
+		or 0 if `a == b`.
+	**/
+	public static #if !cppia inline #end function compare( a : Int64, b : Int64 ) : Int {
+		return untyped __cpp__("( ({0}.get()) < ({1}.get()) ? -1 : ({0})==({1}) ? 0 : 1)", a, b, a, b);
+	}
+
+	/**
+		Compares `a` and `b` in unsigned mode.
+		Returns a negative value if `a < b`, positive if `a > b`,
+		or 0 if `a == b`.
+	**/
+	public static #if !cppia inline #end function ucompare( a : Int64, b : Int64 ) : Int {
+		return untyped __cpp__("( (cpp::UInt64)({0}.get()) < (cpp::UInt64)({1}.get()) ? -1 : ({0}.get())==({1}.get()) ? 0 : 1)", a, b, a, b);
+	}
+
+	/**
+		Returns a signed decimal `String` representation of `x`.
+	**/
+	public static #if !cppia inline #end function toStr(x:Int64) : String
+		return x.toString();
+
+	private function toString() : String
+	{
+		return untyped __cpp__("String( ({0}).get() )", this);
+	}
+
+	/**
+		Performs signed integer divison of `dividend` by `divisor`.
+		Returns `{ quotient : Int64, modulus : Int64 }`.
+	**/
+	public static function divMod( dividend : Int64, divisor : Int64 ) : { quotient : Int64, modulus : Int64 }
+	{
+      var q = dividend/divisor;
+
+      if (isZero(divisor))
+	       throw "divide by zero";
+
+      var m = dividend - q*divisor;
+
+      return { quotient : q, modulus : m };
+	}
+
+	/**
+		Returns the negative of `x`.
+	**/
+	@:op(-A) public static #if !cppia inline #end function neg( x : Int64 ) : Int64 {
+		return untyped __cpp__("(-({0}.get()))",x);
+	}
+
+	@:op(++A) private inline  function preIncrement() : Int64 {
+      #if cppia
+      this = this + make(0,1);
+      return this;
+      #else
+		return untyped __cpp__("(++({0}.get()))",this);
+      #end
+	}
+
+	@:op(A++) private inline function postIncrement() : Int64 {
+      #if cppia
+      var result = this;
+      this = this + make(0,1);
+      return result;
+      #else
+		return untyped __cpp__("(({0}.get())++)",this);
+      #end
+	}
+
+	@:op(--A) private inline function preDecrement() : Int64 {
+      #if cppia
+      untyped this = this - make(0,1);
+      return this;
+      #else
+		return untyped __cpp__("(--({0}.get()))",this);
+      #end
+	}
+
+	@:op(A--) private inline function postDecrement() : Int64 {
+      #if cppia
+      var result = this;
+      this = this - make(0,1);
+      return result;
+      #else
+		return untyped __cpp__("(({0}.get())--)",this);
+      #end
+	}
+
+	/**
+		Returns the sum of `a` and `b`.
+	**/
+	@:op(A + B) public static #if !cppia inline #end function add( a : Int64, b : Int64 ) : Int64 {
+		return untyped __cpp__("(({0}.get()) + ({1}.get()))", a, b);
+	}
+
+	@:op(A + B) @:commutative private static #if !cppia inline #end function addInt( a : Int64, b : Int ) : Int64
+		return add( a, b );
+
+	/**
+		Returns `a` minus `b`.
+	**/
+	@:op(A - B) public static #if !cppia inline #end function sub( a : Int64, b : Int64 ) : Int64 {
+		return untyped __cpp__("(({0}.get()) - ({1}.get()))", a, b);
+	}
+
+	@:op(A - B) private static #if !cppia inline #end function subInt( a : Int64, b : Int ) : Int64
+		return sub( a, b );
+
+	@:op(A - B) private static #if !cppia inline #end function intSub( a : Int, b : Int64 ) : Int64
+		return sub( a, b );
+
+	/**
+		Returns the product of `a` and `b`.
+	**/
+	@:op(A * B) public static #if !cppia inline #end function mul( a : Int64, b : Int64 ) : Int64 {
+		return untyped __cpp__("(({0}.get()) * ({1}.get()))", a, b);
+	}
+
+	@:op(A * B) @:commutative private static #if !cppia inline #end function mulInt( a : Int64, b : Int ) : Int64
+		return mul( a, b );
+
+	/**
+		Returns the quotient of `a` divided by `b`.
+	**/
+	@:op(A / B) public static function div( a : Int64, b : Int64 ) : Int64 {
+		if (untyped __cpp__("(({0}.get()) == 0)",b) )
+			throw "divide by zero";
+		return untyped __cpp__("(({0}.get()) / ({1}.get()))", a, b);
+	}
+
+
+	@:op(A / B) private static #if !cppia inline #end function divInt( a : Int64, b : Int ) : Int64
+		return div( a, b );
+
+	@:op(A / B) private static #if !cppia inline #end function intDiv( a : Int, b : Int64 ) : Int64
+		return toInt(div( a, b ));
+
+	/**
+		Returns the modulus of `a` divided by `b`.
+	**/
+	@:op(A % B) public static #if !cppia inline #end function mod( a : Int64, b : Int64 ) : Int64
+   {
+		if (untyped __cpp__("(({0}.get()) == 0)",b) )
+			throw "divide by zero";
+		return untyped __cpp__("(({0}.get()) % ({1}.get()))", a, b);
+   }
+
+	@:op(A % B) private static #if !cppia inline #end function modInt( a : Int64, b : Int ) : Int64
+		return toInt(mod( a, b ));
+
+	@:op(A % B) private static #if !cppia inline #end function intMod( a : Int, b : Int64 ) : Int64
+		return toInt(mod( a, b ));
+
+	/**
+		Returns `true` if `a` is equal to `b`.
+	**/
+	@:op(A == B) public static #if !cppia inline #end function eq( a : Int64, b : Int64 ) : Bool
+		return untyped __cpp__("(({0}.get()) == ({1}.get()))", a, b);
+
+	@:op(A == B) @:commutative private static #if !cppia inline #end function eqInt( a : Int64, b : Int ) : Bool
+		return eq( a, b );
+
+	/**
+		Returns `true` if `a` is not equal to `b`.
+	**/
+	@:op(A != B) public static #if !cppia inline #end function neq( a : Int64, b : Int64 ) : Bool
+		return untyped __cpp__("(({0}.get()) != ({1}.get()))", a, b);
+
+	@:op(A != B) @:commutative private static #if !cppia inline #end function neqInt( a : Int64, b : Int ) : Bool
+		return neq(a, b);
+
+	@:op(A < B) private static #if !cppia inline #end function lt( a : Int64, b : Int64 ) : Bool
+		return compare(a, b) < 0;
+
+	@:op(A < B) private static #if !cppia inline #end function ltInt( a : Int64, b : Int ) : Bool
+		return lt(a, b);
+
+	@:op(A < B) private static #if !cppia inline #end function intLt( a : Int, b : Int64 ) : Bool
+		return lt(a, b);
+
+	@:op(A <= B) private static #if !cppia inline #end function lte( a : Int64, b : Int64 ) : Bool
+		return compare(a, b) <= 0;
+
+	@:op(A <= B) private static #if !cppia inline #end function lteInt( a : Int64, b : Int ) : Bool
+		return lte(a, b);
+
+	@:op(A <= B) private static #if !cppia inline #end function intLte( a : Int, b : Int64 ) : Bool
+		return lte(a, b);
+
+	@:op(A > B) private static #if !cppia inline #end function gt( a : Int64, b : Int64 ) : Bool
+		return compare(a, b) > 0;
+
+	@:op(A > B) private static #if !cppia inline #end function gtInt( a : Int64, b : Int ) : Bool
+		return gt(a, b);
+
+	@:op(A > B) private static #if !cppia inline #end function intGt( a : Int, b : Int64 ) : Bool
+		return gt( a, b );
+
+	@:op(A >= B) private static #if !cppia inline #end function gte( a : Int64, b : Int64 ) : Bool
+		return compare(a, b) >= 0;
+
+	@:op(A >= B) private static #if !cppia inline #end function gteInt( a : Int64, b : Int ) : Bool
+		return gte(a, b);
+
+	@:op(A >= B) private static #if !cppia inline #end function intGte( a : Int, b : Int64 ) : Bool
+		return gte(a, b);
+
+	/**
+		Returns the bitwise NOT of `a`.
+	**/
+	@:op(~A) private static #if !cppia inline #end function complement( a : Int64 ) : Int64
+		return untyped __cpp__("(~({0}.get()))", a);
+
+	/**
+		Returns the bitwise AND of `a` and `b`.
+	**/
+	@:op(A & B) public static #if !cppia inline #end function and( a : Int64, b : Int64 ) : Int64
+		return untyped __cpp__("(({0}) & ({1}))", a, b);
+
+	/**
+		Returns the bitwise OR of `a` and `b`.
+	**/
+	@:op(A | B) public static #if !cppia inline #end function or( a : Int64, b : Int64 ) : Int64
+		return untyped __cpp__("(({0}) | ({1}))", a, b);
+
+	/**
+		Returns the bitwise XOR of `a` and `b`.
+	**/
+	@:op(A ^ B) public static #if !cppia inline #end function xor( a : Int64, b : Int64 ) : Int64
+		return untyped __cpp__("(({0}) ^ ({1}))", a, b);
+
+	/**
+		Returns `a` left-shifted by `b` bits.
+	**/
+	@:op(A << B) public static #if !cppia inline #end function shl( a : Int64, b : Int ) : Int64
+		return untyped __cpp__("(({0}) << ({1}))", a, (b&63));
+
+	/**
+		Returns `a` right-shifted by `b` bits in signed mode.
+		`a` is sign-extended.
+	**/
+	@:op(A >> B) public static #if !cppia inline #end function shr( a : Int64, b : Int) : Int64
+		return untyped __cpp__("(({0}) >> ({1}))", a, (b&63));
+
+	/**
+		Returns `a` right-shifted by `b` bits in unsigned mode.
+		`a` is padded with zeroes.
+	**/
+	@:op(A >>> B) public static #if !cppia inline #end function ushr( a : Int64, b : Int ) : Int64
+		return untyped __cpp__("(((cpp::UInt64)({0})) >> ({1}))", a, (b&63));
+
+	public var high(get, never) : Int32;
+	private #if !cppia inline #end function get_high() : Int32
+		return  untyped __cpp__("(int)(((cpp::Int64)({0}))>>32)",this);
+
+	public var low(get, never) : Int32;
+	private #if !cppia inline #end function get_low() : Int32
+		return untyped __cpp__("(int)(({0})&0xffffffff)", this);
+
+}
+

+ 0 - 139
std/cpp/_std/haxe/Int64.hx2

@@ -1,139 +0,0 @@
-/*
- * Copyright (C)2005-2012 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-package haxe;
-
-
-
-@:native("cpp::Struct< cpp::Int64 >")
-extern class Int64Struct { }
-
-abstract Int64( Int64Struct )
-{
-   public function toString() : String {
-		return untyped __cpp__("String( (cpp::Int64)({0}) )", this);
-  }
-
-	public static inline function make( high : Int, low : Int ) : Int64 {
-      return untyped __cpp__("cpp::Struct< cpp::Int64 >(( ( (cpp::Int64)((unsigned int){0}) ) << 32 ) | ((unsigned int){1}))",high, low);
-	}
-
-	public static inline function ofInt( x : Int ) : Int64 {
-		return untyped __cpp__("((cpp::Int64)({0}))", x);
-	}
-
-	public static function toInt( x : Int64 ) : Int {
-		var high = getHigh(x);
-		if( high != 0 ) {
-			if( high < 0 )
-				return -toInt(neg(x));
-			throw "Overflow";
-		}
-		return getLow(x);
-	}
-
-	public static inline function neg( a : Int64 ) : Int64 {
-		return untyped __cpp__("(-({0}))",a);
-	}
-
-
-	public static inline function getLow( x : Int64 ) : Int {
-		return untyped __cpp__("(int)(({0})&0xffffffff)",x);
-	}
-
-	public static function getHigh( x : Int64 ) : Int {
-		return  untyped __cpp__("((cpp::Int64)({0}))>>32",x);
-	}
-
-	public static inline function add( a : Int64, b : Int64 ) : Int64 {
-		return untyped __cpp__("(({0}) + ({1}))", a, b);
-	}
-
-	public static function sub( a : Int64, b : Int64 ) : Int64 {
-		return untyped __cpp__("(({0}) - ({1}))", a, b);
-	}
-
-	public static function mul( a : Int64, b : Int64 ) : Int64 {
-		return untyped __cpp__("(({0}) * ({1}))", a, b);
-	}
-
-	public static function div( a : Int64, b : Int64 ) : Int64 {
-		if (untyped __cpp__("(({0}) == 0)",b) )
-			throw "divide by zero";
-		return untyped __cpp__("(({0}) / ({1}))", a, b);
-	}
-
-	public static function mod( a : Int64, b : Int64 ) : Int64 {
-		if (untyped __cpp__("(({0}) == 0)",b) )
-			throw "divide by zero";
-		return untyped __cpp__("(({0}) % ({1}))", a, b);
-	}
-
-	public static inline function shl( a : Int64, b : Int ) : Int64 {
-		return untyped __cpp__("(({0}) << ({1}))", a, b);
-	}
-
-	public static inline function shr( a : Int64, b : Int ) : Int64 {
-		return untyped __cpp__("(({0}) << ({1}))", a, b);
-	}
-
-	public static inline function ushr( a : Int64, b : Int ) : Int64 {
-		return untyped __cpp__("(((cpp::UInt64)({0})) >> ({1}))", a, b);
-	}
-
-	public static inline function and( a : Int64, b : Int64 ) : Int64 {
-		return untyped __cpp__("(({0}) & ({1}))", a, b);
-	}
-
-	public static inline function or( a : Int64, b : Int64 ) : Int64 {
-		return untyped __cpp__("(({0}) | ({1}))", a, b);
-	}
-
-	public static inline function xor( a : Int64, b : Int64 ) : Int64 {
-		return untyped __cpp__("(({0}) ^ ({1}))", a, b);
-	}
-
-
-	public static inline function isNeg( a : Int64 ) : Bool {
-		return untyped __cpp__("(({0}) < 0)", a);
-	}
-
-	public static inline function isZero( a : Int64 ) : Bool {
-		return untyped __cpp__("(({0}) == 0)", a);
-	}
-
-	public static function compare( a : Int64, b : Int64 ) : Int {
-		return untyped __cpp__("( ({0}) < ({1}) ? -1 : ({0})==({1}) ? 0 : 1)", a, b, a, b);
-	}
-
-	/**
-		Compare two Int64 in unsigned mode.
-	**/
-	public static function ucompare( a : Int64, b : Int64 ) : Int {
-		return untyped __cpp__("( (cpp::UInt64)({0}) < (cpp::UInt64)({1}) ? -1 : ({0})==({1}) ? 0 : 1)", a, b, a, b);
-	}
-
-	public static function toStr( a : Int64 ) : String {
-		return untyped __cpp__("String( (cpp::Int64)({0}) )", a);
-	}
-
-}
-

+ 31 - 85
std/cs/_std/Std.hx

@@ -134,103 +134,49 @@ import cs.internal.Exceptions;
 	public static function parseFloat( x : String ) : Float {
 		if (x == null) return Math.NaN;
 		x = StringTools.ltrim(x);
-
-		var ret = 0.0;
-		var div = 0.0;
-		var e = 0.0;
-
-		var len = x.length;
-		var foundAny = false;
-		var isNeg = false;
+		var found = false, isHex = false, hasDot = false, hasE = false, hasNeg = false, hasENeg = false;
 		var i = -1;
-		while (++i < len)
-		{
-			var c = cast(untyped x[i], Int); //fastCodeAt
-			if (!foundAny)
-			{
-				switch(c)
-				{
-					case '-'.code:
-						isNeg = true;
-						continue;
-					case ' '.code, '\t'.code, '\n'.code, '\r'.code, '+'.code:
-						if (isNeg)
-							return Math.NaN;
-						continue;
-				}
-			}
+		inline function getch(i:Int):Int return cast ((untyped x : cs.system.String)[i]);
 
-			if (c == '.'.code)
-			{
-				if (div != 0.0)
-					break;
-				div = 1.0;
-				foundAny = true;
-
-				continue;
-			}
-
-			if (c >= '0'.code && c <= '9'.code)
+		while (++i < x.length)
+		{
+			var chr = getch(i);
+			if (chr >= '0'.code && chr <= '9'.code)
 			{
-				if (!foundAny && c == '0'.code)
+				if ( !found && chr == '0'.code && (i+1) < x.length )
 				{
-					foundAny = true;
-					continue;
-				}
-
-				ret *= 10; foundAny = true; div *= 10;
-
-				ret += c - '0'.code;
-			} else if (foundAny && (c == 'e'.code || c == 'E'.code)) {
-				var eNeg = false;
-				var eFoundAny = false;
-				if (i + 1 < len)
-				{
-					var next = untyped cast(x[i + 1], Int);
-					if (next == '-'.code)
+					var next = getch(i+1);
+					if (next == 'x'.code || next == 'X'.code)
 					{
-						eNeg = true;
-						i++;
-					} else if (next == '+'.code) {
+						isHex = true;
 						i++;
 					}
 				}
-
-				while (++i < len)
-				{
-					c = untyped cast(x[i], Int);
-					if (c >= '0'.code && c <= '9'.code)
-					{
-						if (!eFoundAny && c == '0'.code)
-							continue;
-						eFoundAny = true;
-						e *= 10;
-						e += c - '0'.code;
-					} else {
-						break;
-					}
-				}
-
-				if (eNeg) e = -e;
-			} else {
-				break;
+				found = true;
+			} else switch (chr) {
+				case 'a'.code | 'b'.code | 'c'.code | 'd'.code | 'e'.code | 'f'.code
+				   | 'A'.code | 'B'.code | 'C'.code | 'D'.code | 'E'.code | 'F'.code if (isHex):
+					//do nothing - it's alright
+				case 'e'.code | 'E'.code if(!hasE):
+					hasE = true;
+				case '.'.code if (!hasDot):
+					hasDot = true;
+				case '-'.code if (!found && !hasNeg):
+					hasNeg = true;
+				case '-'.code if (found && !hasENeg && hasE):
+					hasENeg = true;
+				case _:
+					break;
 			}
 		}
-
-		if (div == 0.0) div = 1.0;
-
-		if (foundAny)
+		if (i != x.length)
 		{
-			ret = isNeg ? -(ret / div) : (ret / div);
-			if (e != 0.0)
-			{
-				return ret * Math.pow(10.0, e);
-			} else {
-				return ret;
-			}
-		} else {
-			return Math.NaN;
+			x = x.substr(0,i);
 		}
+		return try
+			cs.system.Double.Parse(x, (null : cs.system.IFormatProvider))
+		catch(e:Dynamic)
+			Math.NaN;
 	}
 
 	@:extern inline public static function instance<T:{},S:T>( value : T, c : Class<S> ) : S {

+ 0 - 1
std/flash/Boot.hx

@@ -51,7 +51,6 @@ class Boot extends flash.display.MovieClip {
 	public static var skip_constructor = false;
 
 	function start() {
-		#if (mt && !doc_gen) mt.flash.Init.check(); #end
 		#if dontWaitStage
 			init();
 		#else

+ 43 - 25
std/haxe/CallStack.hx

@@ -36,6 +36,39 @@ enum StackItem {
 	Get informations about the call stack.
 **/
 class CallStack {
+	#if js
+	static var lastException:js.Error;
+
+	static function getStack(e:js.Error):Array<StackItem> {
+		// https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
+		var oldValue = (untyped Error).prepareStackTrace;
+		(untyped Error).prepareStackTrace = function (error, callsites :Array<Dynamic>) {
+			var stack = [];
+			for (site in callsites) {
+				if (wrapCallSite != null) site = wrapCallSite(site);
+				var method = null;
+				var fullName :String = site.getFunctionName();
+				if (fullName != null) {
+					var idx = fullName.lastIndexOf(".");
+					if (idx >= 0) {
+						var className = fullName.substr(0, idx);
+						var methodName = fullName.substr(idx+1);
+						method = Method(className, methodName);
+					}
+				}
+				stack.push(FilePos(method, site.getFileName(), site.getLineNumber()));
+			}
+			return stack;
+		}
+		var a = makeStack(e.stack);
+		(untyped Error).prepareStackTrace = oldValue;
+		return a;
+	}
+
+	// support for source-map-support module
+	@:noCompletion
+	public static var wrapCallSite:Dynamic->Dynamic;
+	#end
 
 	/**
 		Return the call stack elements, or an empty array if not available.
@@ -55,33 +88,14 @@ class CallStack {
 			var s:Array<String> = untyped __global__.__hxcpp_get_call_stack(true);
 			return makeStack(s);
 		#elseif js
-			// https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
-			var oldValue = (untyped Error).prepareStackTrace;
-			(untyped Error).prepareStackTrace = function (error, callsites :Array<Dynamic>) {
-				var stack = [];
-				for (site in callsites) {
-					var method = null;
-					var fullName :String = site.getFunctionName();
-					if (fullName != null) {
-						var idx = fullName.lastIndexOf(".");
-						if (idx >= 0) {
-							var className = fullName.substr(0, idx);
-							var methodName = fullName.substr(idx+1);
-							method = Method(className, methodName);
-						}
-					}
-					stack.push(FilePos(method, site.getFileName(), site.getLineNumber()));
-				}
-				return stack;
-			}
 			try {
-				throw untyped __new__("Error");
+				throw new js.Error();
 			} catch( e : Dynamic ) {
-				var a = makeStack(e.stack);
-				if( a != null ) a.shift(); // remove Stack.callStack()
-				(untyped Error).prepareStackTrace = oldValue;
+				var a = getStack(e);
+				a.shift(); // remove Stack.callStack()
 				return a;
 			}
+
 		#elseif java
 			var stack = [];
 			for ( el in java.lang.Thread.currentThread().getStackTrace() ) {
@@ -178,6 +192,8 @@ class CallStack {
 					stack.push(FilePos(null, elem._1, elem._2));
 			}
 			return stack;
+		#elseif js
+			return untyped __define_feature__("haxe.CallStack.exceptionStack", getStack(lastException));
 		#else
 			return []; // Unsupported
 		#end
@@ -282,7 +298,9 @@ class CallStack {
 			}
 			return m;
 		#elseif js
-			if ((untyped __js__("typeof"))(s) == "string") {
+			if (s == null) {
+				return [];
+			} else if ((untyped __js__("typeof"))(s) == "string") {
 				// Return the raw lines in browsers that don't support prepareStackTrace
 				var stack : Array<String> = s.split("\n");
 				if( stack[0] == "Error" ) stack.shift();
@@ -296,7 +314,7 @@ class CallStack {
 						var line = Std.parseInt(rie10.matched(3));
 						m.push(FilePos( meth == "Anonymous function" ? LocalFunction() : meth == "Global code" ? null : Method(path.join("."),meth), file, line ));
 					} else
-						m.push(Module(line)); // A little weird, but better than nothing
+						m.push(Module(StringTools.trim(line))); // A little weird, but better than nothing
 				}
 				return m;
 			} else {

+ 1 - 1
std/haxe/unit/TestCase.hx

@@ -24,7 +24,7 @@ import haxe.PosInfos;
 
 @:keepSub
 @:publicFields
-class TestCase #if mt_build implements mt.Protect #end {
+class TestCase {
 	public var currentTest : TestStatus;
 
 	public function new( ) {

+ 35 - 93
std/java/_std/Std.hx

@@ -91,7 +91,7 @@ import java.internal.Exceptions;
 					case \'-\':
 						isNeg = true;
 						continue;
-          case \'+\':
+					case \'+\':
 					case \'\\n\':
 					case \'\\t\':
 					case \'\\r\':
@@ -135,110 +135,52 @@ import java.internal.Exceptions;
 		return null;
 	}
 
-	@:functionCode('
-		if (x == null) return java.lang.Double.NaN;
-
-		x = x.trim();
-		double ret = 0.0;
-		double div = 0.0;
-		double e = 0.0;
+	public static function parseFloat( x : String ) : Float {
+		if (x == null) return Math.NaN;
+		x = StringTools.ltrim(x);
+		var found = false, isHex = false, hasDot = false, hasE = false, hasNeg = false, hasENeg = false;
+		var i = -1;
+		inline function getch(i:Int):Int return cast (untyped x._charAt(i) : java.StdTypes.Char16);
 
-		int len = x.length();
-		boolean foundAny = false;
-		boolean isNeg = false;
-		for (int i = 0; i < len; i++)
+		while (++i < x.length)
 		{
-			char c = x.charAt(i);
-			if (!foundAny)
+			var chr = getch(i);
+			if (chr >= '0'.code && chr <= '9'.code)
 			{
-				switch(c)
+				if ( !found && chr == '0'.code && (i+1) < x.length )
 				{
-					case \'-\':
-						isNeg = true;
-						continue;
-          case \'+\':
-					case \'\\n\':
-					case \'\\t\':
-					case \'\\r\':
-					case \' \':
-					if (isNeg) return java.lang.Double.NaN;
-						continue;
-				}
-			}
-
-			if (c == \'.\') {
-				if (div != 0.0)
-					break;
-				div = 1.0;
-				foundAny = true;
-
-				continue;
-			}
-
-			if (c >= \'0\' && c <= \'9\')
-			{
-				if (!foundAny && c == \'0\')
-				{
-					foundAny = true;
-					continue;
-				}
-				ret *= 10.0; foundAny = true; div *= 10.0;
-
-				ret += ((int) (c - \'0\'));
-			} else if (foundAny && c == \'E\' || c == \'e\') {
-				boolean eNeg = false;
-				boolean eFoundAny = false;
-
-				char next = x.charAt(i + 1);
-				if (i + 1 < len)
-				{
-					if (next == \'-\')
+					var next = getch(i+1);
+					if (next == 'x'.code || next == 'X'.code)
 					{
-						eNeg = true;
-						i++;
-					} else if (next == \'+\') {
+						isHex = true;
 						i++;
 					}
 				}
-
-				while (++i < len)
-				{
-					c = x.charAt(i);
-					if (c >= \'0\' && c <= \'9\')
-					{
-						if (!eFoundAny && c == \'0\')
-							continue;
-						eFoundAny = true;
-						e *= 10.0;
-						e += ((int) (c - \'0\'));
-					} else {
-						break;
-					}
-				}
-
-				if (eNeg) e = -e;
-			} else {
-				break;
+				found = true;
+			} else switch (chr) {
+				case 'a'.code | 'b'.code | 'c'.code | 'd'.code | 'e'.code | 'f'.code
+				   | 'A'.code | 'B'.code | 'C'.code | 'D'.code | 'E'.code | 'F'.code if (isHex):
+					//do nothing - it's alright
+				case 'e'.code | 'E'.code if(!hasE):
+					hasE = true;
+				case '.'.code if (!hasDot):
+					hasDot = true;
+				case '-'.code if (!found && !hasNeg):
+					hasNeg = true;
+				case '-'.code if (found && !hasENeg && hasE):
+					hasENeg = true;
+				case _:
+					break;
 			}
 		}
-
-		if (div == 0.0) div = 1.0;
-
-		if (foundAny)
+		if (i != x.length)
 		{
-			ret = isNeg ? -(ret / div) : (ret / div);
-			if (e != 0.0)
-			{
-				return ret * Math.pow(10.0, e);
-			} else {
-				return ret;
-			}
-		} else {
-			return java.lang.Double.NaN;
+			x = x.substr(0,i);
 		}
-	')
-	public static function parseFloat( x : String ) : Float {
-		return 0.0;
+		return try
+			java.lang.Double.DoubleClass.parseDouble(x)
+		catch(e:Dynamic)
+			Math.NaN;
 	}
 
 	inline public static function instance<T:{},S:T>( value : T, c : Class<S> ) : S {

+ 3 - 0
std/java/lang/Byte.hx

@@ -30,3 +30,6 @@ package java.lang;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String) : Byte;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String, param2 : Int) : Byte;
 }
+
+@:realPath("java.lang.Byte_ByteCache") @:javaNative @:native("java.lang.Byte$ByteCache") @:javaCanonical("java.lang","Byte.ByteCache") extern class Byte_ByteCache {
+}

+ 322 - 0
std/java/lang/Character.hx

@@ -162,6 +162,328 @@ package java.lang;
 	@:overload static function toUpperCase(param1 : java.types.Char16) : java.types.Char16;
 	@:overload static function toUpperCase(param1 : Int) : Int;
 	@:overload static function valueOf(param1 : java.types.Char16) : Character;
+}
+
+@:realPath("java.lang.Character_CharacterCache") @:javaNative @:native("java.lang.Character$CharacterCache") @:javaCanonical("java.lang","Character.CharacterCache") extern class Character_CharacterCache {
+}
 
+@:realPath("java.lang.Character_Subset") @:javaNative @:native("java.lang.Character$Subset") @:javaCanonical("java.lang","Character.Subset") extern class Character_Subset {
+	@:overload @:final function equals(param1 : Dynamic) : Bool;
+	@:overload @:final function hashCode() : Int;
+	@:overload @:final function toString() : String;
 }
 
+@:realPath("java.lang.Character_UnicodeBlock") @:final @:javaNative @:native("java.lang.Character$UnicodeBlock") @:javaCanonical("java.lang","Character.UnicodeBlock") extern class Character_UnicodeBlock extends Character_Subset {
+	@:final static var AEGEAN_NUMBERS : Character_UnicodeBlock;
+	@:final static var ALCHEMICAL_SYMBOLS : Character_UnicodeBlock;
+	@:final static var ALPHABETIC_PRESENTATION_FORMS : Character_UnicodeBlock;
+	@:final static var ANCIENT_GREEK_MUSICAL_NOTATION : Character_UnicodeBlock;
+	@:final static var ANCIENT_GREEK_NUMBERS : Character_UnicodeBlock;
+	@:final static var ANCIENT_SYMBOLS : Character_UnicodeBlock;
+	@:final static var ARABIC : Character_UnicodeBlock;
+	@:final static var ARABIC_PRESENTATION_FORMS_A : Character_UnicodeBlock;
+	@:final static var ARABIC_PRESENTATION_FORMS_B : Character_UnicodeBlock;
+	@:final static var ARABIC_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var ARMENIAN : Character_UnicodeBlock;
+	@:final static var ARROWS : Character_UnicodeBlock;
+	@:final static var AVESTAN : Character_UnicodeBlock;
+	@:final static var BALINESE : Character_UnicodeBlock;
+	@:final static var BAMUM : Character_UnicodeBlock;
+	@:final static var BAMUM_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var BASIC_LATIN : Character_UnicodeBlock;
+	@:final static var BATAK : Character_UnicodeBlock;
+	@:final static var BENGALI : Character_UnicodeBlock;
+	@:final static var BLOCK_ELEMENTS : Character_UnicodeBlock;
+	@:final static var BOPOMOFO : Character_UnicodeBlock;
+	@:final static var BOPOMOFO_EXTENDED : Character_UnicodeBlock;
+	@:final static var BOX_DRAWING : Character_UnicodeBlock;
+	@:final static var BRAHMI : Character_UnicodeBlock;
+	@:final static var BRAILLE_PATTERNS : Character_UnicodeBlock;
+	@:final static var BUGINESE : Character_UnicodeBlock;
+	@:final static var BUHID : Character_UnicodeBlock;
+	@:final static var BYZANTINE_MUSICAL_SYMBOLS : Character_UnicodeBlock;
+	@:final static var CARIAN : Character_UnicodeBlock;
+	@:final static var CHAM : Character_UnicodeBlock;
+	@:final static var CHEROKEE : Character_UnicodeBlock;
+	@:final static var CJK_COMPATIBILITY : Character_UnicodeBlock;
+	@:final static var CJK_COMPATIBILITY_FORMS : Character_UnicodeBlock;
+	@:final static var CJK_COMPATIBILITY_IDEOGRAPHS : Character_UnicodeBlock;
+	@:final static var CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var CJK_RADICALS_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var CJK_STROKES : Character_UnicodeBlock;
+	@:final static var CJK_SYMBOLS_AND_PUNCTUATION : Character_UnicodeBlock;
+	@:final static var CJK_UNIFIED_IDEOGRAPHS : Character_UnicodeBlock;
+	@:final static var CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A : Character_UnicodeBlock;
+	@:final static var CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B : Character_UnicodeBlock;
+	@:final static var CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C : Character_UnicodeBlock;
+	@:final static var CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D : Character_UnicodeBlock;
+	@:final static var COMBINING_DIACRITICAL_MARKS : Character_UnicodeBlock;
+	@:final static var COMBINING_DIACRITICAL_MARKS_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var COMBINING_HALF_MARKS : Character_UnicodeBlock;
+	@:final static var COMBINING_MARKS_FOR_SYMBOLS : Character_UnicodeBlock;
+	@:final static var COMMON_INDIC_NUMBER_FORMS : Character_UnicodeBlock;
+	@:final static var CONTROL_PICTURES : Character_UnicodeBlock;
+	@:final static var COPTIC : Character_UnicodeBlock;
+	@:final static var COUNTING_ROD_NUMERALS : Character_UnicodeBlock;
+	@:final static var CUNEIFORM : Character_UnicodeBlock;
+	@:final static var CUNEIFORM_NUMBERS_AND_PUNCTUATION : Character_UnicodeBlock;
+	@:final static var CURRENCY_SYMBOLS : Character_UnicodeBlock;
+	@:final static var CYPRIOT_SYLLABARY : Character_UnicodeBlock;
+	@:final static var CYRILLIC : Character_UnicodeBlock;
+	@:final static var CYRILLIC_EXTENDED_A : Character_UnicodeBlock;
+	@:final static var CYRILLIC_EXTENDED_B : Character_UnicodeBlock;
+	@:final static var CYRILLIC_SUPPLEMENTARY : Character_UnicodeBlock;
+	@:final static var DESERET : Character_UnicodeBlock;
+	@:final static var DEVANAGARI : Character_UnicodeBlock;
+	@:final static var DEVANAGARI_EXTENDED : Character_UnicodeBlock;
+	@:final static var DINGBATS : Character_UnicodeBlock;
+	@:final static var DOMINO_TILES : Character_UnicodeBlock;
+	@:final static var EGYPTIAN_HIEROGLYPHS : Character_UnicodeBlock;
+	@:final static var EMOTICONS : Character_UnicodeBlock;
+	@:final static var ENCLOSED_ALPHANUMERICS : Character_UnicodeBlock;
+	@:final static var ENCLOSED_ALPHANUMERIC_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var ENCLOSED_CJK_LETTERS_AND_MONTHS : Character_UnicodeBlock;
+	@:final static var ENCLOSED_IDEOGRAPHIC_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var ETHIOPIC : Character_UnicodeBlock;
+	@:final static var ETHIOPIC_EXTENDED : Character_UnicodeBlock;
+	@:final static var ETHIOPIC_EXTENDED_A : Character_UnicodeBlock;
+	@:final static var ETHIOPIC_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var GENERAL_PUNCTUATION : Character_UnicodeBlock;
+	@:final static var GEOMETRIC_SHAPES : Character_UnicodeBlock;
+	@:final static var GEORGIAN : Character_UnicodeBlock;
+	@:final static var GEORGIAN_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var GLAGOLITIC : Character_UnicodeBlock;
+	@:final static var GOTHIC : Character_UnicodeBlock;
+	@:final static var GREEK : Character_UnicodeBlock;
+	@:final static var GREEK_EXTENDED : Character_UnicodeBlock;
+	@:final static var GUJARATI : Character_UnicodeBlock;
+	@:final static var GURMUKHI : Character_UnicodeBlock;
+	@:final static var HALFWIDTH_AND_FULLWIDTH_FORMS : Character_UnicodeBlock;
+	@:final static var HANGUL_COMPATIBILITY_JAMO : Character_UnicodeBlock;
+	@:final static var HANGUL_JAMO : Character_UnicodeBlock;
+	@:final static var HANGUL_JAMO_EXTENDED_A : Character_UnicodeBlock;
+	@:final static var HANGUL_JAMO_EXTENDED_B : Character_UnicodeBlock;
+	@:final static var HANGUL_SYLLABLES : Character_UnicodeBlock;
+	@:final static var HANUNOO : Character_UnicodeBlock;
+	@:final static var HEBREW : Character_UnicodeBlock;
+	@:final static var HIGH_PRIVATE_USE_SURROGATES : Character_UnicodeBlock;
+	@:final static var HIGH_SURROGATES : Character_UnicodeBlock;
+	@:final static var HIRAGANA : Character_UnicodeBlock;
+	@:final static var IDEOGRAPHIC_DESCRIPTION_CHARACTERS : Character_UnicodeBlock;
+	@:final static var IMPERIAL_ARAMAIC : Character_UnicodeBlock;
+	@:final static var INSCRIPTIONAL_PAHLAVI : Character_UnicodeBlock;
+	@:final static var INSCRIPTIONAL_PARTHIAN : Character_UnicodeBlock;
+	@:final static var IPA_EXTENSIONS : Character_UnicodeBlock;
+	@:final static var JAVANESE : Character_UnicodeBlock;
+	@:final static var KAITHI : Character_UnicodeBlock;
+	@:final static var KANA_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var KANBUN : Character_UnicodeBlock;
+	@:final static var KANGXI_RADICALS : Character_UnicodeBlock;
+	@:final static var KANNADA : Character_UnicodeBlock;
+	@:final static var KATAKANA : Character_UnicodeBlock;
+	@:final static var KATAKANA_PHONETIC_EXTENSIONS : Character_UnicodeBlock;
+	@:final static var KAYAH_LI : Character_UnicodeBlock;
+	@:final static var KHAROSHTHI : Character_UnicodeBlock;
+	@:final static var KHMER : Character_UnicodeBlock;
+	@:final static var KHMER_SYMBOLS : Character_UnicodeBlock;
+	@:final static var LAO : Character_UnicodeBlock;
+	@:final static var LATIN_1_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var LATIN_EXTENDED_A : Character_UnicodeBlock;
+	@:final static var LATIN_EXTENDED_ADDITIONAL : Character_UnicodeBlock;
+	@:final static var LATIN_EXTENDED_B : Character_UnicodeBlock;
+	@:final static var LATIN_EXTENDED_C : Character_UnicodeBlock;
+	@:final static var LATIN_EXTENDED_D : Character_UnicodeBlock;
+	@:final static var LEPCHA : Character_UnicodeBlock;
+	@:final static var LETTERLIKE_SYMBOLS : Character_UnicodeBlock;
+	@:final static var LIMBU : Character_UnicodeBlock;
+	@:final static var LINEAR_B_IDEOGRAMS : Character_UnicodeBlock;
+	@:final static var LINEAR_B_SYLLABARY : Character_UnicodeBlock;
+	@:final static var LISU : Character_UnicodeBlock;
+	@:final static var LOW_SURROGATES : Character_UnicodeBlock;
+	@:final static var LYCIAN : Character_UnicodeBlock;
+	@:final static var LYDIAN : Character_UnicodeBlock;
+	@:final static var MAHJONG_TILES : Character_UnicodeBlock;
+	@:final static var MALAYALAM : Character_UnicodeBlock;
+	@:final static var MANDAIC : Character_UnicodeBlock;
+	@:final static var MATHEMATICAL_ALPHANUMERIC_SYMBOLS : Character_UnicodeBlock;
+	@:final static var MATHEMATICAL_OPERATORS : Character_UnicodeBlock;
+	@:final static var MEETEI_MAYEK : Character_UnicodeBlock;
+	@:final static var MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A : Character_UnicodeBlock;
+	@:final static var MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B : Character_UnicodeBlock;
+	@:final static var MISCELLANEOUS_SYMBOLS : Character_UnicodeBlock;
+	@:final static var MISCELLANEOUS_SYMBOLS_AND_ARROWS : Character_UnicodeBlock;
+	@:final static var MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS : Character_UnicodeBlock;
+	@:final static var MISCELLANEOUS_TECHNICAL : Character_UnicodeBlock;
+	@:final static var MODIFIER_TONE_LETTERS : Character_UnicodeBlock;
+	@:final static var MONGOLIAN : Character_UnicodeBlock;
+	@:final static var MUSICAL_SYMBOLS : Character_UnicodeBlock;
+	@:final static var MYANMAR : Character_UnicodeBlock;
+	@:final static var MYANMAR_EXTENDED_A : Character_UnicodeBlock;
+	@:final static var NEW_TAI_LUE : Character_UnicodeBlock;
+	@:final static var NKO : Character_UnicodeBlock;
+	@:final static var NUMBER_FORMS : Character_UnicodeBlock;
+	@:final static var OGHAM : Character_UnicodeBlock;
+	@:final static var OLD_ITALIC : Character_UnicodeBlock;
+	@:final static var OLD_PERSIAN : Character_UnicodeBlock;
+	@:final static var OLD_SOUTH_ARABIAN : Character_UnicodeBlock;
+	@:final static var OLD_TURKIC : Character_UnicodeBlock;
+	@:final static var OL_CHIKI : Character_UnicodeBlock;
+	@:final static var OPTICAL_CHARACTER_RECOGNITION : Character_UnicodeBlock;
+	@:final static var ORIYA : Character_UnicodeBlock;
+	@:final static var OSMANYA : Character_UnicodeBlock;
+	@:final static var PHAGS_PA : Character_UnicodeBlock;
+	@:final static var PHAISTOS_DISC : Character_UnicodeBlock;
+	@:final static var PHOENICIAN : Character_UnicodeBlock;
+	@:final static var PHONETIC_EXTENSIONS : Character_UnicodeBlock;
+	@:final static var PHONETIC_EXTENSIONS_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var PLAYING_CARDS : Character_UnicodeBlock;
+	@:final static var PRIVATE_USE_AREA : Character_UnicodeBlock;
+	@:final static var REJANG : Character_UnicodeBlock;
+	@:final static var RUMI_NUMERAL_SYMBOLS : Character_UnicodeBlock;
+	@:final static var RUNIC : Character_UnicodeBlock;
+	@:final static var SAMARITAN : Character_UnicodeBlock;
+	@:final static var SAURASHTRA : Character_UnicodeBlock;
+	@:final static var SHAVIAN : Character_UnicodeBlock;
+	@:final static var SINHALA : Character_UnicodeBlock;
+	@:final static var SMALL_FORM_VARIANTS : Character_UnicodeBlock;
+	@:final static var SPACING_MODIFIER_LETTERS : Character_UnicodeBlock;
+	@:final static var SPECIALS : Character_UnicodeBlock;
+	@:final static var SUNDANESE : Character_UnicodeBlock;
+	@:final static var SUPERSCRIPTS_AND_SUBSCRIPTS : Character_UnicodeBlock;
+	@:final static var SUPPLEMENTAL_ARROWS_A : Character_UnicodeBlock;
+	@:final static var SUPPLEMENTAL_ARROWS_B : Character_UnicodeBlock;
+	@:final static var SUPPLEMENTAL_MATHEMATICAL_OPERATORS : Character_UnicodeBlock;
+	@:final static var SUPPLEMENTAL_PUNCTUATION : Character_UnicodeBlock;
+	@:final static var SUPPLEMENTARY_PRIVATE_USE_AREA_A : Character_UnicodeBlock;
+	@:final static var SUPPLEMENTARY_PRIVATE_USE_AREA_B : Character_UnicodeBlock;
+	@:deprecated @:final static var SURROGATES_AREA : Character_UnicodeBlock;
+	@:final static var SYLOTI_NAGRI : Character_UnicodeBlock;
+	@:final static var SYRIAC : Character_UnicodeBlock;
+	@:final static var TAGALOG : Character_UnicodeBlock;
+	@:final static var TAGBANWA : Character_UnicodeBlock;
+	@:final static var TAGS : Character_UnicodeBlock;
+	@:final static var TAI_LE : Character_UnicodeBlock;
+	@:final static var TAI_THAM : Character_UnicodeBlock;
+	@:final static var TAI_VIET : Character_UnicodeBlock;
+	@:final static var TAI_XUAN_JING_SYMBOLS : Character_UnicodeBlock;
+	@:final static var TAMIL : Character_UnicodeBlock;
+	@:final static var TELUGU : Character_UnicodeBlock;
+	@:final static var THAANA : Character_UnicodeBlock;
+	@:final static var THAI : Character_UnicodeBlock;
+	@:final static var TIBETAN : Character_UnicodeBlock;
+	@:final static var TIFINAGH : Character_UnicodeBlock;
+	@:final static var TRANSPORT_AND_MAP_SYMBOLS : Character_UnicodeBlock;
+	@:final static var UGARITIC : Character_UnicodeBlock;
+	@:final static var UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS : Character_UnicodeBlock;
+	@:final static var UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED : Character_UnicodeBlock;
+	@:final static var VAI : Character_UnicodeBlock;
+	@:final static var VARIATION_SELECTORS : Character_UnicodeBlock;
+	@:final static var VARIATION_SELECTORS_SUPPLEMENT : Character_UnicodeBlock;
+	@:final static var VEDIC_EXTENSIONS : Character_UnicodeBlock;
+	@:final static var VERTICAL_FORMS : Character_UnicodeBlock;
+	@:final static var YIJING_HEXAGRAM_SYMBOLS : Character_UnicodeBlock;
+	@:final static var YI_RADICALS : Character_UnicodeBlock;
+	@:final static var YI_SYLLABLES : Character_UnicodeBlock;
+	@:overload @:final static function forName(param1 : String) : Character_UnicodeBlock;
+	@:overload static function of(param1 : java.types.Char16) : Character_UnicodeBlock;
+	@:overload static function of(param1 : Int) : Character_UnicodeBlock;
+}
+
+@:realPath("java.lang.Character_UnicodeScript") @:javaCanonical("java.lang","Character.UnicodeScript") @:native("java.lang.Character$UnicodeScript") extern enum Character_UnicodeScript {
+	COMMON;
+	LATIN;
+	GREEK;
+	CYRILLIC;
+	ARMENIAN;
+	HEBREW;
+	ARABIC;
+	SYRIAC;
+	THAANA;
+	DEVANAGARI;
+	BENGALI;
+	GURMUKHI;
+	GUJARATI;
+	ORIYA;
+	TAMIL;
+	TELUGU;
+	KANNADA;
+	MALAYALAM;
+	SINHALA;
+	THAI;
+	LAO;
+	TIBETAN;
+	MYANMAR;
+	GEORGIAN;
+	HANGUL;
+	ETHIOPIC;
+	CHEROKEE;
+	CANADIAN_ABORIGINAL;
+	OGHAM;
+	RUNIC;
+	KHMER;
+	MONGOLIAN;
+	HIRAGANA;
+	KATAKANA;
+	BOPOMOFO;
+	HAN;
+	YI;
+	OLD_ITALIC;
+	GOTHIC;
+	DESERET;
+	INHERITED;
+	TAGALOG;
+	HANUNOO;
+	BUHID;
+	TAGBANWA;
+	LIMBU;
+	TAI_LE;
+	LINEAR_B;
+	UGARITIC;
+	SHAVIAN;
+	OSMANYA;
+	CYPRIOT;
+	BRAILLE;
+	BUGINESE;
+	COPTIC;
+	NEW_TAI_LUE;
+	GLAGOLITIC;
+	TIFINAGH;
+	SYLOTI_NAGRI;
+	OLD_PERSIAN;
+	KHAROSHTHI;
+	BALINESE;
+	CUNEIFORM;
+	PHOENICIAN;
+	PHAGS_PA;
+	NKO;
+	SUNDANESE;
+	BATAK;
+	LEPCHA;
+	OL_CHIKI;
+	VAI;
+	SAURASHTRA;
+	KAYAH_LI;
+	REJANG;
+	LYCIAN;
+	CARIAN;
+	LYDIAN;
+	CHAM;
+	TAI_THAM;
+	TAI_VIET;
+	AVESTAN;
+	EGYPTIAN_HIEROGLYPHS;
+	SAMARITAN;
+	MANDAIC;
+	LISU;
+	BAMUM;
+	JAVANESE;
+	MEETEI_MAYEK;
+	IMPERIAL_ARAMAIC;
+	OLD_SOUTH_ARABIAN;
+	INSCRIPTIONAL_PARTHIAN;
+	INSCRIPTIONAL_PAHLAVI;
+	OLD_TURKIC;
+	BRAHMI;
+	KAITHI;
+	UNKNOWN;
+}

+ 2 - 0
std/java/lang/Integer.hx

@@ -48,3 +48,5 @@ package java.lang;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String) : Integer;
 }
 
+@:realPath("java.lang.Integer_IntegerCache") @:javaNative @:native("java.lang.Integer$IntegerCache") @:javaCanonical("java.lang","Integer.IntegerCache") extern class Integer_IntegerCache {
+}

+ 3 - 0
std/java/lang/Long.hx

@@ -47,3 +47,6 @@ package java.lang;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String, param2 : Int) : Long;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String) : Long;
 }
+
+@:realPath("java.lang.Long_LongCache") @:javaNative @:native("java.lang.Long$LongCache") @:javaCanonical("java.lang","Long.LongCache") extern class Long_LongCache {
+}

+ 2 - 0
std/java/lang/Short.hx

@@ -30,5 +30,7 @@ package java.lang;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String, param2 : Int) : Short;
 	@:overload static function valueOf(param1 : java.types.Int16) : Short;
 	@:overload @:throws("java.lang.NumberFormatException") static function valueOf(param1 : String) : Short;
+}
 
+@:realPath("java.lang.Short_ShortCache") @:javaNative @:native("java.lang.Short$ShortCache") @:javaCanonical("java.lang","Short.ShortCache") extern class Short_ShortCache {
 }

+ 11 - 0
std/js/Boot.hx

@@ -21,6 +21,17 @@
  */
 package js;
 
+private class HaxeError extends js.Error {
+
+	var val:Dynamic;
+
+	public function new(val:Dynamic) {
+		super();
+		this.val = untyped __define_feature__("js.Boot.HaxeError", val);
+		untyped if (js.Error.captureStackTrace) js.Error.captureStackTrace(this, HaxeError);
+	}
+}
+
 @:dox(hide)
 class Boot {
 

+ 0 - 8
std/js/_std/HxOverrides.hx

@@ -60,11 +60,7 @@ class HxOverrides {
 	}
 
 	static function cca( s : String, index : Int ) : Null<Int> {
-		#if mt
-		var x = (cast s).cca(index);
-		#else
 		var x = (cast s).charCodeAt(index);
-		#end
 		if( x != x ) // fast isNaN
 			return untyped undefined; // isNaN will still return true
 		return x;
@@ -138,10 +134,6 @@ class HxOverrides {
 		__feature__('HxOverrides.indexOf', if( Array.prototype.indexOf ) __js__("HxOverrides").indexOf = function(a,o,i) return Array.prototype.indexOf.call(a, o, i));
 		__feature__('HxOverrides.lastIndexOf', if( Array.prototype.lastIndexOf ) __js__("HxOverrides").lastIndexOf = function(a,o,i) return Array.prototype.lastIndexOf.call(a, o, i));
 #end
-
-#if mt
-		if( String.prototype.cca == null ) String.prototype.cca = String.prototype.charCodeAt;
-#end
 	}
 
 }

+ 5 - 5
std/js/_std/haxe/io/Bytes.hx

@@ -30,12 +30,12 @@ class Bytes {
 	var b : js.html.Uint8Array;
 	var data : js.html.DataView;
 
-	function new(b:BytesData) {
-		this.length = b.byteLength;
-		this.b = new js.html.Uint8Array(b);
+	function new(data:BytesData) {
+		this.length = data.byteLength;
+		this.b = new js.html.Uint8Array(data);
 		untyped {
-			b.hxBytes = this;
-			b.bytes = b;
+			data.hxBytes = this;
+			data.bytes = this.b;
 		}
 	}
 

+ 1 - 1
std/js/html/AnchorElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLAnchorElement")
-extern class AnchorElement extends HTMLElement
+extern class AnchorElement extends Element
 {
 	var target : String;
 	var download : String;

+ 1 - 1
std/js/html/Animation.hx

@@ -28,6 +28,6 @@ package js.html;
 extern class Animation
 {
 	var effect(default,null) : AnimationEffect;
-	var target(default,null) : Element;
+	var target(default,null) : DOMElement;
 	
 }

+ 1 - 1
std/js/html/AppletElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLAppletElement")
-extern class AppletElement extends HTMLElement
+extern class AppletElement extends Element
 {
 	var align : String;
 	var alt : String;

+ 1 - 1
std/js/html/AreaElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLAreaElement")
-extern class AreaElement extends HTMLElement
+extern class AreaElement extends Element
 {
 	var alt : String;
 	var coords : String;

+ 1 - 1
std/js/html/Attr.hx

@@ -30,6 +30,6 @@ extern class Attr extends Node
 	var value : String;
 	var name(default,null) : String;
 	var specified(default,null) : Bool;
-	var ownerElement(default,null) : Element;
+	var ownerElement(default,null) : DOMElement;
 	
 }

+ 1 - 1
std/js/html/BRElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLBRElement")
-extern class BRElement extends HTMLElement
+extern class BRElement extends Element
 {
 	var clear : String;
 	

+ 1 - 1
std/js/html/BaseElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLBaseElement")
-extern class BaseElement extends HTMLElement
+extern class BaseElement extends Element
 {
 	var href : String;
 	var target : String;

+ 1 - 1
std/js/html/BodyElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLBodyElement")
-extern class BodyElement extends HTMLElement
+extern class BodyElement extends Element
 {
 	var text : String;
 	var link : String;

+ 1 - 1
std/js/html/ButtonElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLButtonElement")
-extern class ButtonElement extends HTMLElement
+extern class ButtonElement extends Element
 {
 	var autofocus : Bool;
 	var disabled : Bool;

+ 1 - 1
std/js/html/CanvasElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLCanvasElement")
-extern class CanvasElement extends HTMLElement
+extern class CanvasElement extends Element
 {
 	var width : Int;
 	var height : Int;

+ 2 - 2
std/js/html/CanvasRenderingContext2D.hx

@@ -74,8 +74,8 @@ extern class CanvasRenderingContext2D
 	function fill( path : Path2D, ?winding : CanvasWindingRule = "nonzero" ) : Void;
 	@:overload( function() : Void {} )
 	function stroke( path : Path2D ) : Void;
-	function drawFocusIfNeeded( element : Element ) : Void;
-	function drawCustomFocusRing( element : Element ) : Bool;
+	function drawFocusIfNeeded( element : DOMElement ) : Void;
+	function drawCustomFocusRing( element : DOMElement ) : Bool;
 	@:overload( function( ?winding : CanvasWindingRule = "nonzero" ) : Void {} )
 	function clip( path : Path2D, ?winding : CanvasWindingRule = "nonzero" ) : Void;
 	@:overload( function( x : Float, y : Float, ?winding : CanvasWindingRule = "nonzero" ) : Bool {} )

+ 2 - 2
std/js/html/CharacterData.hx

@@ -29,8 +29,8 @@ extern class CharacterData extends Node
 {
 	var data : String;
 	var length(default,null) : Int;
-	var previousElementSibling(default,null) : Element;
-	var nextElementSibling(default,null) : Element;
+	var previousElementSibling(default,null) : DOMElement;
+	var nextElementSibling(default,null) : DOMElement;
 	
 	/** @throws DOMError */
 	function substringData( offset : Int, count : Int ) : String;

+ 1 - 1
std/js/html/ContentElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLContentElement")
-extern class ContentElement extends HTMLElement
+extern class ContentElement extends Element
 {
 	var select : String;
 	

+ 1 - 1
std/js/html/DListElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLDListElement")
-extern class DListElement extends HTMLElement
+extern class DListElement extends Element
 {
 	var compact : Bool;
 	

+ 223 - 0
std/js/html/DOMElement.hx

@@ -0,0 +1,223 @@
+/*
+ * Copyright (C)2005-2015 Haxe Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+// This file is generated from mozilla/Element.webidl line 16:0. Do not edit!
+
+package js.html;
+
+@:native("Element")
+extern class DOMElement extends Node
+{
+	var tagName(default,null) : String;
+	var id : String;
+	var className : String;
+	var classList(default,null) : DOMTokenList;
+	var attributes(default,null) : NamedNodeMap;
+	var onwheel : haxe.Constraints.Function;
+	var title : String;
+	var lang : String;
+	var dir : String;
+	var dataset(default,null) : DOMStringMap;
+	var itemScope : Bool;
+	var itemType(default,null) : DOMSettableTokenList;
+	var itemId : String;
+	var itemRef(default,null) : DOMSettableTokenList;
+	var itemProp(default,null) : DOMSettableTokenList;
+	var properties(default,null) : HTMLPropertiesCollection;
+	var itemValue : Dynamic;
+	var hidden : Bool;
+	var tabIndex : Int;
+	var accessKey : String;
+	var accessKeyLabel(default,null) : String;
+	var draggable : Bool;
+	var contentEditable : String;
+	var isContentEditable(default,null) : Bool;
+	var contextMenu(default,null) : MenuElement;
+	var spellcheck : Bool;
+	var style(default,null) : CSSStyleDeclaration;
+	var oncopy : haxe.Constraints.Function;
+	var oncut : haxe.Constraints.Function;
+	var onpaste : haxe.Constraints.Function;
+	var offsetParent(default,null) : DOMElement;
+	var offsetTop(default,null) : Int;
+	var offsetLeft(default,null) : Int;
+	var offsetWidth(default,null) : Int;
+	var offsetHeight(default,null) : Int;
+	var scrollTop : Int;
+	var scrollLeft : Int;
+	var scrollWidth(default,null) : Int;
+	var scrollHeight(default,null) : Int;
+	var clientTop(default,null) : Int;
+	var clientLeft(default,null) : Int;
+	var clientWidth(default,null) : Int;
+	var clientHeight(default,null) : Int;
+	var scrollTopMax(default,null) : Int;
+	var scrollLeftMax(default,null) : Int;
+	var innerHTML : String;
+	var outerHTML : String;
+	var shadowRoot(default,null) : ShadowRoot;
+	var onabort : haxe.Constraints.Function;
+	var onblur : haxe.Constraints.Function;
+	var onfocus : haxe.Constraints.Function;
+	var oncanplay : haxe.Constraints.Function;
+	var oncanplaythrough : haxe.Constraints.Function;
+	var onchange : haxe.Constraints.Function;
+	var onclick : haxe.Constraints.Function;
+	var oncontextmenu : haxe.Constraints.Function;
+	var ondblclick : haxe.Constraints.Function;
+	var ondrag : haxe.Constraints.Function;
+	var ondragend : haxe.Constraints.Function;
+	var ondragenter : haxe.Constraints.Function;
+	var ondragleave : haxe.Constraints.Function;
+	var ondragover : haxe.Constraints.Function;
+	var ondragstart : haxe.Constraints.Function;
+	var ondrop : haxe.Constraints.Function;
+	var ondurationchange : haxe.Constraints.Function;
+	var onemptied : haxe.Constraints.Function;
+	var onended : haxe.Constraints.Function;
+	var oninput : haxe.Constraints.Function;
+	var oninvalid : haxe.Constraints.Function;
+	var onkeydown : haxe.Constraints.Function;
+	var onkeypress : haxe.Constraints.Function;
+	var onkeyup : haxe.Constraints.Function;
+	var onload : haxe.Constraints.Function;
+	var onloadeddata : haxe.Constraints.Function;
+	var onloadedmetadata : haxe.Constraints.Function;
+	var onloadstart : haxe.Constraints.Function;
+	var onmousedown : haxe.Constraints.Function;
+	var onmouseenter : haxe.Constraints.Function;
+	var onmouseleave : haxe.Constraints.Function;
+	var onmousemove : haxe.Constraints.Function;
+	var onmouseout : haxe.Constraints.Function;
+	var onmouseover : haxe.Constraints.Function;
+	var onmouseup : haxe.Constraints.Function;
+	var onpause : haxe.Constraints.Function;
+	var onplay : haxe.Constraints.Function;
+	var onplaying : haxe.Constraints.Function;
+	var onprogress : haxe.Constraints.Function;
+	var onratechange : haxe.Constraints.Function;
+	var onreset : haxe.Constraints.Function;
+	var onscroll : haxe.Constraints.Function;
+	var onseeked : haxe.Constraints.Function;
+	var onseeking : haxe.Constraints.Function;
+	var onselect : haxe.Constraints.Function;
+	var onshow : haxe.Constraints.Function;
+	var onstalled : haxe.Constraints.Function;
+	var onsubmit : haxe.Constraints.Function;
+	var onsuspend : haxe.Constraints.Function;
+	var ontimeupdate : haxe.Constraints.Function;
+	var onvolumechange : haxe.Constraints.Function;
+	var onwaiting : haxe.Constraints.Function;
+	var onpointercancel : haxe.Constraints.Function;
+	var onpointerdown : haxe.Constraints.Function;
+	var onpointerup : haxe.Constraints.Function;
+	var onpointermove : haxe.Constraints.Function;
+	var onpointerout : haxe.Constraints.Function;
+	var onpointerover : haxe.Constraints.Function;
+	var onpointerenter : haxe.Constraints.Function;
+	var onpointerleave : haxe.Constraints.Function;
+	var ongotpointercapture : haxe.Constraints.Function;
+	var onlostpointercapture : haxe.Constraints.Function;
+	var onpointerlockchange : haxe.Constraints.Function;
+	var onpointerlockerror : haxe.Constraints.Function;
+	var previousElementSibling(default,null) : DOMElement;
+	var nextElementSibling(default,null) : DOMElement;
+	var onerror : haxe.Constraints.Function;
+	var children(default,null) : HTMLCollection;
+	var firstElementChild(default,null) : DOMElement;
+	var lastElementChild(default,null) : DOMElement;
+	var childElementCount(default,null) : Int;
+	var ontouchstart : haxe.Constraints.Function;
+	var ontouchend : haxe.Constraints.Function;
+	var ontouchmove : haxe.Constraints.Function;
+	var ontouchcancel : haxe.Constraints.Function;
+	
+	function getAttribute( name : String ) : String;
+	function getAttributeNS( namespace_ : String, localName : String ) : String;
+	/** @throws DOMError */
+	function setAttribute( name : String, value : String ) : Void;
+	/** @throws DOMError */
+	function setAttributeNS( namespace_ : String, name : String, value : String ) : Void;
+	/** @throws DOMError */
+	function removeAttribute( name : String ) : Void;
+	/** @throws DOMError */
+	function removeAttributeNS( namespace_ : String, localName : String ) : Void;
+	function hasAttribute( name : String ) : Bool;
+	function hasAttributeNS( namespace_ : String, localName : String ) : Bool;
+	function hasAttributes() : Bool;
+	/** @throws DOMError */
+	function closest( selector : String ) : DOMElement;
+	/** @throws DOMError */
+	function matches( selector : String ) : Bool;
+	function getElementsByTagName( localName : String ) : HTMLCollection;
+	/** @throws DOMError */
+	function getElementsByTagNameNS( namespace_ : String, localName : String ) : HTMLCollection;
+	function getElementsByClassName( classNames : String ) : HTMLCollection;
+	/** @throws DOMError */
+	function setPointerCapture( pointerId : Int ) : Void;
+	/** @throws DOMError */
+	function releasePointerCapture( pointerId : Int ) : Void;
+	function setCapture( ?retargetToElement : Bool = false ) : Void;
+	function releaseCapture() : Void;
+	function requestPointerLock() : Void;
+	function getAttributeNode( name : String ) : Attr;
+	/** @throws DOMError */
+	function setAttributeNode( newAttr : Attr ) : Attr;
+	/** @throws DOMError */
+	function removeAttributeNode( oldAttr : Attr ) : Attr;
+	function getAttributeNodeNS( namespaceURI : String, localName : String ) : Attr;
+	/** @throws DOMError */
+	function setAttributeNodeNS( newAttr : Attr ) : Attr;
+	function requestFullscreen() : Void;
+	function click() : Void;
+	/** @throws DOMError */
+	function focus() : Void;
+	/** @throws DOMError */
+	function blur() : Void;
+	function getClientRects() : DOMRectList;
+	function getBoundingClientRect() : DOMRect;
+	@:overload( function( top : Bool ) : Void {} )
+	function scrollIntoView( ?options : ScrollIntoViewOptions ) : Void;
+	@:overload( function( x : Float, y : Float ) : Void {} )
+	function scroll( ?options : ScrollToOptions ) : Void;
+	@:overload( function( x : Float, y : Float ) : Void {} )
+	function scrollTo( ?options : ScrollToOptions ) : Void;
+	@:overload( function( x : Float, y : Float ) : Void {} )
+	function scrollBy( ?options : ScrollToOptions ) : Void;
+	/** @throws DOMError */
+	function insertAdjacentHTML( position : String, text : String ) : Void;
+	/** @throws DOMError */
+	function querySelector( selectors : String ) : DOMElement;
+	/** @throws DOMError */
+	function querySelectorAll( selectors : String ) : NodeList;
+	/** @throws DOMError */
+	function createShadowRoot() : ShadowRoot;
+	function getDestinationInsertionPoints() : NodeList;
+	function getAnimationPlayers() : Array<AnimationPlayer>;
+	function remove() : Void;
+	/** @throws DOMError */
+	function convertQuadFromNode( quad : DOMQuad, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<DOMElement,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
+	/** @throws DOMError */
+	function convertRectFromNode( rect : DOMRectReadOnly, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<DOMElement,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
+	/** @throws DOMError */
+	function convertPointFromNode( point : DOMPointInit, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<DOMElement,Document>>, ?options : ConvertCoordinateOptions ) : DOMPoint;
+}

+ 1 - 1
std/js/html/DataElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLDataElement")
-extern class DataElement extends HTMLElement
+extern class DataElement extends Element
 {
 	var value : String;
 	

+ 1 - 1
std/js/html/DataListElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLDataListElement")
-extern class DataListElement extends HTMLElement
+extern class DataListElement extends Element
 {
 	var options(default,null) : HTMLCollection;
 	

+ 2 - 2
std/js/html/DataTransfer.hx

@@ -35,7 +35,7 @@ extern class DataTransfer
 	/** @throws DOMError */
 	function new( eventType : String, isExternal : Bool ) : Void;
 	/** @throws DOMError */
-	function setDragImage( image : Element, x : Int, y : Int ) : Void;
+	function setDragImage( image : DOMElement, x : Int, y : Int ) : Void;
 	/** @throws DOMError */
 	function getData( format : String ) : String;
 	/** @throws DOMError */
@@ -43,5 +43,5 @@ extern class DataTransfer
 	/** @throws DOMError */
 	function clearData( ?format : String ) : Void;
 	/** @throws DOMError */
-	function addElement( element : Element ) : Void;
+	function addElement( element : DOMElement ) : Void;
 }

+ 1 - 1
std/js/html/DirectoryElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLDirectoryElement")
-extern class DirectoryElement extends HTMLElement
+extern class DirectoryElement extends Element
 {
 	var compact : Bool;
 	

+ 1 - 1
std/js/html/DivElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLDivElement")
-extern class DivElement extends HTMLElement
+extern class DivElement extends Element
 {
 	var align : String;
 	

+ 17 - 17
std/js/html/Document.hx

@@ -34,10 +34,10 @@ extern class Document extends Node
 	var characterSet(default,null) : String;
 	var contentType(default,null) : String;
 	var doctype(default,null) : DocumentType;
-	var documentElement(default,null) : Element;
+	var documentElement(default,null) : DOMElement;
 	var inputEncoding(default,null) : String;
 	var fullscreenEnabled(default,null) : Bool;
-	var fullscreenElement(default,null) : Element;
+	var fullscreenElement(default,null) : DOMElement;
 	var onfullscreenchange : haxe.Constraints.Function;
 	var onfullscreenerror : haxe.Constraints.Function;
 	var location(default,null) : Location;
@@ -47,7 +47,7 @@ extern class Document extends Node
 	var title : String;
 	var dir : String;
 	var defaultView(default,null) : Window;
-	var activeElement(default,null) : Element;
+	var activeElement(default,null) : DOMElement;
 	var onreadystatechange : haxe.Constraints.Function;
 	var onwheel : haxe.Constraints.Function;
 	var oncopy : haxe.Constraints.Function;
@@ -55,8 +55,8 @@ extern class Document extends Node
 	var onpaste : haxe.Constraints.Function;
 	var onbeforescriptexecute : haxe.Constraints.Function;
 	var onafterscriptexecute : haxe.Constraints.Function;
-	var currentScript(default,null) : Element;
-	var pointerLockElement(default,null) : Element;
+	var currentScript(default,null) : DOMElement;
+	var pointerLockElement(default,null) : DOMElement;
 	var hidden(default,null) : Bool;
 	var visibilityState(default,null) : VisibilityState;
 	var styleSheets(default,null) : StyleSheetList;
@@ -132,8 +132,8 @@ extern class Document extends Node
 	var onpointerlockerror : haxe.Constraints.Function;
 	var onerror : haxe.Constraints.Function;
 	var children(default,null) : HTMLCollection;
-	var firstElementChild(default,null) : Element;
-	var lastElementChild(default,null) : Element;
+	var firstElementChild(default,null) : DOMElement;
+	var lastElementChild(default,null) : DOMElement;
 	var childElementCount(default,null) : Int;
 	var ontouchstart : haxe.Constraints.Function;
 	var ontouchend : haxe.Constraints.Function;
@@ -146,13 +146,13 @@ extern class Document extends Node
 	/** @throws DOMError */
 	function getElementsByTagNameNS( namespace_ : String, localName : String ) : HTMLCollection;
 	function getElementsByClassName( classNames : String ) : HTMLCollection;
-	function getElementById( elementId : String ) : Element;
+	function getElementById( elementId : String ) : DOMElement;
 	/** @throws DOMError */
-	@:overload( function( localName : String ) : Element {} )
-	function createElement( localName : String, typeExtension : String ) : Element;
+	@:overload( function( localName : String ) : DOMElement {} )
+	function createElement( localName : String, typeExtension : String ) : DOMElement;
 	/** @throws DOMError */
-	@:overload( function( namespace_ : String, qualifiedName : String ) : Element {} )
-	function createElementNS( namespace_ : String, qualifiedName : String, typeExtension : String ) : Element;
+	@:overload( function( namespace_ : String, qualifiedName : String ) : DOMElement {} )
+	function createElementNS( namespace_ : String, qualifiedName : String, typeExtension : String ) : DOMElement;
 	function createDocumentFragment() : DocumentFragment;
 	function createTextNode( data : String ) : Text;
 	function createComment( data : String ) : Comment;
@@ -184,10 +184,10 @@ extern class Document extends Node
 	/** @throws DOMError */
 	function registerElement( name : String, ?options : ElementRegistrationOptions ) : Dynamic;
 	function enableStyleSheetsForSet( name : String ) : Void;
-	function elementFromPoint( x : Float, y : Float ) : Element;
+	function elementFromPoint( x : Float, y : Float ) : DOMElement;
 	function caretPositionFromPoint( x : Float, y : Float ) : CaretPosition;
 	/** @throws DOMError */
-	function querySelector( selectors : String ) : Element;
+	function querySelector( selectors : String ) : DOMElement;
 	/** @throws DOMError */
 	function querySelectorAll( selectors : String ) : NodeList;
 	function createTouch( ?view : Window, ?target : EventTarget, ?identifier : Int = 0, ?pageX : Int = 0, ?pageY : Int = 0, ?screenX : Int = 0, ?screenY : Int = 0, ?clientX : Int = 0, ?clientY : Int = 0, ?radiusX : Int = 0, ?radiusY : Int = 0, ?rotationAngle : Float = 0.0, ?force : Float = 0.0 ) : Touch;
@@ -195,11 +195,11 @@ extern class Document extends Node
 	@:overload( function() : TouchList {} )
 	function createTouchList( touches : Array<Touch> ) : TouchList;
 	/** @throws DOMError */
-	function convertQuadFromNode( quad : DOMQuad, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<Element,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
+	function convertQuadFromNode( quad : DOMQuad, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<DOMElement,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
 	/** @throws DOMError */
-	function convertRectFromNode( rect : DOMRectReadOnly, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<Element,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
+	function convertRectFromNode( rect : DOMRectReadOnly, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<DOMElement,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
 	/** @throws DOMError */
-	function convertPointFromNode( point : DOMPointInit, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<Element,Document>>, ?options : ConvertCoordinateOptions ) : DOMPoint;
+	function convertPointFromNode( point : DOMPointInit, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<DOMElement,Document>>, ?options : ConvertCoordinateOptions ) : DOMPoint;
 	/** @throws DOMError */
 	function createExpression( expression : String, resolver : XPathNSResolver ) : XPathExpression;
 	function createNSResolver( nodeResolver : Node ) : Node;

+ 4 - 4
std/js/html/DocumentFragment.hx

@@ -28,15 +28,15 @@ package js.html;
 extern class DocumentFragment extends Node
 {
 	var children(default,null) : HTMLCollection;
-	var firstElementChild(default,null) : Element;
-	var lastElementChild(default,null) : Element;
+	var firstElementChild(default,null) : DOMElement;
+	var lastElementChild(default,null) : DOMElement;
 	var childElementCount(default,null) : Int;
 	
 	/** @throws DOMError */
 	function new() : Void;
-	function getElementById( elementId : String ) : Element;
+	function getElementById( elementId : String ) : DOMElement;
 	/** @throws DOMError */
-	function querySelector( selectors : String ) : Element;
+	function querySelector( selectors : String ) : DOMElement;
 	/** @throws DOMError */
 	function querySelectorAll( selectors : String ) : NodeList;
 }

+ 3 - 166
std/js/html/Element.hx

@@ -20,174 +20,11 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-// This file is generated from mozilla/Element.webidl line 16:0. Do not edit!
+// This file is generated from mozilla/HTMLElement.webidl line 15:0. Do not edit!
 
 package js.html;
 
-@:native("Element")
-extern class Element extends Node
+@:native("HTMLElement")
+extern class Element extends DOMElement
 {
-	var tagName(default,null) : String;
-	var id : String;
-	var className : String;
-	var classList(default,null) : DOMTokenList;
-	var attributes(default,null) : NamedNodeMap;
-	var onwheel : haxe.Constraints.Function;
-	var style(default,null) : CSSStyleDeclaration;
-	var oncopy : haxe.Constraints.Function;
-	var oncut : haxe.Constraints.Function;
-	var onpaste : haxe.Constraints.Function;
-	var scrollTop : Int;
-	var scrollLeft : Int;
-	var scrollWidth(default,null) : Int;
-	var scrollHeight(default,null) : Int;
-	var clientTop(default,null) : Int;
-	var clientLeft(default,null) : Int;
-	var clientWidth(default,null) : Int;
-	var clientHeight(default,null) : Int;
-	var scrollTopMax(default,null) : Int;
-	var scrollLeftMax(default,null) : Int;
-	var innerHTML : String;
-	var outerHTML : String;
-	var shadowRoot(default,null) : ShadowRoot;
-	var onabort : haxe.Constraints.Function;
-	var onblur : haxe.Constraints.Function;
-	var onfocus : haxe.Constraints.Function;
-	var oncanplay : haxe.Constraints.Function;
-	var oncanplaythrough : haxe.Constraints.Function;
-	var onchange : haxe.Constraints.Function;
-	var onclick : haxe.Constraints.Function;
-	var oncontextmenu : haxe.Constraints.Function;
-	var ondblclick : haxe.Constraints.Function;
-	var ondrag : haxe.Constraints.Function;
-	var ondragend : haxe.Constraints.Function;
-	var ondragenter : haxe.Constraints.Function;
-	var ondragleave : haxe.Constraints.Function;
-	var ondragover : haxe.Constraints.Function;
-	var ondragstart : haxe.Constraints.Function;
-	var ondrop : haxe.Constraints.Function;
-	var ondurationchange : haxe.Constraints.Function;
-	var onemptied : haxe.Constraints.Function;
-	var onended : haxe.Constraints.Function;
-	var oninput : haxe.Constraints.Function;
-	var oninvalid : haxe.Constraints.Function;
-	var onkeydown : haxe.Constraints.Function;
-	var onkeypress : haxe.Constraints.Function;
-	var onkeyup : haxe.Constraints.Function;
-	var onload : haxe.Constraints.Function;
-	var onloadeddata : haxe.Constraints.Function;
-	var onloadedmetadata : haxe.Constraints.Function;
-	var onloadstart : haxe.Constraints.Function;
-	var onmousedown : haxe.Constraints.Function;
-	var onmouseenter : haxe.Constraints.Function;
-	var onmouseleave : haxe.Constraints.Function;
-	var onmousemove : haxe.Constraints.Function;
-	var onmouseout : haxe.Constraints.Function;
-	var onmouseover : haxe.Constraints.Function;
-	var onmouseup : haxe.Constraints.Function;
-	var onpause : haxe.Constraints.Function;
-	var onplay : haxe.Constraints.Function;
-	var onplaying : haxe.Constraints.Function;
-	var onprogress : haxe.Constraints.Function;
-	var onratechange : haxe.Constraints.Function;
-	var onreset : haxe.Constraints.Function;
-	var onscroll : haxe.Constraints.Function;
-	var onseeked : haxe.Constraints.Function;
-	var onseeking : haxe.Constraints.Function;
-	var onselect : haxe.Constraints.Function;
-	var onshow : haxe.Constraints.Function;
-	var onstalled : haxe.Constraints.Function;
-	var onsubmit : haxe.Constraints.Function;
-	var onsuspend : haxe.Constraints.Function;
-	var ontimeupdate : haxe.Constraints.Function;
-	var onvolumechange : haxe.Constraints.Function;
-	var onwaiting : haxe.Constraints.Function;
-	var onpointercancel : haxe.Constraints.Function;
-	var onpointerdown : haxe.Constraints.Function;
-	var onpointerup : haxe.Constraints.Function;
-	var onpointermove : haxe.Constraints.Function;
-	var onpointerout : haxe.Constraints.Function;
-	var onpointerover : haxe.Constraints.Function;
-	var onpointerenter : haxe.Constraints.Function;
-	var onpointerleave : haxe.Constraints.Function;
-	var ongotpointercapture : haxe.Constraints.Function;
-	var onlostpointercapture : haxe.Constraints.Function;
-	var onpointerlockchange : haxe.Constraints.Function;
-	var onpointerlockerror : haxe.Constraints.Function;
-	var previousElementSibling(default,null) : Element;
-	var nextElementSibling(default,null) : Element;
-	var onerror : haxe.Constraints.Function;
-	var children(default,null) : HTMLCollection;
-	var firstElementChild(default,null) : Element;
-	var lastElementChild(default,null) : Element;
-	var childElementCount(default,null) : Int;
-	var ontouchstart : haxe.Constraints.Function;
-	var ontouchend : haxe.Constraints.Function;
-	var ontouchmove : haxe.Constraints.Function;
-	var ontouchcancel : haxe.Constraints.Function;
-	
-	function getAttribute( name : String ) : String;
-	function getAttributeNS( namespace_ : String, localName : String ) : String;
-	/** @throws DOMError */
-	function setAttribute( name : String, value : String ) : Void;
-	/** @throws DOMError */
-	function setAttributeNS( namespace_ : String, name : String, value : String ) : Void;
-	/** @throws DOMError */
-	function removeAttribute( name : String ) : Void;
-	/** @throws DOMError */
-	function removeAttributeNS( namespace_ : String, localName : String ) : Void;
-	function hasAttribute( name : String ) : Bool;
-	function hasAttributeNS( namespace_ : String, localName : String ) : Bool;
-	function hasAttributes() : Bool;
-	/** @throws DOMError */
-	function closest( selector : String ) : Element;
-	/** @throws DOMError */
-	function matches( selector : String ) : Bool;
-	function getElementsByTagName( localName : String ) : HTMLCollection;
-	/** @throws DOMError */
-	function getElementsByTagNameNS( namespace_ : String, localName : String ) : HTMLCollection;
-	function getElementsByClassName( classNames : String ) : HTMLCollection;
-	/** @throws DOMError */
-	function setPointerCapture( pointerId : Int ) : Void;
-	/** @throws DOMError */
-	function releasePointerCapture( pointerId : Int ) : Void;
-	function setCapture( ?retargetToElement : Bool = false ) : Void;
-	function releaseCapture() : Void;
-	function requestPointerLock() : Void;
-	function getAttributeNode( name : String ) : Attr;
-	/** @throws DOMError */
-	function setAttributeNode( newAttr : Attr ) : Attr;
-	/** @throws DOMError */
-	function removeAttributeNode( oldAttr : Attr ) : Attr;
-	function getAttributeNodeNS( namespaceURI : String, localName : String ) : Attr;
-	/** @throws DOMError */
-	function setAttributeNodeNS( newAttr : Attr ) : Attr;
-	function requestFullscreen() : Void;
-	function getClientRects() : DOMRectList;
-	function getBoundingClientRect() : DOMRect;
-	@:overload( function( top : Bool ) : Void {} )
-	function scrollIntoView( ?options : ScrollIntoViewOptions ) : Void;
-	@:overload( function( x : Float, y : Float ) : Void {} )
-	function scroll( ?options : ScrollToOptions ) : Void;
-	@:overload( function( x : Float, y : Float ) : Void {} )
-	function scrollTo( ?options : ScrollToOptions ) : Void;
-	@:overload( function( x : Float, y : Float ) : Void {} )
-	function scrollBy( ?options : ScrollToOptions ) : Void;
-	/** @throws DOMError */
-	function insertAdjacentHTML( position : String, text : String ) : Void;
-	/** @throws DOMError */
-	function querySelector( selectors : String ) : Element;
-	/** @throws DOMError */
-	function querySelectorAll( selectors : String ) : NodeList;
-	/** @throws DOMError */
-	function createShadowRoot() : ShadowRoot;
-	function getDestinationInsertionPoints() : NodeList;
-	function getAnimationPlayers() : Array<AnimationPlayer>;
-	function remove() : Void;
-	/** @throws DOMError */
-	function convertQuadFromNode( quad : DOMQuad, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<Element,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
-	/** @throws DOMError */
-	function convertRectFromNode( rect : DOMRectReadOnly, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<Element,Document>>, ?options : ConvertCoordinateOptions ) : DOMQuad;
-	/** @throws DOMError */
-	function convertPointFromNode( point : DOMPointInit, from : haxe.extern.EitherType<Text,haxe.extern.EitherType<Element,Document>>, ?options : ConvertCoordinateOptions ) : DOMPoint;
 }

+ 1 - 1
std/js/html/EmbedElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLEmbedElement")
-extern class EmbedElement extends HTMLElement
+extern class EmbedElement extends Element
 {
 	var src : String;
 	var type : String;

+ 1 - 1
std/js/html/FieldSetElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLFieldSetElement")
-extern class FieldSetElement extends HTMLElement
+extern class FieldSetElement extends Element
 {
 	var disabled : Bool;
 	var form(default,null) : FormElement;

+ 1 - 1
std/js/html/FontElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLFontElement")
-extern class FontElement extends HTMLElement
+extern class FontElement extends Element
 {
 	var color : String;
 	var face : String;

+ 1 - 1
std/js/html/FormElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLFormElement")
-extern class FormElement extends HTMLElement
+extern class FormElement extends Element
 {
 	var acceptCharset : String;
 	var action : String;

+ 1 - 1
std/js/html/FrameElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLFrameElement")
-extern class FrameElement extends HTMLElement
+extern class FrameElement extends Element
 {
 	var name : String;
 	var scrolling : String;

+ 1 - 1
std/js/html/FrameSetElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLFrameSetElement")
-extern class FrameSetElement extends HTMLElement
+extern class FrameSetElement extends Element
 {
 	var cols : String;
 	var rows : String;

+ 1 - 1
std/js/html/HRElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLHRElement")
-extern class HRElement extends HTMLElement
+extern class HRElement extends Element
 {
 	var align : String;
 	var color : String;

+ 3 - 3
std/js/html/HTMLCollection.hx

@@ -25,10 +25,10 @@
 package js.html;
 
 @:native("HTMLCollection")
-extern class HTMLCollection implements ArrayAccess<Element>
+extern class HTMLCollection implements ArrayAccess<DOMElement>
 {
 	var length(default,null) : Int;
 	
-	function item( index : Int ) : Element;
-	function namedItem( name : String ) : Element;
+	function item( index : Int ) : DOMElement;
+	function namedItem( name : String ) : DOMElement;
 }

+ 2 - 2
std/js/html/HTMLDocument.hx

@@ -29,7 +29,7 @@ extern class HTMLDocument extends Document
 {
 	var domain : String;
 	var cookie : String;
-	var body : HTMLElement;
+	var body : Element;
 	var head(default,null) : HeadElement;
 	var images(default,null) : HTMLCollection;
 	var embeds(default,null) : HTMLCollection;
@@ -193,7 +193,7 @@ extern class HTMLDocument extends Document
 	/** Shorthand for creating an HTML <br> element. */
 	inline function createBRElement() : BRElement { return cast createElement("br"); }
 	/** Shorthand for creating an HTML <html> element. */
-	inline function createHtmlElement() : HTMLHtmlElement { return cast createElement("html"); }
+	inline function createHtmlElement() : HtmlElement { return cast createElement("html"); }
 	/** Shorthand for creating an HTML <textarea> element. */
 	inline function createTextAreaElement() : TextAreaElement { return cast createElement("textarea"); }
 	/** Shorthand for creating an HTML <media> element. */

+ 0 - 61
std/js/html/HTMLElement.hx

@@ -1,61 +0,0 @@
-/*
- * Copyright (C)2005-2015 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-// This file is generated from mozilla/HTMLElement.webidl line 15:0. Do not edit!
-
-package js.html;
-
-@:native("HTMLElement")
-extern class HTMLElement extends Element
-{
-	var title : String;
-	var lang : String;
-	var dir : String;
-	var dataset(default,null) : DOMStringMap;
-	var itemScope : Bool;
-	var itemType(default,null) : DOMSettableTokenList;
-	var itemId : String;
-	var itemRef(default,null) : DOMSettableTokenList;
-	var itemProp(default,null) : DOMSettableTokenList;
-	var properties(default,null) : HTMLPropertiesCollection;
-	var itemValue : Dynamic;
-	var hidden : Bool;
-	var tabIndex : Int;
-	var accessKey : String;
-	var accessKeyLabel(default,null) : String;
-	var draggable : Bool;
-	var contentEditable : String;
-	var isContentEditable(default,null) : Bool;
-	var contextMenu(default,null) : MenuElement;
-	var spellcheck : Bool;
-	var offsetParent(default,null) : Element;
-	var offsetTop(default,null) : Int;
-	var offsetLeft(default,null) : Int;
-	var offsetWidth(default,null) : Int;
-	var offsetHeight(default,null) : Int;
-	
-	function click() : Void;
-	/** @throws DOMError */
-	function focus() : Void;
-	/** @throws DOMError */
-	function blur() : Void;
-}

+ 1 - 1
std/js/html/HTMLOptionsCollection.hx

@@ -30,7 +30,7 @@ extern class HTMLOptionsCollection extends HTMLCollection
 	var selectedIndex : Int;
 	
 	/** @throws DOMError */
-	function add( element : haxe.extern.EitherType<OptionElement,OptGroupElement>, ?before : haxe.extern.EitherType<HTMLElement,Int> ) : Void;
+	function add( element : haxe.extern.EitherType<OptionElement,OptGroupElement>, ?before : haxe.extern.EitherType<Element,Int> ) : Void;
 	/** @throws DOMError */
 	function remove( index : Int ) : Void;
 }

+ 1 - 1
std/js/html/HeadElement.hx

@@ -25,6 +25,6 @@
 package js.html;
 
 @:native("HTMLHeadElement")
-extern class HeadElement extends HTMLElement
+extern class HeadElement extends Element
 {
 }

+ 1 - 1
std/js/html/HeadingElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLHeadingElement")
-extern class HeadingElement extends HTMLElement
+extern class HeadingElement extends Element
 {
 	var align : String;
 	

+ 1 - 1
std/js/html/HitRegionOptions.hx

@@ -26,6 +26,6 @@ package js.html;
 
 typedef HitRegionOptions =
 {
-	@:optional var control : Element;
+	@:optional var control : DOMElement;
 	@:optional var id : String;
 }

+ 1 - 1
std/js/html/HTMLHtmlElement.hx → std/js/html/HtmlElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLHtmlElement")
-extern class HTMLHtmlElement extends HTMLElement
+extern class HtmlElement extends Element
 {
 	var version : String;
 	

+ 1 - 1
std/js/html/IFrameElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLIFrameElement")
-extern class IFrameElement extends HTMLElement
+extern class IFrameElement extends Element
 {
 	var src : String;
 	var srcdoc : String;

+ 1 - 1
std/js/html/ImageElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLImageElement")
-extern class ImageElement extends HTMLElement
+extern class ImageElement extends Element
 {
 	var alt : String;
 	var src : String;

+ 2 - 2
std/js/html/InputElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLInputElement")
-extern class InputElement extends HTMLElement
+extern class InputElement extends Element
 {
 	var accept : String;
 	var alt : String;
@@ -43,7 +43,7 @@ extern class InputElement extends HTMLElement
 	var formTarget : String;
 	var height : Int;
 	var indeterminate : Bool;
-	var list(default,null) : HTMLElement;
+	var list(default,null) : Element;
 	var max : String;
 	var maxLength : Int;
 	var min : String;

+ 1 - 1
std/js/html/LIElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLLIElement")
-extern class LIElement extends HTMLElement
+extern class LIElement extends Element
 {
 	var value : Int;
 	var type : String;

+ 2 - 2
std/js/html/LabelElement.hx

@@ -25,10 +25,10 @@
 package js.html;
 
 @:native("HTMLLabelElement")
-extern class LabelElement extends HTMLElement
+extern class LabelElement extends Element
 {
 	var form(default,null) : FormElement;
 	var htmlFor : String;
-	var control(default,null) : HTMLElement;
+	var control(default,null) : Element;
 	
 }

+ 1 - 1
std/js/html/LegendElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLLegendElement")
-extern class LegendElement extends HTMLElement
+extern class LegendElement extends Element
 {
 	var form(default,null) : FormElement;
 	var align : String;

+ 1 - 1
std/js/html/LinkElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLLinkElement")
-extern class LinkElement extends HTMLElement
+extern class LinkElement extends Element
 {
 	var disabled : Bool;
 	var href : String;

+ 1 - 1
std/js/html/MapElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLMapElement")
-extern class MapElement extends HTMLElement
+extern class MapElement extends Element
 {
 	var name : String;
 	var areas(default,null) : HTMLCollection;

+ 1 - 1
std/js/html/MediaElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLMediaElement")
-extern class MediaElement extends HTMLElement
+extern class MediaElement extends Element
 {
 	static inline var NETWORK_EMPTY : Int = 0;
 	static inline var NETWORK_IDLE : Int = 1;

+ 1 - 1
std/js/html/MenuElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLMenuElement")
-extern class MenuElement extends HTMLElement
+extern class MenuElement extends Element
 {
 	var type : String;
 	var label : String;

+ 1 - 1
std/js/html/MenuItemElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLMenuItemElement")
-extern class MenuItemElement extends HTMLElement
+extern class MenuItemElement extends Element
 {
 	var type : String;
 	var label : String;

+ 1 - 1
std/js/html/MetaElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLMetaElement")
-extern class MetaElement extends HTMLElement
+extern class MetaElement extends Element
 {
 	var name : String;
 	var httpEquiv : String;

+ 1 - 1
std/js/html/MeterElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLMeterElement")
-extern class MeterElement extends HTMLElement
+extern class MeterElement extends Element
 {
 	var value : Float;
 	var min : Float;

+ 1 - 1
std/js/html/ModElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLModElement")
-extern class ModElement extends HTMLElement
+extern class ModElement extends Element
 {
 	var cite : String;
 	var dateTime : String;

+ 1 - 1
std/js/html/Node.hx

@@ -51,7 +51,7 @@ extern class Node extends EventTarget
 	var baseURI(default,null) : String;
 	var ownerDocument(default,null) : Document;
 	var parentNode(default,null) : Node;
-	var parentElement(default,null) : Element;
+	var parentElement(default,null) : DOMElement;
 	var childNodes(default,null) : NodeList;
 	var firstChild(default,null) : Node;
 	var lastChild(default,null) : Node;

+ 1 - 1
std/js/html/OListElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLOListElement")
-extern class OListElement extends HTMLElement
+extern class OListElement extends Element
 {
 	var reversed : Bool;
 	var start : Int;

+ 1 - 1
std/js/html/ObjectElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLObjectElement")
-extern class ObjectElement extends HTMLElement
+extern class ObjectElement extends Element
 {
 	var data : String;
 	var type : String;

+ 1 - 1
std/js/html/OptGroupElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLOptGroupElement")
-extern class OptGroupElement extends HTMLElement
+extern class OptGroupElement extends Element
 {
 	var disabled : Bool;
 	var label : String;

+ 1 - 1
std/js/html/OptionElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLOptionElement")
-extern class OptionElement extends HTMLElement
+extern class OptionElement extends Element
 {
 	var disabled : Bool;
 	var form(default,null) : FormElement;

+ 1 - 1
std/js/html/OutputElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLOutputElement")
-extern class OutputElement extends HTMLElement
+extern class OutputElement extends Element
 {
 	var htmlFor(default,null) : DOMSettableTokenList;
 	var form(default,null) : FormElement;

+ 1 - 1
std/js/html/ParagraphElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLParagraphElement")
-extern class ParagraphElement extends HTMLElement
+extern class ParagraphElement extends Element
 {
 	var align : String;
 	

+ 1 - 1
std/js/html/ParamElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLParamElement")
-extern class ParamElement extends HTMLElement
+extern class ParamElement extends Element
 {
 	var name : String;
 	var value : String;

+ 1 - 1
std/js/html/PictureElement.hx

@@ -25,6 +25,6 @@
 package js.html;
 
 @:native("HTMLPictureElement")
-extern class PictureElement extends HTMLElement
+extern class PictureElement extends Element
 {
 }

+ 1 - 1
std/js/html/PreElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLPreElement")
-extern class PreElement extends HTMLElement
+extern class PreElement extends Element
 {
 	var width : Int;
 	

+ 1 - 1
std/js/html/ProgressElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLProgressElement")
-extern class ProgressElement extends HTMLElement
+extern class ProgressElement extends Element
 {
 	var value : Float;
 	var max : Float;

+ 1 - 1
std/js/html/QuoteElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLQuoteElement")
-extern class QuoteElement extends HTMLElement
+extern class QuoteElement extends Element
 {
 	var cite : String;
 	

+ 1 - 1
std/js/html/ScriptElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLScriptElement")
-extern class ScriptElement extends HTMLElement
+extern class ScriptElement extends Element
 {
 	var src : String;
 	var type : String;

+ 3 - 3
std/js/html/SelectElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLSelectElement")
-extern class SelectElement extends HTMLElement implements ArrayAccess<Element>
+extern class SelectElement extends Element implements ArrayAccess<DOMElement>
 {
 	var autofocus : Bool;
 	var disabled : Bool;
@@ -44,10 +44,10 @@ extern class SelectElement extends HTMLElement implements ArrayAccess<Element>
 	var validity(default,null) : ValidityState;
 	var validationMessage(default,null) : String;
 	
-	function item( index : Int ) : Element;
+	function item( index : Int ) : DOMElement;
 	function namedItem( name : String ) : OptionElement;
 	/** @throws DOMError */
-	function add( element : haxe.extern.EitherType<OptionElement,OptGroupElement>, ?before : haxe.extern.EitherType<HTMLElement,Int> ) : Void;
+	function add( element : haxe.extern.EitherType<OptionElement,OptGroupElement>, ?before : haxe.extern.EitherType<Element,Int> ) : Void;
 	function checkValidity() : Bool;
 	function setCustomValidity( error : String ) : Void;
 }

+ 1 - 1
std/js/html/ShadowElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLShadowElement")
-extern class ShadowElement extends HTMLElement
+extern class ShadowElement extends Element
 {
 	var olderShadowRoot(default,null) : ShadowRoot;
 	

+ 1 - 1
std/js/html/ShadowRoot.hx

@@ -28,7 +28,7 @@ package js.html;
 extern class ShadowRoot extends DocumentFragment
 {
 	var innerHTML : String;
-	var host(default,null) : Element;
+	var host(default,null) : DOMElement;
 	var olderShadowRoot(default,null) : ShadowRoot;
 	var applyAuthorStyles : Bool;
 	var styleSheets(default,null) : StyleSheetList;

+ 1 - 1
std/js/html/SourceElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLSourceElement")
-extern class SourceElement extends HTMLElement
+extern class SourceElement extends Element
 {
 	var src : String;
 	var type : String;

+ 1 - 1
std/js/html/SpanElement.hx

@@ -25,6 +25,6 @@
 package js.html;
 
 @:native("HTMLSpanElement")
-extern class SpanElement extends HTMLElement
+extern class SpanElement extends Element
 {
 }

+ 1 - 1
std/js/html/StyleElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLStyleElement")
-extern class StyleElement extends HTMLElement
+extern class StyleElement extends Element
 {
 	var disabled : Bool;
 	var media : String;

+ 1 - 1
std/js/html/TableCaptionElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLTableCaptionElement")
-extern class TableCaptionElement extends HTMLElement
+extern class TableCaptionElement extends Element
 {
 	var align : String;
 	

+ 1 - 1
std/js/html/TableCellElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLTableCellElement")
-extern class TableCellElement extends HTMLElement
+extern class TableCellElement extends Element
 {
 	var colSpan : Int;
 	var rowSpan : Int;

+ 1 - 1
std/js/html/TableColElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLTableColElement")
-extern class TableColElement extends HTMLElement
+extern class TableColElement extends Element
 {
 	var span : Int;
 	var align : String;

+ 6 - 6
std/js/html/TableElement.hx

@@ -25,7 +25,7 @@
 package js.html;
 
 @:native("HTMLTableElement")
-extern class TableElement extends HTMLElement
+extern class TableElement extends Element
 {
 	var caption : TableCaptionElement;
 	var tHead : TableSectionElement;
@@ -42,15 +42,15 @@ extern class TableElement extends HTMLElement
 	var cellPadding : String;
 	var cellSpacing : String;
 	
-	function createCaption() : HTMLElement;
+	function createCaption() : Element;
 	function deleteCaption() : Void;
-	function createTHead() : HTMLElement;
+	function createTHead() : Element;
 	function deleteTHead() : Void;
-	function createTFoot() : HTMLElement;
+	function createTFoot() : Element;
 	function deleteTFoot() : Void;
-	function createTBody() : HTMLElement;
+	function createTBody() : Element;
 	/** @throws DOMError */
-	function insertRow( ?index : Int = -1 ) : HTMLElement;
+	function insertRow( ?index : Int = -1 ) : Element;
 	/** @throws DOMError */
 	function deleteRow( index : Int ) : Void;
 }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä