No problem.  It was not obvious, and I don’t think I’ve ever seen that
pattern before.  That’s why I’m hoping you or Gordon know how to teach the
parser or reducer and other code how to handle this.  It looks like the
compiler sees the {} as a block and not an object literal.

-Alex

On 12/31/14, 5:06 AM, "Darrell Loverin" <darrell.love...@gmail.com> wrote:

>Agreed I see it now. Sorry for the bad info.
>
>-Darrell
>
>On Wednesday, December 31, 2014, Alex Harui <aha...@adobe.com> wrote:
>
>> Yeah, I had to read it twice, but I believe result is supposed to be
>> assigned to an Object with a property called “get” that points to a
>> function.  The {} after result is an Object literal.
>>
>> On 12/30/14, 8:03 PM, "Greg Dove" <greg.d...@gmail.com <javascript:;>>
>> wrote:
>>
>> >Darrell, isn't that "get" simply a field/property with a function
>>value?
>> >
>> >If the issue is with the get keyword as a property name, then the OP
>>could
>> >try using json-style field naming, with quotes:
>> >
>> >result =
>> > {
>> >    "get": function():Object
>> >     {
>> >        return JSON.parse(request.toString());
>> >     }
>> > };
>> >
>> >If the above works unimpeded then the issue is with the new compiler
>>not
>> >handling the keyword 'get' as a property name correctly (which it may
>>now
>> >no longer allow as I understand it is more strict in some cases).
>> >
>> >
>> >On Wed, Dec 31, 2014 at 4:31 PM, Darrell Loverin
>> ><darrell.love...@gmail.com <javascript:;>>
>> >wrote:
>> >
>> >> >                {
>> >> >                    // result =
>> >> >                    // {
>> >> >                    //     get: function():Object
>> >> >                    //     {
>> >> >                    //         return
>>JSON.parse(request.toString());
>> >> >                    //     }
>> >> >                    // };
>> >>
>> >> To further isolate the problem I would try removing the "get:" label
>> >>from
>> >> the anonymous function to see it that compiles.  I'm assuming this
>>code
>> >> works in the old compiler.
>> >>
>> >>
>> >> -Darrell
>> >>
>> >> On Tue, Dec 30, 2014 at 11:40 AM, Alex Harui <aha...@adobe.com
>> <javascript:;>> wrote:
>> >>
>> >> > Hi, thanks for finding that.
>> >> >
>> >> > I forgot to ask you to use [FALCON] in the subject of these
>> >>discussions
>> >> (I
>> >> > changed the subject).  Things like errors in the ABC subsystem
>>might
>> >> > require advice from Gordon or Darrell.
>> >> >
>> >> > Thanks,
>> >> > -Alex
>> >> >
>> >> > On 12/30/14, 2:02 AM, "Left Right" <olegsivo...@gmail.com
>> <javascript:;>> wrote:
>> >> >
>> >> > >I was able to find the error:
>> >> > >
>> >> > >        private function loadDescriptionBytes(request:ByteArray,
>> >> > >            success:Function, failure:Function):void
>> >> > >        {
>> >> > >            var result:Object;
>> >> > >            try
>> >> > >            {
>> >> > >                try
>> >> > >                {
>> >> > >                    result = request.readObject();
>> >> > >                    if (!this.tryCreateDescription(result,
>>success,
>> >> > >failure))
>> >> > >                    {
>> >> > >                        request.position = 0;
>> >> > >                        throw new Error();
>> >> > >                    }
>> >> > >                }
>> >> > >                catch (error:Error)
>> >> > >                {
>> >> > >                    // result =
>> >> > >                    // {
>> >> > >                    //     get: function():Object
>> >> > >                    //     {
>> >> > >                    //         return
>>JSON.parse(request.toString());
>> >> > >                    //     }
>> >> > >                    // };
>> >> > >                    if (!this.tryCreateDescription(result,
>>success,
>> >> > >failure))
>> >> > >                    {
>> >> > >                        request.position = 0;
>> >> > >                        throw new Error();
>> >> > >                    }
>> >> > >                }
>> >> > >            }
>> >> > >            catch (error:Error)
>> >> > >            {
>> >> > >                var loader:Loader = new Loader();
>> >> > >                loader.contentLoaderInfo.addEventListener(
>> >> > >                    Event.COMPLETE, this.loaderCompleteHandler);
>> >> > >                this._success = success;
>> >> > >                this._failure = failure;
>> >> > >                loader.loadBytes(request,
>> >> > >                    new LoaderContext(false,
>> >> > >ApplicationDomain.currentDomain));
>> >> > >            }
>> >> > >        }
>> >> > >
>> >> > >With the above commented, the compilation succeeds.
>> >> > >
>> >> > >On Tue, Dec 30, 2014 at 11:23 AM, Left Right
>><olegsivo...@gmail.com
>> <javascript:;>>
>> >> > >wrote:
>> >> > >>     [mxmlc]
>> >> >
>> 
>>>>>>/home/wvxvw/workspace/hx-player/player/as3/com/powtoon/ui/Stylable.as
>> >> > >>     [mxmlc] Error: Internal error in ABC generator subsystem,
>>when
>> >> > >> generating code for:
>> >> > >>
>> >>/home/wvxvw/workspace/hx-player/player/as3/com/powtoon/ui/Stylable.as:
>> >> > >> java.lang.IllegalArgumentException: Label
>> >> > >> org.apache.flex.abc.semantics.Label@2bd23245 => 0 was
>>referenced,
>> >>but
>> >> > >> never defined.
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.abc.semantics.MethodBodyInfo.getBlock(MethodBodyInfo.
>>>>>>ja
>> >>>>va
>> >> > >>:312)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.abc.semantics.MethodBodyInfo.getBlock(MethodBodyInfo.
>>>>>>ja
>> >>>>va
>> >> > >>:293)
>> >> > >>     [mxmlc] at
>> >> >
>> 
>>>>>>org.apache.flex.abc.ABCEmitter.emitExceptionInfo(ABCEmitter.java:974)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.abc.ABCEmitter.emitCode(ABCEmitter.java:805)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.abc.ABCEmitter.access$1100(ABCEmitter.java:144)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.abc.ABCEmitter$EmitterMethodInfoVisitor.visitEnd(ABCE
>>>>>>mi
>> >>>>tt
>> >> > >>er.java:1937)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateMet
>>>>>>ho
>> >>>>dB
>> >> > >>odyForFunction(ABCGenerator.java:349)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateFun
>>>>>>ct
>> >>>>io
>> >> > >>n(ABCGenerator.java:262)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> >>>>
>> org.apache.flex.compiler.internal.as.codegen.ClassDirectiveProcessor.de
>> >>>>cl
>> >> > >>areFunction(ClassDirectiveProcessor.java:782)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.proce
>>>>>>ss
>> >>>>No
>> >> > >>de(DirectiveProcessor.java:214)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.trave
>>>>>>rs
>> >>>>e(
>> >> > >>DirectiveProcessor.java:188)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor
>>>>>>.d
>> >>>>ec
>> >> > >>lareClass(GlobalDirectiveProcessor.java:423)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.proce
>>>>>>ss
>> >>>>No
>> >> > >>de(DirectiveProcessor.java:206)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.trave
>>>>>>rs
>> >>>>e(
>> >> > >>DirectiveProcessor.java:188)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor
>>>>>>.d
>> >>>>ec
>> >> > >>larePackage(GlobalDirectiveProcessor.java:449)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.proce
>>>>>>ss
>> >>>>No
>> >> > >>de(DirectiveProcessor.java:223)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.trave
>>>>>>rs
>> >>>>e(
>> >> > >>DirectiveProcessor.java:188)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generate(AB
>>>>>>CG
>> >>>>en
>> >> > >>erator.java:122)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.ASCompilationUnit.handleABCBy
>>>>>>te
>> >>>>sR
>> >> > >>equest(ASCompilationUnit.java:477)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.CompilationUnitBase.processAB
>>>>>>CB
>> >>>>yt
>> >> > >>esRequest(CompilationUnitBase.java:866)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.CompilationUnitBase.access$30
>>>>>>0(
>> >>>>Co
>> >> > >>mpilationUnitBase.java:107)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(
>>>>>>Co
>> >>>>mp
>> >> > >>ilationUnitBase.java:309)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(
>>>>>>Co
>> >>>>mp
>> >> > >>ilationUnitBase.java:305)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(
>>>>>>Re
>> >>>>qu
>> >> > >>estMaker.java:228)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(
>>>>>>Re
>> >>>>qu
>> >> > >>estMaker.java:222)
>> >> > >>     [mxmlc] at
>> >> java.util.concurrent.FutureTask.run(FutureTask.java:262)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExec
>>>>>>ut
>> >>>>io
>> >> > >>n(ThreadPoolExecutor.java:2025)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.jav
>>>>>>a:
>> >>>>82
>> >> > >>1)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.ja
>>>>>>va
>> >>>>:1
>> >> > >>372)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorS
>>>>>>er
>> >>>>vi
>> >> > >>ce.java:132)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.requests.RequestMaker.getRequ
>>>>>>es
>> >>>>t(
>> >> > >>RequestMaker.java:188)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.CompilationUnitBase.getABCByt
>>>>>>es
>> >>>>Re
>> >> > >>quest(CompilationUnitBase.java:614)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.units.CompilationUnitBase.startBuil
>>>>>>dA
>> >>>>sy
>> >> > >>nc(CompilationUnitBase.java:1067)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.targets.Target.getDependentCompilat
>>>>>>io
>> >>>>nU
>> >> > >>nits(Target.java:359)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.targets.Target.findAllCompilationUn
>>>>>>it
>> >>>>sT
>> >> > >>oLink(Target.java:159)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.targets.Target.buildAllCompilationU
>>>>>>ni
>> >>>>ts
>> >> > >>(Target.java:297)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.targets.Target.getBuiltCompilationU
>>>>>>ni
>> >>>>tS
>> >> > >>et(Target.java:306)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.internal.targets.SWFTarget.build(SWFTarget.j
>>>>>>av
>> >>>>a:
>> >> > >>228)
>> >> > >>     [mxmlc] at
>> >> > 
>>>>org.apache.flex.compiler.clients.MXMLC.buildSWFModel(MXMLC.java:760)
>> >> > >>     [mxmlc] at
>> >> > 
>>>>org.apache.flex.compiler.clients.MXMLC.buildArtifact(MXMLC.java:746)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.compiler.clients.MXMLC.compile(MXMLC.java:625)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.compiler.clients.MXMLC.compile(MXMLC.java:611)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.compiler.clients.MXMLC.mainNoExit(MXMLC.java:230)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.compiler.clients.MXMLC.mainNoExit(MXMLC.java:198)
>> >> > >>     [mxmlc] at
>> >> >
>> 
>>>>>>org.apache.flex.compiler.clients.MXMLC.staticMainNoExit(MXMLC.java:15
>>>>>>9)
>> >> > >>     [mxmlc] at
>>sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >> > >>Method)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>>>>>>ja
>> >>>>va
>> >> > >>:57)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>>>>>so
>> >>>>rI
>> >> > >>mpl.java:43)
>> >> > >>     [mxmlc] at java.lang.reflect.Method.invoke(Method.java:606)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.flex.compiler.ant.FlexTask.executeInProcess(FlexTask.java:
>>>>>>31
>> >>>>0)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.flex.compiler.ant.FlexTask.execute(FlexTask.java:261)
>> >> > >>     [mxmlc] at
>> >> > 
>>>>org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>> >> > >>     [mxmlc] at
>>sun.reflect.GeneratedMethodAccessor4.invoke(Unknown
>> >> > >>Source)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>>>>>so
>> >>>>rI
>> >> > >>mpl.java:43)
>> >> > >>     [mxmlc] at java.lang.reflect.Method.invoke(Method.java:606)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
>>>>>>a:
>> >>>>10
>> >> > >>6)
>> >> > >>     [mxmlc] at org.apache.tools.ant.Task.perform(Task.java:348)
>> >> > >>     [mxmlc] at
>>org.apache.tools.ant.Target.execute(Target.java:392)
>> >> > >>     [mxmlc] at
>> >> org.apache.tools.ant.Target.performTasks(Target.java:413)
>> >> > >>     [mxmlc] at
>> >> > 
>>>>org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.tools.ant.Project.executeTarget(Project.java:1368)
>> >> > >>     [mxmlc] at
>> >> >
>> >>
>> 
>>>>>>org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
>>>>>>cu
>> >>>>to
>> >> > >>r.java:41)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.tools.ant.Project.executeTargets(Project.java:1251)
>> >> > >>     [mxmlc] at org.apache.tools.ant.Main.runBuild(Main.java:811)
>> >> > >>     [mxmlc] at org.apache.tools.ant.Main.startAnt(Main.java:217)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>> >> > >>     [mxmlc] at
>> >> > >>org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
>> >> > >>
>> >> > >> I'm also attaching the source for which this error was
>>generated.
>> >>If
>> >> > >> this won't be enough, (there are some dependencies, although
>>it's
>> >> > >> possible to replace them by dummies), I'll provide a complete
>> >>example
>> >> > >> (the source code is not open, so I'd rather not share too much
>>of
>> >>it).
>> >> > >>
>> >> > >> Thanks!
>> >> >
>> >> >
>> >>
>>
>>

Reply via email to