Merge with master

This commit is contained in:
Ilmir Usmanov
2014-07-15 21:42:05 +04:00
36 changed files with 962 additions and 569 deletions
+32 -2
View File
@@ -19,6 +19,36 @@
#include "jerry-libc.h"
/**
* memcpy alias to __memcpy (for compiler usage)
*/
extern void *memcpy(void *s1, const void*s2, size_t n);
/**
* memset alias to __memset (for compiler usage)
*/
extern void *memset(void *s, int c, size_t n);
/**
* memcpy alias to __memcpy (for compiler usage)
*/
void* memcpy(void *s1, /**< destination */
const void* s2, /**< source */
size_t n) /**< bytes number */
{
return __memcpy(s1, s2, n);
} /* memcpy */
/**
* memset alias to __memset (for compiler usage)
*/
void* memset(void *s, /**< area to set values in */
int c, /**< value to set */
size_t n) /**< area size */
{
return __memset(s, c, n);
} /* memset */
/**
* memset
*
@@ -26,8 +56,8 @@
*/
void*
__memset(void *s, /**< area to set values in */
int c, /**< value to set */
size_t n) /**< area size */
int c, /**< value to set */
size_t n) /**< area size */
{
uint8_t *pArea = s;
for ( size_t index = 0; index < n; index++ )
+1 -1
View File
@@ -55,6 +55,6 @@ extern int __fprintf(FILE *, const char *, ...);
#define DBL_DIG ( 10)
#define DBL_MIN_EXP (-324)
#define DBL_MAX_EXP ( 308)
#define HUGE_VAL (1e37)
#define HUGE_VAL (1e37f)
#endif /* JERRY_LIBC_H */
+2 -1
View File
@@ -48,7 +48,8 @@ pp_token (token tok)
break;
case TOK_FLOAT:
__printf ("FLOAT (%f)\n", tok.data.fp_num);
FIXME(int -> float);
__printf ("FLOAT (%d)\n", (int)tok.data.fp_num);
break;
case TOK_NULL:
+3 -3
View File
@@ -20,9 +20,9 @@
* Handle failed assertion
*/
void __noreturn
jerry_AssertFail(const char *assertion, /**< assertion condition string */
const char *file, /**< file name */
const uint32_t line) /** line */
jerry_AssertFail(const char *assertion __unused, /**< assertion condition string */
const char *file __unused, /**< file name */
const uint32_t line __unused) /** line */
{
__exit( -ERR_GENERAL);
} /* jerry_AssertFail */
+8 -3
View File
@@ -36,8 +36,13 @@ __printf(const char *format, /**< format string */
va_start( args, format);
int ret = vprintf( format, args);
/**
* TODO: Call internal vprintf implementation when it appears.
*/
int ret = 0;
JERRY_UNIMPLEMENTED();
va_end( args);
return ret;
@@ -52,7 +57,7 @@ __putchar (int c)
/** exit - cause normal process termination */
void __noreturn
__exit (int status)
__exit (int status __unused)
{
/**
* TODO: Blink LEDs? status -> binary -> LEDs?
@@ -13,6 +13,17 @@
* limitations under the License.
*/
#include "serializer.h"
#include "globals.h"
void
serializer_init (void)
{
}
void
serializer_dump_data (const void *data __unused, size_t size __unused)
{
}
TODO (Dump memory)