kripken/emscripten — Issue #92: TypeError: Cannot read property 'text' of undefined
Author: jterrace
Created: 2011-10-11 22:36:20+00:00
State: open

I'm getting this error:

``
// Processing item for llvm line 806442
intertyper.js:622: TypeError: Cannot read property 'text' of undefined
while (['@', '%'].indexOf(item.tokens[2].text[0]) == -1 && !(item.tokens[2
^
TypeError: Cannot read property 'text' of undefined
at Object.makeCall (intertyper.js:622:45)
at Object.processItem (intertyper.js:662:29)
at Object.process (framework.js:155:26)
at framework.js:104:25
at Array.forEach (native)
at Object.solve (framework.js:92:27)
at intertyper (intertyper.js:907:20)
at JSify (jsifier.js:74:30)
at /disk/local/jterrace/emscripten/src/compiler.js:84:1
``

This is using the latest llvm-svn branch. The llvm line numbers in that area:
``
806438	cond.end: ; preds = %cond.false, %cond.true
806439	call void @llvm.dbg.declare(metadata !252, metadata !1015927), !dbg !1015928
806440	%1 = load %"class.js::Vector.12.12182"** %v.addr, !dbg !1015929
806441	%2 = bitcast %"class.js::Vector.12.12182"* %1 to %"class.js::SystemAllocPolicy"*, !dbg !1015929
806442	%3 = load i32* %newcap.addr, align 4, !dbg !1015929
806443	%mul = mul i32 %3, 8, !dbg !1015929
806444	%call1 = call i8* @_ZN2js17SystemAllocPolicy7malloc_Ej(%"class.js::SystemAllocPolicy"* %2, i32 %mul), !dbg !1015929
806445	%4 = bitcast i8* %call1 to %"struct.JSC::Yarr::BeginChar"*, !dbg !1015929
806446	store %"struct.JSC::Yarr::BeginChar"* %4, %"struct.JSC::Yarr::BeginChar"** %newbuf, align 4, !dbg !1015929
806447	%5 = load %"struct.JSC::Yarr::BeginChar"** %newbuf, align 4, !dbg !1015930
806448	%tobool = icmp ne %"struct.JSC::Yarr::BeginChar"* %5, null, !dbg !1015930
806449	br i1 %tobool, label %if.end, label %if.then, !dbg !1015930
``