flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Bruin <e...@ixsoftware.nl>
Subject Re: [4/5] git commit: [flex-falcon] [refs/heads/develop] - Fix uncaught exception
Date Wed, 01 Jul 2015 17:18:02 GMT
>
> Is it this that is creating an NPE in TypeScope ??
>

I got an exception, traced it to TypeScope, made a minimal intervention
(null check) and the exception went away.


> I'm curious here because IIUC, hiding an exception there can have very bad
> side effects, for example make the compiler to accept classes with no
> import type.
>

The exception I got wasn't caught anywhere in the stack. I made it all the
way out. Can't imagine the compiler 'relying' on an uncaught exception...

Anyway, I don't care all that much, and I might be wrong, so feel free
(to ask me) to revert.

EdB




> Frédéric THOMAS
>
>
> ----------------------------------------
> > From: erik@ixsoftware.nl
> > Date: Wed, 1 Jul 2015 18:48:24 +0200
> > Subject: Re: [4/5] git commit: [flex-falcon] [refs/heads/develop] - Fix
> uncaught exception
> > To: dev@flex.apache.org
> >
> > I made the USMapCoords a separate class, as the FlexJS emitter isn't set
> up
> > to emit two 'exportSymbols' statements per JS file, even though the file
> > might have two classes. Anyway, that didn't help much getting the release
> > version working, but I figured that any use case is a proper use case,
> so I
> > made the exception go away anyway ;-)
> >
> > EdB
> >
> >
> >
> > On Wed, Jul 1, 2015 at 6:17 PM, Frédéric THOMAS <webdoublefx@hotmail.com
> >
> > wrote:
> >
> >> I fixed the imports already, and I'm about to give a try to write a new
> >> compiler pass for it in replacement of the fix, it might be that in the
> >> current fix, I didn't catch all the cases but it was working fine for
> all
> >> the 3 existing externs we have, can you tell me what have you change
> before
> >> this exception has been raised ?
> >>
> >> Thanks,
> >> Frédéric THOMAS
> >>
> >>
> >> ----------------------------------------
> >>> From: erikdebruin@apache.org
> >>> To: commits@flex.apache.org
> >>> Date: Wed, 1 Jul 2015 15:46:37 +0000
> >>> Subject: [4/5] git commit: [flex-falcon] [refs/heads/develop] - Fix
> >> uncaught exception
> >>>
> >>> Fix uncaught exception
> >>>
> >>> Found this one while trying to compile a modified version of Fred's
> >> JQuery externs example. I know next to nothing about Falcon, so if more
> >> enlightened folks can trace this back to the root cause, that would be
> >> lovely :-)
> >>>
> >>> Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>
> >>>
> >>>
> >>> Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
> >>> Commit:
> >> http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/fe8d7046
> >>> Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/fe8d7046
> >>> Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/fe8d7046
> >>>
> >>> Branch: refs/heads/develop
> >>> Commit: fe8d704616c8b5b9059703ebd4c9ec31d7b63747
> >>> Parents: 099263d
> >>> Author: Erik de Bruin <erik@ixsoftware.nl>
> >>> Authored: Wed Jul 1 17:43:19 2015 +0200
> >>> Committer: Erik de Bruin <erik@ixsoftware.nl>
> >>> Committed: Wed Jul 1 17:43:19 2015 +0200
> >>>
> >>> ----------------------------------------------------------------------
> >>> .../src/org/apache/flex/compiler/internal/scopes/TypeScope.java | 4
> ++++
> >>> 1 file changed, 4 insertions(+)
> >>> ----------------------------------------------------------------------
> >>>
> >>>
> >>>
> >>
> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fe8d7046/compiler/src/org/apache/flex/compiler/internal/scopes/TypeScope.java
> >>> ----------------------------------------------------------------------
> >>> diff --git
> >> a/compiler/src/org/apache/flex/compiler/internal/scopes/TypeScope.java
> >> b/compiler/src/org/apache/flex/compiler/internal/scopes/TypeScope.java
> >>> index 4e49e9f..8723fe2 100644
> >>> ---
> >> a/compiler/src/org/apache/flex/compiler/internal/scopes/TypeScope.java
> >>> +++
> >> b/compiler/src/org/apache/flex/compiler/internal/scopes/TypeScope.java
> >>> @@ -341,6 +341,10 @@ public class TypeScope extends ASScope
> >>> Collection<IDefinition> sDefs = new
> >> FilteredCollection<IDefinition>(STATIC_ONLY_PREDICATE, defs);
> >>> for (ITypeDefinition type : owningType.staticTypeIterable(project,
> >> false))
> >>> {
> >>> + if (type == null)
> >>> + {
> >>> + continue;
> >>> + }
> >>> ASScope typeScope = (ASScope)type.getContainedScope();
> >>> typeScope.getLocalProperty(project,
> >>> // Only lookup static properties in this scope - for any inherited
> >> scopes, we should lookup instance properties
> >>>
> >>
> >>
> >
> >
> >
> > --
> > Ix Multimedia Software
> >
> > Jan Luykenstraat 27
> > 3521 VB Utrecht
> >
> > T. 06-51952295
> > I. www.ixsoftware.nl
>
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

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