зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1419034 - rabaldr, factor out the stack frame logic. r=bbouvier
This patch does several interconnected things with Rabaldr's stack frame. First, it abstracts the stack frame logic from BaseCompiler into BaseStackFrame; BaseCompiler now only knows very little about the frame, and what it is allowed to know is documented (mostly that there is a static part and a dynamic part and that masm.framePushed() is always correct). In particular, BaseCompiler must use BaseStackFrame to push and pop values from its value stack, it can't use masm directly. This abstraction is important for ARM64, where we can't freely push and pop, because SP must be aligned on a 16-byte boundary. BaseStackFrame is also in charge of allocating locals to frame slots and to access the locals. Crucially, these abstractions do not require us to use a frame pointer. Second, it removes all uses of the StackPointer variable (not defined on ARM64) and most uses of masm.getStackPointer() from BaseCompiler; the few that are left are well-defined cross-platform and are not sensitive to the layout of the frame, only its size. Third, it makes BaseLocalIter the property of BaseStackFrame (but defined outside the latter since the iter class is accessed externally). MozReview-Commit-ID: 5BWCTeK1NOR --HG-- extra : rebase_source : 5955d2cc47e94d855c117fd1f508c94398d6a990 extra : source : 3c874514716acf7b55fb2c0805e138b636071c88
This commit is contained in:
Родитель
5a943ee471
Коммит
a1a47e4c9a
|
@ -540,6 +540,23 @@ MIRTypeToTag(MIRType type)
|
|||
return JSVAL_TYPE_TO_TAG(ValueTypeFromMIRType(type));
|
||||
}
|
||||
|
||||
static inline size_t
|
||||
MIRTypeToSize(MIRType type)
|
||||
{
|
||||
switch (type) {
|
||||
case MIRType::Int32:
|
||||
return 4;
|
||||
case MIRType::Int64:
|
||||
return 8;
|
||||
case MIRType::Float32:
|
||||
return 4;
|
||||
case MIRType::Double:
|
||||
return 8;
|
||||
default:
|
||||
MOZ_CRASH("MIRTypeToSize - unhandled case");
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char*
|
||||
StringFromMIRType(MIRType type)
|
||||
{
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче