Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
int64_t problem as function paramter
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
linghuye  
View profile  
 More options Mar 20 2012, 2:41 am
From: linghuye <linghuye...@gmail.com>
Date: Mon, 19 Mar 2012 23:41:46 -0700 (PDT)
Local: Tues, Mar 20 2012 2:41 am
Subject: int64_t problem as function paramter
hi,
    Recently I port my company's render engine project to javascript
with emscripten. In the project we use int64_t for id, and I use
USE_TYPED_ARRAYS=2 and I64_MODE=1 for compiling the C++ source code.
The problem is the wrongly compiled javascript code.

Source C++ is like:
A.
class CDataThreadObj{
public:
        CDataThreadObj(int64_t id, DWORD uType, const char* pszIndex,   DWORD
uExigence) {
         // Construct stuffs

}};

B.CDataThreadObj* pAniDataObj = new CDataThreadObj(idAni,
DATA_RES_TYPE_ANI, NULL, dwExigence);

The generated javascript code is:
A. function __ZN14CDataThreadObjC1ExjPKcj($this, $id$0, $id$1, $uType,
$pszIndex, $uExigence) {}
B. var $267=__Znwj(84);
    var $268=$267;
    var $269=HEAP32[(($idAni)>>2)];
    var $270$0=$269;
    var $270$1=0;
    var $271=$35;
    (function() { try { __THREW__ = false; return
__ZN14CDataThreadObjC1ExjPKcj($268, $270, 4, 0, $271) } catch(e)
{} .....

The parameter $270 in __ZN14CDataThreadObjC1ExjPKcj seems wrong, I
guess it should be $270$0, $270$1, so I change it manually then it
runs corrretly.
And I do not find  I64_MODE in original settings.js, I add it myself,
but the compile result is still wrong.

I dont want to manually modify these code every time, so, Is there
something wrong with my config in settings.js, or it is a bug in
current emscripten?
Thanks for your replay.

linghuye


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alon Zakai  
View profile  
 More options Mar 20 2012, 2:28 pm
From: Alon Zakai <alonmozi...@gmail.com>
Date: Tue, 20 Mar 2012 11:28:23 -0700
Local: Tues, Mar 20 2012 2:28 pm
Subject: Re: int64_t problem as function paramter
This looks like a bug. However I can't reproduce it here, so it might
depend on the specific command you use to compile or something
else. I tried using the code you provided but I had to fill in some
blanks and maybe that makes a difference.

Can you make a complete concrete testcase (an entire file to compile
and the command to compile it)?

- azakai


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
linghuye  
View profile  
 More options Mar 26 2012, 5:33 am
From: linghuye <linghuye...@gmail.com>
Date: Mon, 26 Mar 2012 02:33:34 -0700 (PDT)
Local: Mon, Mar 26 2012 5:33 am
Subject: Re: int64_t problem as function paramter
I check out a new copy of emscripten, recompile the code, find the
code is generated correctly now.
Thanks for your hard work.

On 3月21日, 上午2时28分, Alon Zakai <alonmozi...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »