Browse Source

revert abstract inline changes (problems with Vector on flash)

Simon Krajewski 11 years ago
parent
commit
692999944a
5 changed files with 4 additions and 8 deletions
  1. 0 1
      ast.ml
  2. 0 1
      common.ml
  3. 1 1
      type.ml
  4. 1 1
      typeload.ml
  5. 2 4
      typer.ml

+ 0 - 1
ast.ml

@@ -34,7 +34,6 @@ module Meta = struct
 		| Allow
 		| Annotation
 		| ArrayAccess
-		| AssignsThis
 		| Ast
 		| AutoBuild
 		| Bind

+ 0 - 1
common.ml

@@ -326,7 +326,6 @@ module MetaInfo = struct
 		| Allow -> ":allow",("Allows private access from package, type or field",[HasParam "Target path";UsedOnEither [TClass;TClassField]])
 		| Annotation -> ":annotation",("Annotation (@interface) definitions on -java-lib imports will be annotated with this metadata. Has no effect on types compiled by Haxe",[Platform Java; UsedOn TClass])
 		| ArrayAccess -> ":arrayAccess",("Allows [] access on an abstract",[UsedOnEither [TAbstract;TAbstractField]])
-		| AssignsThis -> ":assignsThis",("Internally used to mark abstract implementation fields which assign to this",[UsedOn TAbstractField;Internal])
 		| Ast -> ":ast",("Internally used to pass the AST source into the typed AST",[Internal])
 		| AutoBuild -> ":autoBuild",("Extends @:build metadata to all extending and implementing classes",[HasParam "Build macro call";UsedOn TClass])
 		| Bind -> ":bind",("Override Swf class declaration",[Platform Flash;UsedOn TClass])

+ 1 - 1
type.ml

@@ -1506,7 +1506,7 @@ let map_expr_type f ft fv e =
 		let v = try
 			let n = match v with
 				| FClosure _ -> raise Not_found
-				| FAnon f | FInstance (_,f) | FStatic (_,f) | FClosure (_,f) -> f.cf_name
+				| FAnon f | FInstance (_,f) | FStatic (_,f) -> f.cf_name
 				| FEnum (_,f) -> f.ef_name
 				| FDynamic n -> n
 			in

+ 1 - 1
typeload.ml

@@ -1655,7 +1655,7 @@ let init_class ctx c p context_init herits fields =
 		let extern = Meta.has Meta.Extern f.cff_meta || c.cl_extern in
 		let is_abstract,allow_inline =
 			match c.cl_kind, f.cff_kind with
-			| KAbstractImpl _, _ -> true,ctx.g.doinline || Meta.has Meta.Impl f.cff_meta || extern
+			| KAbstractImpl _, _ -> true,true
 			|_, FFun _ -> false,ctx.g.doinline || extern
 			| _ -> false,true
 		in

+ 2 - 4
typer.ml

@@ -502,7 +502,7 @@ let unify_min ctx el =
 let is_forced_inline c cf =
 	match c with
 	| Some { cl_extern = true } -> true
-	| Some { cl_kind = KAbstractImpl _ } -> Meta.has Meta.AssignsThis cf.cf_meta || Meta.has Meta.Extern cf.cf_meta
+	| Some { cl_kind = KAbstractImpl _ } -> true
 	| _ when Meta.has Meta.Extern cf.cf_meta -> true
 	| _ -> false
 
@@ -1013,9 +1013,7 @@ let rec type_ident_raise ?(imported_enums=true) ctx i p mode =
 		(match mode, ctx.curclass.cl_kind with
 		| MSet, KAbstractImpl _ ->
 			(match ctx.curfield.cf_kind with
-			| Method MethInline ->
-				if not (Meta.has Meta.AssignsThis ctx.curfield.cf_meta) then
-					ctx.curfield.cf_meta <- (Meta.AssignsThis,[],ctx.curfield.cf_pos) :: ctx.curfield.cf_meta;
+			| Method MethInline -> ()
 			| Method _ when ctx.curfield.cf_name = "_new" -> ()
 			| _ -> error "You can only modify 'this' inside an inline function" p);
 			AKExpr (get_this ctx p)