зеркало из https://github.com/mozilla/gecko-dev.git
Linux build..
This commit is contained in:
Родитель
d85698fd40
Коммит
d1793844b9
|
@ -258,7 +258,7 @@ namespace MetaData {
|
|||
String *p = (String *)(meta->alloc(sizeof(String), PondScum::StringFlag));
|
||||
size_t len = strlen(s);
|
||||
String *result = new (p) String(len, uni::null);
|
||||
for (int i = 0; i < len; i++) {
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
(*result)[i] = widen(s[i]);
|
||||
}
|
||||
// std::transform(s, s+len, result->begin(), widen);
|
||||
|
@ -512,11 +512,11 @@ namespace MetaData {
|
|||
toString_StringAtom(world.identifiers["toString"]),
|
||||
valueOf_StringAtom(world.identifiers["valueOf"]),
|
||||
packageFrame(NULL),
|
||||
localFrame(NULL),
|
||||
parameterFrame(NULL),
|
||||
parameterSlots(NULL),
|
||||
parameterCount(0),
|
||||
superConstructorCalled(false),
|
||||
localFrame(NULL),
|
||||
parameterSlots(NULL),
|
||||
traceInstructions(false)
|
||||
{
|
||||
for (int i = 0; i < 256; i++)
|
||||
|
|
|
@ -336,7 +336,6 @@ namespace MetaData {
|
|||
fWrap->env->addFrame(runtimeFrame);
|
||||
ParameterFrame *oldPFrame = engine->parameterFrame;
|
||||
js2val *oldPSlots = engine->parameterSlots;
|
||||
uint32 oldPCount = engine->parameterCount;
|
||||
try {
|
||||
savePC = engine->pc;
|
||||
engine->pc = NULL;
|
||||
|
@ -1160,8 +1159,10 @@ VariableMemberCommon:
|
|||
str = a->mValue;
|
||||
}
|
||||
int32 i = JS2VAL_TO_INT(indexVal);
|
||||
if ((i >= 0) && (i < str->length()))
|
||||
*rval = meta->engine->allocString(&(*str)[i], 1);
|
||||
if ((i >= 0) && ((uint32)(i) < str->length())) {
|
||||
jschar c = (*str)[i];
|
||||
*rval = meta->engine->allocString(&c, 1);
|
||||
}
|
||||
else
|
||||
*rval = JS2VAL_UNDEFINED;
|
||||
return true;
|
||||
|
|
|
@ -1174,9 +1174,8 @@
|
|||
pc += sizeof(short);
|
||||
ASSERT(slotIndex < localFrame->frameSlots->size());
|
||||
a = (*localFrame->frameSlots)[slotIndex];
|
||||
int32 i;
|
||||
if (JS2VAL_IS_INT(a) && ((i = JS2VAL_TO_INT(a)) < JS2VAL_INT_MAX)) {
|
||||
(*localFrame->frameSlots)[slotIndex] = INT_TO_JS2VAL(i + 1);
|
||||
if (JS2VAL_IS_INT(a) && (a != INT_TO_JS2VAL(JS2VAL_INT_MAX))) {
|
||||
(*localFrame->frameSlots)[slotIndex] += 2; // pre-shifted INT as JS2VAL
|
||||
push(a);
|
||||
}
|
||||
else {
|
||||
|
@ -1192,9 +1191,8 @@
|
|||
pc += sizeof(short);
|
||||
ASSERT(slotIndex < localFrame->frameSlots->size());
|
||||
a = (*localFrame->frameSlots)[slotIndex];
|
||||
int32 i;
|
||||
if (JS2VAL_IS_INT(a) && ((i = JS2VAL_TO_INT(a)) > JS2VAL_INT_MIN)) {
|
||||
(*localFrame->frameSlots)[slotIndex] = INT_TO_JS2VAL(i - 1);
|
||||
if (JS2VAL_IS_INT(a) && (a != INT_TO_JS2VAL(JS2VAL_INT_MIN))) {
|
||||
(*localFrame->frameSlots)[slotIndex] -= 2;
|
||||
push(a);
|
||||
}
|
||||
else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче