| Issue 134: | inline bug | |
| 1 person starred this issue and may be notified of changes. | Back to list |
haxelib install polygonal
then compile this class (haXe from svn):
class Main {
static function main() {
de.polygonal.ds.mem.IntMemory;
}
}
results in:
./src/de/polygonal/ds/mem/IntMemory.cpp(706) : error C2065: '__global__' : undeclared identifier
which happens at line 134 in the IntMemory.hx class
works when inlining is disabled with --no-inline
Sep 14, 2011
Project Member
#1
gameh...@gmail.com
Sep 26, 2011
Got the same problem, but also without inlining, try to compile this file:
package;
class Sample
{
public static function noInlineGetByte () {
return flash.Memory.getByte(0);
}
public static function main()
{
}
}
I'm getting this error:
./src/Sample.cpp(42) : error C2065: '__global__' : undeclared identifier
where line 42 is the last line of noInlineGetByte
##################
int Sample_obj::noInlineGetByte( ){
HX_SOURCE_PUSH("Sample_obj::noInlineGetByte")
struct _Function_1_1{
inline static int Block( Dynamic &__global__){
HX_SOURCE_POS("src/Sample.hx",70)
if ((((int)0 >= ::nme::Memory_obj::len))){
HX_SOURCE_POS("src/Sample.hx",70)
hx::Throw (HX_CSTRING("Bad address"));
}
HX_SOURCE_POS("src/Sample.hx",70)
return ::__hxcpp_memory_get_byte((int)0);
}
};
HX_SOURCE_POS("src/Sample.hx",69)
return _Function_1_1::Block(__global__);
}
######################
Sep 26, 2011
flash is remapped to nme by the way
Oct 6, 2011
Heinz I can confirm this - it only works with --no-inline flag. Hugh can you please look at this? It's a showstopper right now ;)
Feb 8, 2012
Hi This has been fixed by the patch.
Status:
Fixed
Mar 1, 2012
Hey Hugh,
I still have this problem using latest haXe nighly, hxcpp 2.08.1 and nme 3.2.
This code:
class Main {
static function main() {
var x = flash.Memory.getI32(0);
}
}
produces this error: Main.cpp(46) : error C2065: '__global__': non-declared identifier
generated code is:
HX_SOURCE_POS("src/Main.hx",2)
int x = _Function_1_1::Block(__global__);
|