Bug 1181612: Rename AsmJSFunctionLabels to make them easier to understand; r=luke

--HG--
extra : commitid : IZMCWrFp9Vl
extra : rebase_source : c3395e05dc8fd8ac23e305d6458446f60d36c112
This commit is contained in:
Benjamin Bouvier 2015-10-19 16:03:12 +02:00
Родитель b9e217d3b1
Коммит c0c6e3dedb
6 изменённых файлов: 20 добавлений и 19 удалений

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

@ -146,8 +146,8 @@ class ModuleCompiler
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF) #if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
// Perf and profiling information // Perf and profiling information
unsigned begin = labels.begin.offset(); unsigned begin = labels.nonProfilingEntry.offset();
unsigned end = labels.end.offset(); unsigned end = labels.endAfterOOL.offset();
AsmJSModule::ProfiledFunction profiledFunc(funcName, begin, end, line, column); AsmJSModule::ProfiledFunction profiledFunc(funcName, begin, end, line, column);
if (!compileResults_->addProfiledFunction(profiledFunc)) if (!compileResults_->addProfiledFunction(profiledFunc))
return false; return false;

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

@ -280,13 +280,13 @@ js::GenerateAsmJSFunctionPrologue(MacroAssembler& masm, unsigned framePushed,
masm.haltingAlign(CodeAlignment); masm.haltingAlign(CodeAlignment);
GenerateProfilingPrologue(masm, framePushed, AsmJSExit::None, &labels->begin); GenerateProfilingPrologue(masm, framePushed, AsmJSExit::None, &labels->profilingEntry);
Label body; Label body;
masm.jump(&body); masm.jump(&body);
// Generate normal prologue: // Generate normal prologue:
masm.haltingAlign(CodeAlignment); masm.haltingAlign(CodeAlignment);
masm.bind(&labels->entry); masm.bind(&labels->nonProfilingEntry);
PushRetAddr(masm); PushRetAddr(masm);
masm.subFromStackPtr(Imm32(framePushed + AsmJSFrameBytesAfterReturnAddress)); masm.subFromStackPtr(Imm32(framePushed + AsmJSFrameBytesAfterReturnAddress));

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

@ -1364,19 +1364,19 @@ AsmJSModule::CodeRange::CodeRange(uint32_t nameIndex, uint32_t lineNumber,
const AsmJSFunctionLabels& l) const AsmJSFunctionLabels& l)
: nameIndex_(nameIndex), : nameIndex_(nameIndex),
lineNumber_(lineNumber), lineNumber_(lineNumber),
begin_(l.begin.offset()), begin_(l.profilingEntry.offset()),
profilingReturn_(l.profilingReturn.offset()), profilingReturn_(l.profilingReturn.offset()),
end_(l.end.offset()) end_(l.endAfterOOL.offset())
{ {
PodZero(&u); // zero padding for Valgrind PodZero(&u); // zero padding for Valgrind
u.kind_ = Function; u.kind_ = Function;
setDeltas(l.entry.offset(), l.profilingJump.offset(), l.profilingEpilogue.offset()); setDeltas(l.nonProfilingEntry.offset(), l.profilingJump.offset(), l.profilingEpilogue.offset());
MOZ_ASSERT(l.begin.offset() < l.entry.offset()); MOZ_ASSERT(l.profilingEntry.offset() < l.nonProfilingEntry.offset());
MOZ_ASSERT(l.entry.offset() < l.profilingJump.offset()); MOZ_ASSERT(l.nonProfilingEntry.offset() < l.profilingJump.offset());
MOZ_ASSERT(l.profilingJump.offset() < l.profilingEpilogue.offset()); MOZ_ASSERT(l.profilingJump.offset() < l.profilingEpilogue.offset());
MOZ_ASSERT(l.profilingEpilogue.offset() < l.profilingReturn.offset()); MOZ_ASSERT(l.profilingEpilogue.offset() < l.profilingReturn.offset());
MOZ_ASSERT(l.profilingReturn.offset() < l.end.offset()); MOZ_ASSERT(l.profilingReturn.offset() < l.endAfterOOL.offset());
} }
void void

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

@ -102,14 +102,14 @@ enum AsmJSSimdOperation
struct MOZ_STACK_CLASS AsmJSFunctionLabels struct MOZ_STACK_CLASS AsmJSFunctionLabels
{ {
AsmJSFunctionLabels(jit::Label& entry, jit::Label& overflowExit) AsmJSFunctionLabels(jit::Label& entry, jit::Label& overflowExit)
: entry(entry), overflowExit(overflowExit) {} : nonProfilingEntry(entry), overflowExit(overflowExit) {}
jit::Label begin; jit::Label profilingEntry;
jit::Label& entry; jit::Label& nonProfilingEntry;
jit::Label profilingJump; jit::Label profilingJump;
jit::Label profilingEpilogue; jit::Label profilingEpilogue;
jit::Label profilingReturn; jit::Label profilingReturn;
jit::Label end; jit::Label endAfterOOL;
mozilla::Maybe<jit::Label> overflowThunk; mozilla::Maybe<jit::Label> overflowThunk;
jit::Label& overflowExit; jit::Label& overflowExit;
}; };

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

@ -1520,6 +1520,7 @@ class MOZ_STACK_CLASS ModuleValidator
if (!module().addFunctionCounts(compileResults_->functionCount(i))) if (!module().addFunctionCounts(compileResults_->functionCount(i)))
return false; return false;
} }
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF) #if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
for (size_t i = 0; i < compileResults_->numProfiledFunctions(); ++i) { for (size_t i = 0; i < compileResults_->numProfiledFunctions(); ++i) {
if (!module().addProfiledFunction(Move(compileResults_->profiledFunction(i)))) if (!module().addProfiledFunction(Move(compileResults_->profiledFunction(i))))
@ -1527,7 +1528,7 @@ class MOZ_STACK_CLASS ModuleValidator
} }
#endif // defined(MOZ_VTUNE) || defined(JS_ION_PERF) #endif // defined(MOZ_VTUNE) || defined(JS_ION_PERF)
// Hand in code ranges, script counts and perf profiling data to the AsmJSModule // Hand in code ranges to the AsmJSModule
for (size_t i = 0; i < compileResults_->numCodeRanges(); ++i) { for (size_t i = 0; i < compileResults_->numCodeRanges(); ++i) {
AsmJSModule::FunctionCodeRange& codeRange = compileResults_->codeRange(i); AsmJSModule::FunctionCodeRange& codeRange = compileResults_->codeRange(i);
if (!module().addFunctionCodeRange(codeRange.name(), Move(codeRange))) if (!module().addFunctionCodeRange(codeRange.name(), Move(codeRange)))

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

@ -7800,7 +7800,7 @@ CodeGenerator::generateAsmJS(AsmJSFunctionLabels* labels)
if (!generateOutOfLineCode()) if (!generateOutOfLineCode())
return false; return false;
masm.bind(&labels->end); masm.bind(&labels->endAfterOOL);
// The only remaining work needed to compile this function is to patch the // The only remaining work needed to compile this function is to patch the
// switch-statement jump tables (the entries of the table need the absolute // switch-statement jump tables (the entries of the table need the absolute