royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: [royale-compiler] 02/02: try caching some other things to speed up the compiler
Date Fri, 30 Mar 2018 16:55:12 GMT
All is working now
thanks! :)

2018-03-30 17:58 GMT+02:00 Alex Harui <aharui@adobe.com.invalid>:

> Hi Piotr,
>
> The compiler build passed, but then it can't build the framework.  I'm
> looking into it.
>
> -Alex
>
> On 3/30/18, 2:22 AM, "Piotr Zarzycki" <piotrzarzycki21@gmail.com> wrote:
>
> >Hi Carlos,
> >
> >On builds.a.o build pass without the problem on develop [1]
> >
> >[1]
> >https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fbuilds.ap
> >ache.org%2Fjob%2Froyale-compiler%2F274%2F&data=02%7C01%7Caharui%
> 40adobe.co
> >m%7C9712013c0ced44c5003408d5961fbb1d%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C
> >0%7C0%7C636579985398096771&sdata=mPVbQW4vbz446Eim2YEizn8e9P4Dtx
> coLAUi%2B9E
> >L3og%3D&reserved=0
> >
> >Thanks,
> >Piotr
> >
> >2018-03-30 10:17 GMT+02:00 Carlos Rovira <carlosrovira@apache.org>:
> >
> >> Hi Alex,
> >>
> >> the problem is only with the latest (caching) . The other one works ok.
> >> thanks
> >>
> >> 2018-03-30 10:06 GMT+02:00 Carlos Rovira <carlosrovira@apache.org>:
> >>
> >> > Hi Alex,
> >> >
> >> > the two latest commits in compiler is making projects not compile (at
> >> > least in Jewel branch). I'll reset my index below this two commits
> >>until
> >> > you get that solved
> >> >
> >> > thanks
> >> >
> >> >
> >> >
> >> > 2018-03-30 9:08 GMT+02:00 <aharui@apache.org>:
> >> >
> >> >> This is an automated email from the ASF dual-hosted git repository.
> >> >>
> >> >> aharui pushed a commit to branch develop
> >> >> in repository
> >>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgitbox.a
> >>pache.org%2Frepos%2Fasf%2Froyale-compiler.git&data=02%
> 7C01%7Caharui%40ado
> >>be.com%7C9712013c0ced44c5003408d5961fbb1d%7Cfa7b1b5a7b34438794aed2c178de
> c
> >>ee1%7C0%7C0%7C636579985398096771&sdata=PsiNItK10CLu0F9Hg3Hguj%
> 2F0nxTqBAkx
> >>E%2F5fnQl%2FPXQ%3D&reserved=0
> >> >>
> >> >> commit 52509ab663ffda8808eca6598eef59275e6ee37c
> >> >> Author: Alex Harui <aharui@apache.org>
> >> >> AuthorDate: Fri Mar 30 00:01:44 2018 -0700
> >> >>
> >> >>     try caching some other things to speed up the compiler
> >> >> ---
> >> >>  .../internal/definitions/ClassDefinitionBase.java  | 56
> >> >> ++++++++++++----------
> >> >>  .../internal/definitions/DefinitionBase.java       |  8 +++-
> >> >>  2 files changed, 39 insertions(+), 25 deletions(-)
> >> >>
> >> >> diff --git
> >>a/compiler/src/main/java/org/apache/royale/compiler/internal
> >> >> /definitions/ClassDefinitionBase.java b/compiler/src/main/java/org/a
> >> >> pache/royale/compiler/internal/definitions/ClassDefinitionBase.java
> >> >> index de73e9b..de8cfe1 100644
> >> >> --- a/compiler/src/main/java/org/apache/royale/compiler/internal
> >> >> /definitions/ClassDefinitionBase.java
> >> >> +++ b/compiler/src/main/java/org/apache/royale/compiler/internal
> >> >> /definitions/ClassDefinitionBase.java
> >> >> @@ -414,6 +414,8 @@ public abstract class ClassDefinitionBase extends
> >> >> TypeDefinitionBase implements
> >> >>          return new InterfaceDefinition.InterfaceIterator(this,
> >> project,
> >> >> null);
> >> >>      }
> >> >>
> >> >> +    private ArrayList<IDefinition> baseDefinitions = null;
> >> >> +
> >> >>      @Override
> >> >>      public boolean isInstanceOf(final ITypeDefinition type,
> >> >> ICompilerProject project)
> >> >>      {
> >> >> @@ -423,35 +425,41 @@ public abstract class ClassDefinitionBase
> >>extends
> >> >> TypeDefinitionBase implements
> >> >>
> >> >>          if (type instanceof IClassDefinition)
> >> >>          {
> >> >> -            // We're trying to determine whether this class
> >> >> -            // is derived from a specified class ('type').
> >> >> -            // Iterate the superclass chain looking for 'type'.
> >> >> -            Iterator<IClassDefinition> iter = classIterator(project,
> >> >> false);
> >> >> -            while (iter.hasNext())
> >> >> -            {
> >> >> -                IClassDefinition cls = iter.next();
> >> >> -                if (cls == type)
> >> >> -                    return true;
> >> >> -            }
> >> >> -            return false;
> >> >> +               if (baseDefinitions == null)
> >> >> +               {
> >> >> +                       baseDefinitions = new
> >>ArrayList<IDefinition>();
> >> >> +
> >> >> +                   // We're trying to determine whether this class
> >> >> +                   // is derived from a specified class ('type').
> >> >> +                   // Iterate the superclass chain looking for
> >>'type'.
> >> >> +                   Iterator<IClassDefinition> iter =
> >> >> classIterator(project, false);
> >> >> +                   while (iter.hasNext())
> >> >> +                   {
> >> >> +                       IClassDefinition cls = iter.next();
> >> >> +                       baseDefinitions.add(cls);
> >> >> +                   }
> >> >> +               }
> >> >>          }
> >> >>          else if (type instanceof IInterfaceDefinition)
> >> >>          {
> >> >> -            // We're trying to determine whether this class
> >> >> -            // implements a specified interface ('type').
> >> >> -            // Iterate all of the interfaces that this class
> >> implements,
> >> >> -            // looking for 'type'.
> >> >> -            Iterator<IInterfaceDefinition> iter =
> >> >> interfaceIterator(project);
> >> >> -            while (iter.hasNext())
> >> >> -            {
> >> >> -                IInterfaceDefinition intf = iter.next();
> >> >> -                if (intf == type)
> >> >> -                    return true;
> >> >> -            }
> >> >> -            return false;
> >> >> +               if (baseDefinitions == null)
> >> >> +               {
> >> >> +                       baseDefinitions = new
> >>ArrayList<IDefinition>();
> >> >> +
> >> >> +                   // We're trying to determine whether this class
> >> >> +                   // implements a specified interface ('type').
> >> >> +                   // Iterate all of the interfaces that this class
> >> >> implements,
> >> >> +                   // looking for 'type'.
> >> >> +                   Iterator<IInterfaceDefinition> iter =
> >> >> interfaceIterator(project);
> >> >> +                   while (iter.hasNext())
> >> >> +                   {
> >> >> +                       IInterfaceDefinition intf = iter.next();
> >> >> +                       baseDefinitions.add(intf);
> >> >> +                   }
> >> >> +               }
> >> >>          }
> >> >>
> >> >> -        return false;
> >> >> +       return baseDefinitions.contains(type);
> >> >>      }
> >> >>
> >> >>      @Override
> >> >> diff --git
> >>a/compiler/src/main/java/org/apache/royale/compiler/internal
> >> >> /definitions/DefinitionBase.java b/compiler/src/main/java/org/a
> >> >> pache/royale/compiler/internal/definitions/DefinitionBase.java
> >> >> index 61fb92a..0626789 100644
> >> >> --- a/compiler/src/main/java/org/apache/royale/compiler/internal
> >> >> /definitions/DefinitionBase.java
> >> >> +++ b/compiler/src/main/java/org/apache/royale/compiler/internal
> >> >> /definitions/DefinitionBase.java
> >> >> @@ -166,6 +166,8 @@ public abstract class DefinitionBase implements
> >> >> IDocumentableDefinition, IDefini
> >> >>
> >> >>      private int absoluteNameStart = 0;
> >> >>      private int absoluteNameEnd = 0;
> >> >> +
> >> >> +    private IDefinition parentDef = null;
> >> >>
> >> >>      /**
> >> >>       * Called by {@code MXMLScopeBuilder} when building definitions
> >> from
> >> >> @@ -240,6 +242,9 @@ public abstract class DefinitionBase implements
> >> >> IDocumentableDefinition, IDefini
> >> >>      @Override
> >> >>      public IDefinition getParent()
> >> >>      {
> >> >> +       if (parentDef != null)
> >> >> +               return parentDef;
> >> >> +
> >> >>          IASScope scope = getContainingScope();
> >> >>
> >> >>          // Walk up the scope chain until we find a scope that has
> >> >> @@ -251,7 +256,8 @@ public abstract class DefinitionBase implements
> >> >> IDocumentableDefinition, IDefini
> >> >>          while ((scope != null) && (scope.getDefinition() ==
null))
> >> >>              scope = scope.getContainingScope();
> >> >>
> >> >> -        return scope != null ? scope.getDefinition() : null;
> >> >> +        parentDef = scope != null ? scope.getDefinition() : null;
> >> >> +        return parentDef;
> >> >>      }
> >> >>
> >> >>      @Override
> >> >>
> >> >> --
> >> >> To stop receiving notification emails like this one, please contact
> >> >> aharui@apache.org.
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Carlos Rovira
> >> >
> >>https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%
> >>2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%
> 7C9712013c0ced44c5003408
> >>d5961fbb1d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C63657998539809677
> >>1&sdata=thDk0gFChf36B6RHmAYllwUHU4ss6HwoZnSfvLMIcxw%3D&reserved=0
> >> >
> >> >
> >>
> >>
> >> --
> >> Carlos Rovira
> >>
> >>https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%
> >>2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%
> 7C9712013c0ced44c5003408
> >>d5961fbb1d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C63657998539809677
> >>1&sdata=thDk0gFChf36B6RHmAYllwUHU4ss6HwoZnSfvLMIcxw%3D&reserved=0
> >>
> >
> >
> >
> >--
> >
> >Piotr Zarzycki
> >
> >Patreon:
> >*https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.patr
> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%
> 7C9712013c0ced44
> >c5003408d5961fbb1d%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365799853
> >98096771&sdata=Jw4Ia%2FeSTkViNxiNN9AaVaOOYpEYTuxMBv
> dJpwfrXLw%3D&reserved=0
> ><https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.patr
> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%
> 7C9712013c0ced44
> >c5003408d5961fbb1d%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365799853
> >98096771&sdata=Jw4Ia%2FeSTkViNxiNN9AaVaOOYpEYTuxMBv
> dJpwfrXLw%3D&reserved=0
> >>*
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message