From 01ee3de96dcae707fb8fee28e93af0515519c603 Mon Sep 17 00:00:00 2001 From: Szabolcs Berecz Date: Sun, 29 Jan 2012 01:24:28 +0100 Subject: replace methods containing a synchronized body with synchronized methods The following: def f = synchronized { ... } will be rewritten to: def f = ... which is then emitted to the classfile with the synchronized flag set. Inlining of such transformed methods are disabled for now This transformation is not done on methods defined in a trait. --- src/library/scala/annotation/synchronized.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/library/scala/annotation/synchronized.scala (limited to 'src/library') diff --git a/src/library/scala/annotation/synchronized.scala b/src/library/scala/annotation/synchronized.scala new file mode 100644 index 0000000000..9470c7173c --- /dev/null +++ b/src/library/scala/annotation/synchronized.scala @@ -0,0 +1,15 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +package scala.annotation + +/** + * If this annotation is present on a method, the synchronized flag will be emitted. + * FIXME This should be internal to the compiler + */ +private[scala] class synchronized extends StaticAnnotation -- cgit v1.2.3