Status: Accepted Owner: mikhail.naganov Labels: Type-Bug Priority-High
New issue 1732 by mikhail.naganov: Ridiculously incorrect function name inference
http://code.google.com/p/v8/issues/detail?id=1732 In the following snippet (bug.js): var Foo = function(){ }(); var Bar = function(msg){ this.message = msg; } the anonymous function assigned to Foo is named "Bar.message": ./shell_g --print-ast --nolazy bug.js *** Generate code for user-defined function: 0xb082d9 <String[0]: > *** --- AST --- FUNC . NAME "" . INFERRED NAME "" . DECLS . . VAR (mode = DYNAMIC_GLOBAL) "Foo" . . VAR (mode = DYNAMIC_GLOBAL) "Bar" . BLOCK INIT . . CALL RUNTIME InitializeVarGlobal . . . LITERAL "Foo" . . . LITERAL 0 . . . CALL . . . . FUNC LITERAL . . . . . NAME . . . . . INFERRED NAME Bar.message . BLOCK INIT . . CALL RUNTIME InitializeVarGlobal . . . LITERAL "Bar" . . . LITERAL 0 . . . FUNC LITERAL . . . . NAME . . . . INFERRED NAME Bar . . . . PARAMS . . . . . VAR (mode = VAR) "msg" -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
