Bug 1290337 - Part 5: Replace Value parameter to const Value& in JIT. r=nbp

This commit is contained in:
Tooru Fujisawa 2016-09-11 18:15:22 +09:00
Родитель 98f4254871
Коммит 0f1a2439c5
6 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -312,7 +312,7 @@ class FunctionCompiler
return constant;
}
MDefinition* constant(Value v, MIRType type)
MDefinition* constant(const Value& v, MIRType type)
{
if (inDeadCode())
return nullptr;

Просмотреть файл

@ -232,7 +232,7 @@ struct BaselineStackBuilder
return true;
}
bool writeValue(Value val, const char* info) {
bool writeValue(const Value& val, const char* info) {
if (!write<Value>(val))
return false;
if (info) {

Просмотреть файл

@ -5613,7 +5613,7 @@ GetTemplateObjectForClassHook(JSContext* cx, JSNative hook, CallArgs& args,
}
static bool
IsOptimizableCallStringSplit(Value callee, int argc, Value* args)
IsOptimizableCallStringSplit(const Value& callee, int argc, Value* args)
{
if (argc != 2 || !args[0].isString() || !args[1].isString())
return false;

Просмотреть файл

@ -532,7 +532,7 @@ IsOptimizableArgumentsObjectForLength(JSObject* obj)
}
static bool
IsOptimizableArgumentsObjectForGetElem(JSObject* obj, Value idval)
IsOptimizableArgumentsObjectForGetElem(JSObject* obj, const Value& idval)
{
if (!IsOptimizableArgumentsObjectForLength(obj))
return false;

Просмотреть файл

@ -378,7 +378,7 @@ struct MaybeReadFallback
return UndefinedValue();
}
NoGCValue noGCPlaceholder(Value v) const {
NoGCValue noGCPlaceholder(const Value& v) const {
if (v.isMagic(JS_OPTIMIZED_OUT))
return NoGC_MagicOptimizedOut;
return NoGC_UndefinedValue;
@ -445,7 +445,7 @@ class SnapshotIterator
Value allocationValue(const RValueAllocation& a, ReadMethod rm = RM_Normal);
MOZ_MUST_USE bool allocationReadable(const RValueAllocation& a, ReadMethod rm = RM_Normal);
void writeAllocationValuePayload(const RValueAllocation& a, Value v);
void writeAllocationValuePayload(const RValueAllocation& a, const Value& v);
void warnUnreadableAllocation();
private:
@ -477,7 +477,7 @@ class SnapshotIterator
// Used by recover instruction to store the value back into the instruction
// results array.
void storeInstructionResult(Value v);
void storeInstructionResult(const Value& v);
public:
// Exhibits frame properties contained in the snapshot.
@ -651,7 +651,7 @@ class InlineFrameIterator
private:
void findNextFrame();
JSObject* computeEnvironmentChain(Value envChainValue, MaybeReadFallback& fallback,
JSObject* computeEnvironmentChain(const Value& envChainValue, MaybeReadFallback& fallback,
bool* hasInitialEnv = nullptr) const;
public:

Просмотреть файл

@ -1926,7 +1926,7 @@ SnapshotIterator::maybeRead(const RValueAllocation& a, MaybeReadFallback& fallba
}
void
SnapshotIterator::writeAllocationValuePayload(const RValueAllocation& alloc, Value v)
SnapshotIterator::writeAllocationValuePayload(const RValueAllocation& alloc, const Value& v)
{
uintptr_t payload = *v.payloadUIntPtr();
#if defined(JS_PUNBOX64)
@ -2144,7 +2144,7 @@ SnapshotIterator::computeInstructionResults(JSContext* cx, RInstructionResults*
}
void
SnapshotIterator::storeInstructionResult(Value v)
SnapshotIterator::storeInstructionResult(const Value& v)
{
uint32_t currIns = recover_.numInstructionsRead() - 1;
MOZ_ASSERT((*instructionResults_)[currIns].isMagic(JS_ION_BAILOUT));
@ -2405,7 +2405,8 @@ InlineFrameIterator::callee(MaybeReadFallback& fallback) const
}
JSObject*
InlineFrameIterator::computeEnvironmentChain(Value envChainValue, MaybeReadFallback& fallback,
InlineFrameIterator::computeEnvironmentChain(const Value& envChainValue,
MaybeReadFallback& fallback,
bool* hasInitialEnv) const
{
if (envChainValue.isObject()) {