зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1132953 - Zero AsmJSModule::CodeRange and AsmJSModule::ExportedFunction::pod on construction, to avoid Valgrind warnings. r=luke.
--HG-- extra : rebase_source : 5dc08d0bd705aca6fbdae6a0a3d208321dcadb9f
This commit is contained in:
Родитель
b931cfa945
Коммит
6e37e4a390
|
@ -1304,6 +1304,7 @@ AsmJSModule::CodeRange::CodeRange(uint32_t nameIndex, uint32_t lineNumber,
|
|||
profilingReturn_(l.profilingReturn.offset()),
|
||||
end_(l.end.offset())
|
||||
{
|
||||
PodZero(&u); // zero padding for Valgrind
|
||||
u.kind_ = Function;
|
||||
setDeltas(l.entry.offset(), l.profilingJump.offset(), l.profilingEpilogue.offset());
|
||||
|
||||
|
@ -1328,9 +1329,13 @@ AsmJSModule::CodeRange::setDeltas(uint32_t entry, uint32_t profilingJump, uint32
|
|||
}
|
||||
|
||||
AsmJSModule::CodeRange::CodeRange(Kind kind, uint32_t begin, uint32_t end)
|
||||
: begin_(begin),
|
||||
: nameIndex_(0),
|
||||
lineNumber_(0),
|
||||
begin_(begin),
|
||||
profilingReturn_(0),
|
||||
end_(end)
|
||||
{
|
||||
PodZero(&u); // zero padding for Valgrind
|
||||
u.kind_ = kind;
|
||||
|
||||
MOZ_ASSERT(begin_ <= end_);
|
||||
|
@ -1338,10 +1343,13 @@ AsmJSModule::CodeRange::CodeRange(Kind kind, uint32_t begin, uint32_t end)
|
|||
}
|
||||
|
||||
AsmJSModule::CodeRange::CodeRange(Kind kind, uint32_t begin, uint32_t profilingReturn, uint32_t end)
|
||||
: begin_(begin),
|
||||
: nameIndex_(0),
|
||||
lineNumber_(0),
|
||||
begin_(begin),
|
||||
profilingReturn_(profilingReturn),
|
||||
end_(end)
|
||||
{
|
||||
PodZero(&u); // zero padding for Valgrind
|
||||
u.kind_ = kind;
|
||||
|
||||
MOZ_ASSERT(begin_ < profilingReturn_);
|
||||
|
@ -1351,10 +1359,13 @@ AsmJSModule::CodeRange::CodeRange(Kind kind, uint32_t begin, uint32_t profilingR
|
|||
|
||||
AsmJSModule::CodeRange::CodeRange(AsmJSExit::BuiltinKind builtin, uint32_t begin,
|
||||
uint32_t profilingReturn, uint32_t end)
|
||||
: begin_(begin),
|
||||
: nameIndex_(0),
|
||||
lineNumber_(0),
|
||||
begin_(begin),
|
||||
profilingReturn_(profilingReturn),
|
||||
end_(end)
|
||||
{
|
||||
PodZero(&u); // zero padding for Valgrind
|
||||
u.kind_ = Thunk;
|
||||
u.thunk.target_ = builtin;
|
||||
|
||||
|
|
|
@ -453,6 +453,7 @@ class AsmJSModule
|
|||
name_ = name;
|
||||
maybeFieldName_ = maybeFieldName;
|
||||
argCoercions_ = mozilla::Move(argCoercions);
|
||||
mozilla::PodZero(&pod); // zero padding for Valgrind
|
||||
pod.isChangeHeap_ = false;
|
||||
pod.returnType_ = returnType;
|
||||
pod.codeOffset_ = UINT32_MAX;
|
||||
|
@ -468,6 +469,7 @@ class AsmJSModule
|
|||
MOZ_ASSERT_IF(maybeFieldName, maybeFieldName->isTenured());
|
||||
name_ = name;
|
||||
maybeFieldName_ = maybeFieldName;
|
||||
mozilla::PodZero(&pod); // zero padding for Valgrind
|
||||
pod.isChangeHeap_ = true;
|
||||
pod.startOffsetInModule_ = startOffsetInModule;
|
||||
pod.endOffsetInModule_ = endOffsetInModule;
|
||||
|
@ -485,6 +487,7 @@ class AsmJSModule
|
|||
name_ = rhs.name_;
|
||||
maybeFieldName_ = rhs.maybeFieldName_;
|
||||
argCoercions_ = mozilla::Move(rhs.argCoercions_);
|
||||
mozilla::PodZero(&pod); // zero padding for Valgrind
|
||||
pod = rhs.pod;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче