Unexpected parent construct

Discussion about the open-source Phalanger [?] project.

Unexpected parent construct

Postby davidbcn » October 16th, 2014, 6:38 pm

I just download lasta phalanger update and nothing is compiling anymore!

I am getting hunders of these:

Error 2756 Unexpected parent constructor call (such call is allowed only in the constructor of the class extending a CLR type ....\AbstractCachedClassLoader.php 49 13 WebApplication1

It showing 3,000 of these errores in the project, I guess it is throwing this error for every single function inside a class...
davidbcn
 
Posts: 87
Joined: September 10th, 2014, 3:07 am

Re: Unexpected parent construct

Postby Jakub Misek » October 16th, 2014, 6:42 pm

There was a change in determining constructor method; Can you send me a sample throwing this error please? We'll fix this asap.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Unexpected parent construct

Postby davidbcn » October 16th, 2014, 8:04 pm

Create a new project (VS2013) of type Phalanger - Web.

Copy this in index.php:

<?php
class DatabaseConnection_sqlsrv extends DatabaseConnection {
public function driver() {
return 'sqlsrv';
}
}
?>

Try to compile...
davidbcn
 
Posts: 87
Joined: September 10th, 2014, 3:07 am

Re: Unexpected parent construct

Postby Jakub Misek » October 16th, 2014, 9:02 pm

Thanks, I'll keep you informed in this thread.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Unexpected parent construct

Postby Jakub Misek » October 16th, 2014, 9:20 pm

This fixes compilation of class methods.

http://www.devsense.com/products/phalan ... ad/preview

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Unexpected parent construct

Postby davidbcn » October 16th, 2014, 11:07 pm

That was blazing fast! Thank you!

After updating:

Error 219 Internal error!
Please, report this bug via http://phalanger.codeplex.com/workitem/list/basic.
Additional information:
Value cannot be null.
Parameter name: meth
at System.Reflection.Emit.ILGenerator.Emit(OpCode opcode, MethodInfo meth)
at PHP.Core.Emit.ILEmitter.Emit(OpCode opcode, MethodInfo meth)
at PHP.Core.CodeGenerator.EmitDeclareLamdaFunction(MethodInfo info)
at PHP.Core.Compiler.AST.NodeCompilers.DirectFcnCallCompiler.EmitInlinedFunctionCall(CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.DirectFcnCallCompiler.Emit(DirectFcnCall node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ExpressionCompiler`1.PHP.Core.Compiler.AST.IExpressionCompiler.Emit(Expression node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ActualParamCompiler.Emit(ActualParam node, CodeGenerator codeGenerator, Boolean ensureChainWritable)
at PHP.Core.Compiler.AST.NodeCompilers.CallSignatureCompiler.EmitLibraryLoadArgument(CallSignature node, ILEmitter il, Int32 index, Object codeGenerator, ParameterInfo param)
at PHP.Core.Compiler.AST.CallSignatureHelpers.EmitLibraryLoadArgument(CallSignature node, ILEmitter il, Int32 index, Object codeGenerator, ParameterInfo param)
at PHP.Core.Emit.OverloadsBuilder.EmitMandatoryArgumentLoad(Int32 index, ParameterInfo param)
at PHP.Core.Emit.OverloadsBuilder.EmitOverloadCall(MethodInfo method, ParameterInfo[] ps, Int32 phpParamCount, IPlace scriptContext, IPlace rtVariables, IPlace namingContext, IPlace classContext, IPlace optArgs, IPlace selfRef, Boolean ignoringReturnValue)
at PHP.Core.Reflection.PhpLibraryFunction.EmitCall(CodeGenerator codeGenerator, String fallbackQualifiedName, CallSignature callSignature, IPlace instance, Boolean runtimeVisibilityCheck, Int32 overloadIndex, DType type, Span position, AccessType access, Boolean callVirt)
at PHP.Core.Compiler.AST.NodeCompilers.DirectFcnCallCompiler.Emit(DirectFcnCall node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ExpressionCompiler`1.PHP.Core.Compiler.AST.IExpressionCompiler.Emit(Expression node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ValueAssignExCompiler.EmitSourceValRead(ValueAssignEx node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ValueAssignExCompiler.Emit(AssignEx node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ExpressionCompiler`1.PHP.Core.Compiler.AST.IExpressionCompiler.Emit(Expression node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.ExpressionStmtCompiler.Emit(ExpressionStmt node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.StatementCompiler`1.PHP.Core.Compiler.AST.IStatementCompiler.Emit(Statement node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.StatementUtils.Emit(IEnumerable`1 statements, CodeGenerator codeGenerator)
at PHP.Core.CodeGenerator.EmitArgfullOverloadBody(PhpRoutine routine, IEnumerable`1 body, Span entirePosition, Int32 declarationBodyPosition)
at PHP.Core.Compiler.AST.NodeCompilers.MethodDeclCompiler.Emit(MethodDecl node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.TypeMemberDeclCompiler`1.PHP.Core.Compiler.AST.ITypeMemberDeclCompiler.Emit(TypeMemberDecl node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.TypeDeclCompiler.EmitDefinition(CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.TypeDeclCompiler.Emit(TypeDecl node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.StatementCompiler`1.PHP.Core.Compiler.AST.IStatementCompiler.Emit(Statement node, CodeGenerator codeGenerator)
at PHP.Core.Compiler.AST.NodeCompilers.GlobalCodeCompiler.Emit(GlobalCode ast, CodeGenerator codeGenerator)
at PHP.Core.Reflection.CompilationSourceUnit.Emit(CodeGenerator codeGenerator)
at PHP.Core.Reflection.InclusionGraphBuilder.EmitAllUnits(CodeGenerator codeGenerator)
at PHP.Core.Emit.ScriptAssemblyBuilder.CompileScripts(IEnumerable`1 sourceFiles, CompilationContext context)
at PHP.Core.Emit.ScriptAssemblyBuilder.Build(IEnumerable`1 sourceFiles, CompilationContext context)
at PHP.Core.ApplicationCompiler.Compile(ApplicationContext applicationContext, CompilerConfiguration config, ErrorSink errorSink, CompilationParameters ps)
-1 0 WebApplication1
davidbcn
 
Posts: 87
Joined: September 10th, 2014, 3:07 am

Re: Unexpected parent construct

Postby Jakub Misek » October 17th, 2014, 1:13 pm

Hi,

We've fixed compilation of create_function() and updated the preview version.

http://www.devsense.com/products/phalan ... ad/preview

Please let us know if there would be anything else.

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Unexpected parent construct

Postby davidbcn » October 17th, 2014, 3:19 pm

Still no luck, this project was compiling before..

Error 219 Internal error!
Please, report this bug via http://phalanger.codeplex.com/workitem/list/basic.
Additional information:
Method '__autoload#1' does not have a method body.
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at PHP.Core.Emit.ScriptBuilder.Bake()
at PHP.Core.Emit.MultiScriptAssemblyBuilder.EmitAndBakeHelpers()
at PHP.Core.Emit.PhpAssemblyBuilder.Save()
at PHP.Core.ApplicationCompilerManager.Finish(Boolean successful)
at PHP.Core.Emit.ScriptAssemblyBuilder.CompileScripts(IEnumerable`1 sourceFiles, CompilationContext context)
at PHP.Core.Emit.ScriptAssemblyBuilder.Build(IEnumerable`1 sourceFiles, CompilationContext context)
at PHP.Core.ApplicationCompiler.Compile(ApplicationContext applicationContext, CompilerConfiguration config, ErrorSink errorSink, CompilationParameters ps)
-1 0 WebApplication1
davidbcn
 
Posts: 87
Joined: September 10th, 2014, 3:07 am

Re: Unexpected parent construct

Postby Jakub Misek » October 19th, 2014, 12:44 pm

Hi,

There is an update containing latest Phalanger with conditional function declaration fix
http://www.devsense.com/products/phalan ... ad/preview

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 124 on September 25th, 2020, 6:57 am

Users browsing this forum: No registered users and 2 guests