Bug 888083 (part 1) - Remove all but one of the cases where a vanilla .h file #includes an inline-header. r=jandem.

--HG--
extra : rebase_source : db025d7525529f28dfa112f009597e9fe982cfef
This commit is contained in:
Nicholas Nethercote 2013-07-03 20:41:30 -07:00
Родитель 3d47920fe5
Коммит 8243c30f2a
6 изменённых файлов: 73 добавлений и 89 удалений

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

@ -1,83 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ion_LIR_inl_h
#define ion_LIR_inl_h
namespace js {
namespace ion {
#define LIROP(name) \
L##name *LInstruction::to##name() \
{ \
JS_ASSERT(is##name()); \
return static_cast<L##name *>(this); \
}
LIR_OPCODE_LIST(LIROP)
#undef LIROP
#define LALLOC_CAST(type) \
L##type *LAllocation::to##type() { \
JS_ASSERT(is##type()); \
return static_cast<L##type *>(this); \
}
#define LALLOC_CONST_CAST(type) \
const L##type *LAllocation::to##type() const { \
JS_ASSERT(is##type()); \
return static_cast<const L##type *>(this); \
}
LALLOC_CAST(Use)
LALLOC_CONST_CAST(Use)
LALLOC_CONST_CAST(GeneralReg)
LALLOC_CONST_CAST(FloatReg)
LALLOC_CONST_CAST(StackSlot)
LALLOC_CONST_CAST(Argument)
LALLOC_CONST_CAST(ConstantIndex)
#undef LALLOC_CAST
#ifdef JS_NUNBOX32
static inline signed
OffsetToOtherHalfOfNunbox(LDefinition::Type type)
{
JS_ASSERT(type == LDefinition::TYPE || type == LDefinition::PAYLOAD);
signed offset = (type == LDefinition::TYPE)
? PAYLOAD_INDEX - TYPE_INDEX
: TYPE_INDEX - PAYLOAD_INDEX;
return offset;
}
static inline void
AssertTypesFormANunbox(LDefinition::Type type1, LDefinition::Type type2)
{
JS_ASSERT((type1 == LDefinition::TYPE && type2 == LDefinition::PAYLOAD) ||
(type2 == LDefinition::TYPE && type1 == LDefinition::PAYLOAD));
}
static inline unsigned
OffsetOfNunboxSlot(LDefinition::Type type)
{
if (type == LDefinition::PAYLOAD)
return NUNBOX32_PAYLOAD_OFFSET / STACK_SLOT_SIZE;
return NUNBOX32_TYPE_OFFSET / STACK_SLOT_SIZE;
}
// Note that stack indexes for LStackSlot are modelled backwards, so a
// double-sized slot starting at 2 has its next word at 1, *not* 3.
static inline unsigned
BaseOfNunboxSlot(LDefinition::Type type, unsigned slot)
{
if (type == LDefinition::PAYLOAD)
return slot + (NUNBOX32_PAYLOAD_OFFSET / STACK_SLOT_SIZE);
return slot + (NUNBOX32_TYPE_OFFSET / STACK_SLOT_SIZE);
}
#endif
} // namespace ion
} // namespace js
#endif /* ion_LIR_inl_h */

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

@ -8,7 +8,6 @@
#include "ion/MIRGraph.h"
#include "ion/LIR.h"
#include "ion/IonSpewer.h"
#include "ion/LIR-inl.h"
#include "ion/shared/CodeGenerator-shared.h"
using namespace js;

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

@ -1480,6 +1480,77 @@ LAllocation::toRegister() const
#undef LIR_HEADER
#include "ion/LIR-inl.h"
namespace js {
namespace ion {
#define LIROP(name) \
L##name *LInstruction::to##name() \
{ \
JS_ASSERT(is##name()); \
return static_cast<L##name *>(this); \
}
LIR_OPCODE_LIST(LIROP)
#undef LIROP
#define LALLOC_CAST(type) \
L##type *LAllocation::to##type() { \
JS_ASSERT(is##type()); \
return static_cast<L##type *>(this); \
}
#define LALLOC_CONST_CAST(type) \
const L##type *LAllocation::to##type() const { \
JS_ASSERT(is##type()); \
return static_cast<const L##type *>(this); \
}
LALLOC_CAST(Use)
LALLOC_CONST_CAST(Use)
LALLOC_CONST_CAST(GeneralReg)
LALLOC_CONST_CAST(FloatReg)
LALLOC_CONST_CAST(StackSlot)
LALLOC_CONST_CAST(Argument)
LALLOC_CONST_CAST(ConstantIndex)
#undef LALLOC_CAST
#ifdef JS_NUNBOX32
static inline signed
OffsetToOtherHalfOfNunbox(LDefinition::Type type)
{
JS_ASSERT(type == LDefinition::TYPE || type == LDefinition::PAYLOAD);
signed offset = (type == LDefinition::TYPE)
? PAYLOAD_INDEX - TYPE_INDEX
: TYPE_INDEX - PAYLOAD_INDEX;
return offset;
}
static inline void
AssertTypesFormANunbox(LDefinition::Type type1, LDefinition::Type type2)
{
JS_ASSERT((type1 == LDefinition::TYPE && type2 == LDefinition::PAYLOAD) ||
(type2 == LDefinition::TYPE && type1 == LDefinition::PAYLOAD));
}
static inline unsigned
OffsetOfNunboxSlot(LDefinition::Type type)
{
if (type == LDefinition::PAYLOAD)
return NUNBOX32_PAYLOAD_OFFSET / STACK_SLOT_SIZE;
return NUNBOX32_TYPE_OFFSET / STACK_SLOT_SIZE;
}
// Note that stack indexes for LStackSlot are modelled backwards, so a
// double-sized slot starting at 2 has its next word at 1, *not* 3.
static inline unsigned
BaseOfNunboxSlot(LDefinition::Type type, unsigned slot)
{
if (type == LDefinition::PAYLOAD)
return slot + (NUNBOX32_PAYLOAD_OFFSET / STACK_SLOT_SIZE);
return slot + (NUNBOX32_TYPE_OFFSET / STACK_SLOT_SIZE);
}
#endif
} // namespace ion
} // namespace js
#endif /* ion_LIR_h */

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

@ -12,7 +12,6 @@
#include "ion/LinearScan.h"
#include "ion/IonBuilder.h"
#include "ion/IonSpewer.h"
#include "ion/LIR-inl.h"
using namespace js;
using namespace js::ion;

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

@ -13,8 +13,6 @@
#include "ion/IonCode.h"
#include "mozilla/Util.h"
#include "jsscriptinlines.h"
namespace js {
namespace ion {

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

@ -10,12 +10,12 @@
#include "mozilla/Util.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "jsprvtd.h"
#include "jsalloc.h"
// For js::gc::AutoSuppressGC
#include "jsgc.h"
#include "jsgcinlines.h"
#include "js/Vector.h"