Skip to content

Commit

Permalink
update mac toolset
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongfq committed Aug 8, 2023
1 parent 14755b9 commit 4f9bfb8
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 49 deletions.
21 changes: 0 additions & 21 deletions frameworks/3rd/lua/ldump.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ static void dumpInteger (DumpState *D, lua_Integer x) {
dumpVar(D, x);
}

#ifndef LUA_DEBUG
static void flip(char *str, size_t size) {
size_t i;
for (i = 0; i < size; i++) {
str[i] = str[i] ^ 'e';
}
}
#else
#define flip(s, n)
#endif

static void dumpString (DumpState *D, const TString *s) {
if (s == NULL)
Expand All @@ -106,9 +96,7 @@ static void dumpString (DumpState *D, const TString *s) {
size_t size = tsslen(s);
const char *str = getstr(s);
dumpSize(D, size + 1);
flip((char *)str, size);
dumpVector(D, str, size);
flip((char *)str, size);
}
}

Expand Down Expand Up @@ -197,25 +185,16 @@ static void dumpFunction (DumpState *D, const Proto *f, TString *psource) {
dumpString(D, NULL); /* no debug info or same source as its parent */
else
dumpString(D, f->source);
#ifndef LUA_DEBUG
dumpCode(D, f);
dumpConstants(D, f);
dumpUpvalues(D, f);
dumpProtos(D, f);
dumpDebug(D, f);
#endif
dumpInt(D, f->linedefined);
dumpInt(D, f->lastlinedefined);
dumpByte(D, f->numparams);
dumpByte(D, f->is_vararg);
dumpByte(D, f->maxstacksize);
#ifdef LUA_DEBUG
dumpCode(D, f);
dumpConstants(D, f);
dumpUpvalues(D, f);
dumpProtos(D, f);
dumpDebug(D, f);
#endif
}


Expand Down
6 changes: 0 additions & 6 deletions frameworks/3rd/lua/lopcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,8 @@ enum OpMode {iABC, iABx, iAsBx, iAx, isJ}; /* basic instruction formats */

#define POS_A (POS_OP + SIZE_OP)
#define POS_k (POS_A + SIZE_A)
#ifndef LUA_DEBUG
#define POS_C (POS_k + 1)
#define POS_B (POS_C + SIZE_C)
#else
#define POS_B (POS_k + 1)
#define POS_C (POS_B + SIZE_B)
#endif


#define POS_Bx POS_k

Expand Down
21 changes: 0 additions & 21 deletions frameworks/3rd/lua/lundump.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ static lua_Integer loadInteger (LoadState *S) {
return x;
}

#ifndef LUA_DEBUG
static void flip(char *str, size_t size) {
size_t i;
for (i = 0; i < size; i++) {
str[i] = str[i] ^ 'e';
}
}
#else
#define flip(s, n)
#endif

/*
** Load a nullable string into prototype 'p'.
Expand All @@ -126,15 +116,13 @@ static TString *loadStringN (LoadState *S, Proto *p) {
else if (--size <= LUAI_MAXSHORTLEN) { /* short string? */
char buff[LUAI_MAXSHORTLEN];
loadVector(S, buff, size); /* load string into buffer */
flip(buff, size);
ts = luaS_newlstr(L, buff, size); /* create string */
}
else { /* long string */
ts = luaS_createlngstrobj(L, size); /* create string */
setsvalue2s(L, L->top.p, ts); /* anchor it ('loadVector' can GC) */
luaD_inctop(L);
loadVector(S, getstr(ts), size); /* load directly in final place */
flip(getstr(ts), size);
L->top.p--; /* pop string */
}
luaC_objbarrier(L, p, ts);
Expand Down Expand Up @@ -271,25 +259,16 @@ static void loadFunction (LoadState *S, Proto *f, TString *psource) {
f->source = loadStringN(S, f);
if (f->source == NULL) /* no source in dump? */
f->source = psource; /* reuse parent's source */
#ifndef LUA_DEBUG
loadCode(S, f);
loadConstants(S, f);
loadUpvalues(S, f);
loadProtos(S, f);
loadDebug(S, f);
#endif
f->linedefined = loadInt(S);
f->lastlinedefined = loadInt(S);
f->numparams = loadByte(S);
f->is_vararg = loadByte(S);
f->maxstacksize = loadByte(S);
#ifdef LUA_DEBUG
loadCode(S, f);
loadConstants(S, f);
loadUpvalues(S, f);
loadProtos(S, f);
loadDebug(S, f);
#endif
}


Expand Down
2 changes: 1 addition & 1 deletion runtime-src/proj.android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if $cygwin ; then
fi

if $darwin ; then
JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
fi

# Attempt to set APP_HOME
Expand Down
Binary file modified tools/lua/lua54/macos/lua
Binary file not shown.
Binary file modified tools/lua/lua54/macos/luac
Binary file not shown.

0 comments on commit 4f9bfb8

Please sign in to comment.