Permalink
Browse files

Merge remote-tracking branch 'origin/master' into ThreeTwoClipRect

  • Loading branch information...
2 parents 9fa1cd1 + acd3c93 commit 56570d2f9f0b90bae8bf0309f7f279bb1ff173c9 Mikael Kindborg committed Sep 13, 2012
Showing with 1,360 additions and 242 deletions.
  1. +3 −1 .gitignore
  2. +1 −0 intlibs/hashmap/hashmap.cpp
  3. +4 −4 intlibs/stabs/stabs_builtins.cpp
  4. +2 −2 intlibs/stabs/stabs_type.h
  5. +1 −1 libs/MAUtil/mauuid.h
  6. +2 −2 rules/mosync_exe.rb
  7. +2 −0 runtimes/cpp/base/AudioChannel.h
  8. +37 −37 runtimes/cpp/core/Core.cpp
  9. +1 −1 runtimes/cpp/core/sld.cpp
  10. +1 −1 runtimes/cpp/platforms/sdl/netImpl.cpp
  11. +7 −0 runtimes/cpp/platforms/symbian/inc/AppUi.h
  12. +10 −4 runtimes/cpp/platforms/symbian/inc/AppView.h
  13. +12 −4 runtimes/cpp/platforms/symbian/inc/Platform.h
  14. +4 −1 runtimes/cpp/platforms/symbian/inc/SyscallImpl.h
  15. +2 −3 runtimes/cpp/platforms/symbian/inc/config_platform.h.example
  16. +0 −1 runtimes/cpp/platforms/symbian/inc/config_platform.h.guido.example
  17. +28 −7 runtimes/cpp/platforms/symbian/inc/netImpl.h
  18. +2 −0 runtimes/cpp/platforms/symbian/inc/symbian_errors.h
  19. +216 −0 runtimes/cpp/platforms/symbian/server/Autostart.cpp
  20. +10 −3 runtimes/cpp/platforms/symbian/server/ClientServer.h
  21. +60 −16 runtimes/cpp/platforms/symbian/server/MoSyncServer.cpp
  22. +25 −9 runtimes/cpp/platforms/symbian/server/MoSyncServer.h
  23. +7 −3 runtimes/cpp/platforms/symbian/server/MoSyncServer.mmp
  24. +7 −3 runtimes/cpp/platforms/symbian/server/MoSyncServer.pkg
  25. BIN runtimes/cpp/platforms/symbian/server/MoSyncServer_Express_Signed.sis
  26. +7 −0 runtimes/cpp/platforms/symbian/server/MoSyncServer_startup.rss
  27. +108 −0 runtimes/cpp/platforms/symbian/server/NetworkInfo.h
  28. +2 −2 runtimes/cpp/platforms/symbian/sis-ed3/MoSync-guido.pkg
  29. +4 −4 runtimes/cpp/platforms/symbian/sis-ed3/MoSync-server.pkg
  30. +4 −4 runtimes/cpp/platforms/symbian/sis-ed3/MoSync-template.pkg
  31. +2 −2 runtimes/cpp/platforms/symbian/sis-ed3/MoSync.pkg
  32. +4 −0 runtimes/cpp/platforms/symbian/sis-ed5/MoSync-template.pkg
  33. +2 −2 runtimes/cpp/platforms/symbian/sis-ed5/MoSync.pkg
  34. +53 −7 runtimes/cpp/platforms/symbian/src/AppUi.cpp
  35. +10 −0 runtimes/cpp/platforms/symbian/src/AppView.cpp
  36. +41 −6 runtimes/cpp/platforms/symbian/src/Client.cpp
  37. +34 −1 runtimes/cpp/platforms/symbian/src/SyscallImpl.cpp
  38. +201 −77 runtimes/cpp/platforms/symbian/src/netImpl.cpp
  39. +160 −0 testPrograms/iap/main.cpp
  40. +66 −0 testPrograms/keyCapture/main.cpp
  41. +54 −0 testPrograms/networkStatus/main.cpp
  42. +1 −1 tools/ProfileConverter/conv.rb
  43. +1 −0 tools/RuntimeBuilder/BuildS60.rb
  44. +2 −2 tools/debugger/cmd_data.cpp
  45. +4 −4 tools/debugger/cmd_stack.cpp
  46. +4 −4 tools/debugger/cmd_var.cpp
  47. +15 −15 tools/debugger/debugger.cpp
  48. +1 −0 tools/debugger/expression_tree.h
  49. +3 −3 tools/debugger/opHandler.h
  50. +129 −3 tools/idl2/maapi.idl
  51. +1 −0 tools/package/android.cpp
  52. +3 −2 tools/rcomp/inc/rcscan.h
View
@@ -68,6 +68,7 @@ wormhole.js
/tools/ReleasePackageBuild/run.bat
/tools/ReleasePackageBuild/setcurrev.bat
+/tools/ReleasePackageBuild/build_package_tools/mosync_bin/version.dat
/tools/DocbookIndexer/src/*.c
/tools/DocbookIndexer/src/*.s
@@ -102,6 +103,7 @@ wormhole.js
/libs/newlib/libc/sys/mosync/maapi_defs.h
/libs/Wormhole/jslib/html5
+/libs/Wormhole/jslib/mosync-constants.js
/testPrograms/_masterdump.s
/testPrograms/temp.s
@@ -238,4 +240,4 @@ wormhole.js
/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Libraries/Microsoft.Advertising.Mobile
/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Libraries/Microsoft.Advertising.Mobile.UI
/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Libraries/Microsoft.Phone.Controls
-/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Libraries/Microsoft.Phone.Controls.Maps
+/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Libraries/Microsoft.Phone.Controls.Maps
@@ -92,6 +92,7 @@ void HashMapBase::close() {
}
free(m.base);
m.base = NULL;
+ memset(&m, 0, sizeof(m));
//DebugMarkEnd();
LOG_HASH("HashMapBase::close() complete.\n\n");
}
@@ -72,14 +72,14 @@ void Int::printMI(printfPtr pf, const void* data, TypeBase::PrintFormat fmt) con
}
void Char::printMI(printfPtr pf, const void* data, TypeBase::PrintFormat fmt) const {
-
+
if(fmt==eNatural) {
printPrimitiveByFormat<char>(pf, data, "%i", eDecimal, eDecimal);
char c = *(char*)data;
if(c>=0 && c<=32) pf(" \'\\\\%o\'", c);
else pf(" \'%c\'", c);
} else {
- printPrimitiveByFormat<char>(pf, data, "%i", fmt, fmt);
+ printPrimitiveByFormat<char>(pf, data, "%i", fmt, fmt);
}
}
@@ -96,11 +96,11 @@ void LongUnsignedInt::printMI(printfPtr pf, const void* data, TypeBase::PrintFor
}
void LongLongInt::printMI(printfPtr pf, const void* data, TypeBase::PrintFormat fmt) const {
- printPrimitiveByFormat<s64>(pf, data, "%"INT64PREFIX"i", fmt, TypeBase::eDecimal);
+ printPrimitiveByFormat<s64>(pf, data, "%" INT64PREFIX "i", fmt, TypeBase::eDecimal);
}
void LongLongUnsignedInt::printMI(printfPtr pf, const void* data, TypeBase::PrintFormat fmt) const {
- printPrimitiveByFormat<u64>(pf, data, "%"INT64PREFIX"u", fmt, TypeBase::eDecimal);
+ printPrimitiveByFormat<u64>(pf, data, "%" INT64PREFIX "u", fmt, TypeBase::eDecimal);
}
void ShortInt::printMI(printfPtr pf, const void* data, TypeBase::PrintFormat fmt) const {
@@ -119,9 +119,9 @@ void printPrimitiveByFormat(printfPtr pf, const void* data, const char* decimalF
} else if(fmt == TypeBase::eDecimal) {
pf(decimalFmt, t);
} else if(fmt == TypeBase::eOctal) {
- pf("%"PFZT_PREFIX"o", (size_t)t);
+ pf("%" PFZT_PREFIX "o", (size_t)t);
} else if(fmt == TypeBase::eHexadecimal) {
- pf("0x%"PFZT_PREFIX"x", (size_t)t);
+ pf("0x%" PFZT_PREFIX "x", (size_t)t);
} else if(fmt == TypeBase::eBinary) {
u64 tt = (u64)(size_t)t;
int numBits = (int)(sizeof(T)<<3)-1;
@@ -26,7 +26,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
* Defines a MAUUID that follows the Bluetooth standard of UUIDs.
* The lower 96 bits are constant.
*/
-#define DEFINE_BTMAUUID(name, uuid16) static const MAUUID name = {{ uuid16, 0x00001000, 0x80000080, 0x5F9B34FB }}
+#define DEFINE_BTMAUUID(name, uuid16) static const MAUUID name = {{ uuid16, 0x00001000, (int)0x80000080, 0x5F9B34FB }}
DEFINE_BTMAUUID(Bluetooth_Base_MAUUID, 0);
View
@@ -168,9 +168,9 @@ def setup3(all_objects, have_cppfiles)
@prerequisites << @resourceTask
end
if(USE_NEWLIB)
- default(:DEFAULT_LIBS, ["newlib","rescompiler"])
+ default(:DEFAULT_LIBS, ['newlib'])
else
- default(:DEFAULT_LIBS, ["mastd","rescompiler"])
+ default(:DEFAULT_LIBS, ['mastd'])
end
# libs
@@ -49,6 +49,8 @@ class AudioChannel
*/
AudioChannel ( int s, AudioSource* audioSource = NULL );
+ virtual ~AudioChannel() {}
+
/**
* Set the channel audio source
*
@@ -124,7 +124,7 @@ class VMCoreInt : public VMCore {
int csRegs[128];
int *csMem;
- struct StateChange {
+ struct StateChange {
int type; // 0 = reg state change, 1 = mem state change
int ip, instCount;
struct regdata
@@ -136,15 +136,15 @@ class VMCoreInt : public VMCore {
int address;
unsigned char before, after;
};
-
+
regdata regdata;
memdata memdata;
};
#define STATE_BUFFER_SIZE 1024
StateChange stateChanges[STATE_BUFFER_SIZE];
int curStateChange;
-
+
void initStateChange() {
csMem = 0;
curStateChange = 0;
@@ -215,7 +215,7 @@ class VMCoreInt : public VMCore {
void logStateChange(int ip) {
//LOG("logStateChange(0x%x)\n", ip);
-
+
if(!csMem) {
curStateChange = 0;
#if 0
@@ -273,7 +273,7 @@ class VMCoreInt : public VMCore {
while(i--) {
if(csRegs[i] != regs[i]) {
//LOG("R%d: 0x%x != %d\n", i, csRegs[i], gCore->regs[i]);
-
+
stateChanges[curStateChange].type = 0;
stateChanges[curStateChange].ip = ip;
stateChanges[curStateChange].instCount = stateChangeInstCount;
@@ -318,7 +318,7 @@ class VMCoreInt : public VMCore {
byte* rIP;
int VM_Yield;
-
+
void* customEventPointer;
#ifdef USE_ARM_RECOMPILER
@@ -617,7 +617,7 @@ class VMCoreInt : public VMCore {
void GenConstTable() {
int n, p;
int mask;
-
+
for(p=0; p<32; p++) {
regs[p] = 0;
}
@@ -658,7 +658,7 @@ class VMCoreInt : public VMCore {
FileStream mod(modfile);
if(!LoadVM(mod))
return false;
-
+
FileStream res(resfile);
if(!mSyscall.loadResources(res, resfile))
return false;
@@ -751,12 +751,12 @@ class VMCoreInt : public VMCore {
LOG("Recompiler Closed!\n");
#endif
}
-
+
//****************************************
//Loader
//****************************************
int LoadVM(Stream& file) {
-
+
LOG("LoadVM\n");
TEST(file.isOpen());
@@ -817,37 +817,37 @@ class VMCoreInt : public VMCore {
DUMPHEX(Head.DataSize);
if(Head.DataLen > 0) {
DATA_SEGMENT_SIZE = nextPowerOf2(16, Head.DataSize);
-
+
#ifdef _android
/*
jclass cls = mJniEnv->GetObjectClass(mJThis);
jmethodID methodID = mJniEnv->GetMethodID(cls, "generateDataSection", "(I)Ljava/nio/ByteBuffer;");
if (methodID == 0) return -1;
jobject jo = mJniEnv->CallObjectMethod(mJThis, methodID, (DATA_SEGMENT_SIZE));
-
+
// if the java object jo is NULL at this point there was not enought memory to allocate the data section
- if(jo == NULL)
+ if(jo == NULL)
{
__android_log_write(ANDROID_LOG_INFO, "MoSync Syscall", "Deta section was allocated, not enough memory!");
return 0;
}
-
+
mem_ds = (int*)mJniEnv->GetDirectBufferAddress(jo);
mJniEnv->DeleteLocalRef(cls);
*/
char* buffer = (char*)malloc(DATA_SEGMENT_SIZE);
if(buffer == NULL) return 0;
-
+
jobject byteBuffer = mJniEnv->NewDirectByteBuffer((void*)buffer, DATA_SEGMENT_SIZE);
if(byteBuffer == NULL) return 0;
-
+
jclass cls = mJniEnv->GetObjectClass(mJThis);
jmethodID methodID = mJniEnv->GetMethodID(cls, "generateDataSection", "(Ljava/nio/ByteBuffer;)Z");
if (methodID == 0) return 0;
-
+
jboolean ret = mJniEnv->CallBooleanMethod(mJThis, methodID, byteBuffer);
- if(false == ret)
+ if(false == ret)
{
__android_log_write(ANDROID_LOG_INFO, "MoSync Syscall", "Deta section was allocated, not enough memory!");
return 0;
@@ -857,10 +857,10 @@ class VMCoreInt : public VMCore {
mJniEnv->DeleteLocalRef(cls);
mJniEnv->DeleteLocalRef(byteBuffer);
-
+
#else
mem_ds = new int[DATA_SEGMENT_SIZE / sizeof(int)];
-#endif
+#endif
if(!mem_ds) BIG_PHAT_ERROR(ERR_OOM);
TEST(file.read(mem_ds, Head.DataLen));
@@ -893,7 +893,7 @@ class VMCoreInt : public VMCore {
#endif
customEventPointer = ((char*)mem_ds) + (Head.DataSize - maxCustomEventSize);
-
+
#ifdef USE_ARM_RECOMPILER
//initRecompilerVariables();
#ifndef _android
@@ -1017,7 +1017,7 @@ void WRITE_REG(int reg, int value) {
void checkProtection(uint address, uint size) const {
if(protectionEnabled) {
- for(uint i = address; i < address+size; i++)
+ for(uint i = address; i < address+size; i++)
if(GET_PROTECTION(i)) {
BIG_PHAT_ERROR(ERR_MEMORY_PROTECTED);
}
@@ -1040,7 +1040,7 @@ void WRITE_REG(int reg, int value) {
((address & (sizeof(T) - 1)) != 0) || //alignment check
(address < 4)) //NULL pointer check
{
- LOG("Memory reference validation failed. Size %"PFZT", address 0x%x\n",
+ LOG("Memory reference validation failed. Size %" PFZT ", address 0x%x\n",
sizeof(T), address);
if((address & (sizeof(T) - 1)) != 0) {
BIG_PHAT_ERROR(ERR_MEMORY_ALIGNMENT);
@@ -1051,7 +1051,7 @@ void WRITE_REG(int reg, int value) {
}
}
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(address, sizeof(T));
#endif
@@ -1066,19 +1066,19 @@ void WRITE_REG(int reg, int value) {
//****************************************
#define PTR2ADDRESS(ptr) ((unsigned)((char*)ptr - (char*)mem_ds))
void ValidateMemStringAddress(unsigned address) const {
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
int initialAddr = address;
#endif
do {
if(address >= DATA_SEGMENT_SIZE)
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
} while(RAW_MEMREF(char, address++) != 0);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(initialAddr, address-initialAddr);
#endif
}
void ValidateMemWStringAddress(unsigned address) const {
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
int initialAddr = address;
#endif
address -= 2;
@@ -1087,7 +1087,7 @@ void WRITE_REG(int reg, int value) {
if(address >= DATA_SEGMENT_SIZE)
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
} while(RAW_MEMREF(short, address) != 0);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(initialAddr, address-initialAddr);
#endif
}
@@ -1098,7 +1098,7 @@ void WRITE_REG(int reg, int value) {
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
} while(RAW_MEMREF(char, address++) != 0);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(PTR2ADDRESS(ptr), address-PTR2ADDRESS(ptr));
#endif
return address - PTR2ADDRESS(ptr) - 1;
@@ -1108,7 +1108,7 @@ void WRITE_REG(int reg, int value) {
if(address >= DATA_SEGMENT_SIZE || (address+size) >= DATA_SEGMENT_SIZE ||
size > DATA_SEGMENT_SIZE)
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(address, size);
#endif
}
@@ -1117,7 +1117,7 @@ void WRITE_REG(int reg, int value) {
if(uint(address) >= DATA_SEGMENT_SIZE || uint(address+size) >= DATA_SEGMENT_SIZE ||
uint(size) > DATA_SEGMENT_SIZE)
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(address, size);
#endif
return ((char*)mem_ds) + address;
@@ -1144,7 +1144,7 @@ void WRITE_REG(int reg, int value) {
if(address >= DATA_SEGMENT_SIZE)
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
} while(RAW_MEMREF(char, address++) != 0);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(a, address-a);
#endif
return ((char*)mem_ds) + a;
@@ -1158,7 +1158,7 @@ void WRITE_REG(int reg, int value) {
if(address >= DATA_SEGMENT_SIZE)
BIG_PHAT_ERROR(ERR_MEMORY_OOB);
} while(RAW_MEMREF(wchar, address) != 0);
-#ifdef MEMORY_PROTECTION
+#ifdef MEMORY_PROTECTION
checkProtection(a, address-a);
#endif
return (wchar*)(((char*)mem_ds) + a);
@@ -1315,7 +1315,7 @@ void WRITE_REG(int reg, int value) {
initStateChange();
#endif
}
-
+
virtual ~VMCoreInt() {
#ifdef GDB_DEBUG
if(mGdbOn)
@@ -1375,7 +1375,7 @@ void WRITE_REG(int reg, int value) {
#endif
}
-
+
private:
Syscall& mSyscall;
};
@@ -1460,7 +1460,7 @@ void RunFrom(VMCore* core, int ip) {
// ***************************************
// Debugger
-// ***************************************
+// ***************************************
/*
#ifdef ENABLE_DEBUGGER
bool initDebugger(VMCore* core, int port) {
@@ -1472,7 +1472,7 @@ void closeDebugger() {
}
#endif
*/
-// ***************************************
+// ***************************************
void Run2(VMCore* core) {
CORE->Run2();
Oops, something went wrong.

0 comments on commit 56570d2

Please sign in to comment.