Bug 1029215 - remove 'using namespace mozilla' from js/src (r=waldo)

--HG--
extra : rebase_source : 4f04012d2f7ddc8f21d7c9d6903cbef84e0675c0
This commit is contained in:
Luke Wagner 2014-06-25 11:24:10 -05:00
parent 662392adb6
commit 11bc6e7f91
9 changed files with 34 additions and 34 deletions

View File

@ -34,7 +34,10 @@
using namespace js;
using namespace gc;
using namespace mozilla;
using mozilla::ArrayLength;
using mozilla::PodCopy;
using mozilla::PodZero;
//#define PROFILE_NURSERY

View File

@ -22,7 +22,6 @@
using namespace js;
using namespace js::gc;
using namespace mozilla;
#ifdef JS_GC_ZEAL

View File

@ -1479,7 +1479,7 @@ class irregexp::RegExpCompiler
private:
EndNode* accept_;
int next_register_;
js::Vector<RegExpNode *, 4, SystemAllocPolicy> work_list_;
Vector<RegExpNode *, 4, SystemAllocPolicy> work_list_;
int recursion_depth_;
RegExpMacroAssembler* macro_assembler_;
bool ignore_case_;
@ -2972,7 +2972,7 @@ EmitDoubleBoundaryTest(RegExpMacroAssembler* masm,
}
}
typedef js::Vector<int, 4, LifoAllocPolicy<Infallible> > RangeBoundaryVector;
typedef Vector<int, 4, LifoAllocPolicy<Infallible> > RangeBoundaryVector;
// even_label is for ranges[i] to ranges[i + 1] where i - start_index is even.
// odd_label is for ranges[i] to ranges[i + 1] where i - start_index is odd.
@ -3974,7 +3974,7 @@ class AlternativeGenerationList
private:
static const size_t kAFew = 10;
js::Vector<AlternativeGeneration *, 1, LifoAllocPolicy<Infallible> > alt_gens_;
Vector<AlternativeGeneration *, 1, LifoAllocPolicy<Infallible> > alt_gens_;
AlternativeGeneration a_few_alt_gens_[kAFew];
};

View File

@ -659,10 +659,10 @@ class ABIArgIter
uint32_t stackBytesConsumedSoFar() const { return gen_.stackBytesConsumedSoFar(); }
};
typedef js::Vector<MIRType, 8> MIRTypeVector;
typedef Vector<MIRType, 8> MIRTypeVector;
typedef ABIArgIter<MIRTypeVector> ABIArgMIRTypeIter;
typedef js::Vector<VarType, 8, LifoAllocPolicy<Fallible> > VarTypeVector;
typedef Vector<VarType, 8, LifoAllocPolicy<Fallible> > VarTypeVector;
typedef ABIArgIter<VarTypeVector> ABIArgTypeIter;
class Signature
@ -749,8 +749,8 @@ enum NeedsBoundsCheck {
namespace {
typedef js::Vector<PropertyName*,1> LabelVector;
typedef js::Vector<MBasicBlock*,8> BlockVector;
typedef Vector<PropertyName*,1> LabelVector;
typedef Vector<MBasicBlock*,8> BlockVector;
// ModuleCompiler encapsulates the compilation of an entire asm.js module. Over
// the course of an ModuleCompiler object's lifetime, many FunctionCompiler
@ -929,7 +929,7 @@ class MOZ_STACK_CLASS ModuleCompiler
}
};
typedef js::Vector<const Func*> FuncPtrVector;
typedef Vector<const Func*> FuncPtrVector;
class FuncPtrTable
{
@ -959,7 +959,7 @@ class MOZ_STACK_CLASS ModuleCompiler
const Func &elem(unsigned i) const { return *elems_[i]; }
};
typedef js::Vector<FuncPtrTable> FuncPtrTableVector;
typedef Vector<FuncPtrTable> FuncPtrTableVector;
class ExitDescriptor
{
@ -1022,9 +1022,9 @@ class MOZ_STACK_CLASS ModuleCompiler
typedef HashMap<PropertyName*, MathBuiltin> MathNameMap;
typedef HashMap<PropertyName*, Global*> GlobalMap;
typedef js::Vector<Func*> FuncVector;
typedef js::Vector<AsmJSGlobalAccess> GlobalAccessVector;
typedef js::Vector<SlowFunction> SlowFunctionVector;
typedef Vector<Func*> FuncVector;
typedef Vector<AsmJSGlobalAccess> GlobalAccessVector;
typedef Vector<SlowFunction> SlowFunctionVector;
ExclusiveContext * cx_;
AsmJSParser & parser_;
@ -1800,10 +1800,10 @@ class FunctionCompiler
private:
typedef HashMap<PropertyName*, Local> LocalMap;
typedef js::Vector<TypedValue> VarInitializerVector;
typedef Vector<TypedValue> VarInitializerVector;
typedef HashMap<PropertyName*, BlockVector> LabeledBlockMap;
typedef HashMap<ParseNode*, BlockVector> UnlabeledBlockMap;
typedef js::Vector<ParseNode*, 4> NodeStack;
typedef Vector<ParseNode*, 4> NodeStack;
ModuleCompiler & m_;
LifoAlloc & lifo_;
@ -2194,7 +2194,7 @@ class FunctionCompiler
uint32_t spIncrement_;
Signature sig_;
MAsmJSCall::Args regArgs_;
js::Vector<MAsmJSPassStackArg*> stackArgs_;
Vector<MAsmJSPassStackArg*> stackArgs_;
bool childClobbers_;
friend class FunctionCompiler;
@ -5360,7 +5360,7 @@ CheckFunction(ModuleCompiler &m, LifoAlloc &lifo, MIRGenerator **mir, ModuleComp
// Copy the cumulative minimum heap size constraint to the MIR for use in analysis. The length
// is also constrained to particular lengths, so firstly round up - a larger 'heap required
// length' can help range analysis to prove that bounds checks are not needed.
uint32_t len = js::RoundUpToNextValidAsmJSHeapLength(m.minHeapLength());
uint32_t len = RoundUpToNextValidAsmJSHeapLength(m.minHeapLength());
m.requireHeapLengthToBeAtLeast(len);
*mir = f.extractMIR();
@ -5493,11 +5493,11 @@ ParallelCompilationEnabled(ExclusiveContext *cx)
// State of compilation as tracked and updated by the main thread.
struct ParallelGroupState
{
js::Vector<AsmJSParallelTask> &tasks;
Vector<AsmJSParallelTask> &tasks;
int32_t outstandingJobs; // Good work, jobs!
uint32_t compiledJobs;
explicit ParallelGroupState(js::Vector<AsmJSParallelTask> &tasks)
explicit ParallelGroupState(Vector<AsmJSParallelTask> &tasks)
: tasks(tasks), outstandingJobs(0), compiledJobs(0)
{ }
};
@ -5677,7 +5677,7 @@ CheckFunctionsParallel(ModuleCompiler &m)
// Allocate scoped AsmJSParallelTask objects. Each contains a unique
// LifoAlloc that provides all necessary memory for compilation.
js::Vector<AsmJSParallelTask, 0> tasks(m.cx());
Vector<AsmJSParallelTask, 0> tasks(m.cx());
if (!tasks.initCapacity(numParallelJobs))
return false;

View File

@ -765,7 +765,7 @@ template <typename CharT>
static const uint8_t *
DeserializeChars(ExclusiveContext *cx, const uint8_t *cursor, size_t length, PropertyName **name)
{
js::Vector<CharT> tmp(cx);
Vector<CharT> tmp(cx);
CharT *src;
if ((size_t(cursor) & (sizeof(CharT) - 1)) != 0) {
// Align 'src' for AtomizeChars.
@ -818,7 +818,7 @@ AsmJSModule::Name::clone(ExclusiveContext *cx, Name *out) const
template <class T>
size_t
SerializedVectorSize(const js::Vector<T, 0, SystemAllocPolicy> &vec)
SerializedVectorSize(const Vector<T, 0, SystemAllocPolicy> &vec)
{
size_t size = sizeof(uint32_t);
for (size_t i = 0; i < vec.length(); i++)
@ -828,7 +828,7 @@ SerializedVectorSize(const js::Vector<T, 0, SystemAllocPolicy> &vec)
template <class T>
uint8_t *
SerializeVector(uint8_t *cursor, const js::Vector<T, 0, SystemAllocPolicy> &vec)
SerializeVector(uint8_t *cursor, const Vector<T, 0, SystemAllocPolicy> &vec)
{
cursor = WriteScalar<uint32_t>(cursor, vec.length());
for (size_t i = 0; i < vec.length(); i++)
@ -838,7 +838,7 @@ SerializeVector(uint8_t *cursor, const js::Vector<T, 0, SystemAllocPolicy> &vec)
template <class T>
const uint8_t *
DeserializeVector(ExclusiveContext *cx, const uint8_t *cursor, js::Vector<T, 0, SystemAllocPolicy> *vec)
DeserializeVector(ExclusiveContext *cx, const uint8_t *cursor, Vector<T, 0, SystemAllocPolicy> *vec)
{
uint32_t length;
cursor = ReadScalar<uint32_t>(cursor, &length);
@ -1370,7 +1370,7 @@ class ModuleChars
{
protected:
uint32_t isFunCtor_;
js::Vector<PropertyNameWrapper, 0, SystemAllocPolicy> funCtorArgs_;
Vector<PropertyNameWrapper, 0, SystemAllocPolicy> funCtorArgs_;
public:
static uint32_t beginOffset(AsmJSParser &parser) {
@ -1386,7 +1386,7 @@ class ModuleCharsForStore : ModuleChars
{
uint32_t uncompressedSize_;
uint32_t compressedSize_;
js::Vector<char, 0, SystemAllocPolicy> compressedBuffer_;
Vector<char, 0, SystemAllocPolicy> compressedBuffer_;
public:
bool init(AsmJSParser &parser) {
@ -1454,7 +1454,7 @@ class ModuleCharsForStore : ModuleChars
class ModuleCharsForLookup : ModuleChars
{
js::Vector<jschar, 0, SystemAllocPolicy> chars_;
Vector<jschar, 0, SystemAllocPolicy> chars_;
public:
const uint8_t *deserialize(ExclusiveContext *cx, const uint8_t *cursor) {

View File

@ -11,7 +11,6 @@
using namespace js;
using namespace js::jit;
using namespace mozilla;
using JS::GenericNaN;

View File

@ -14,7 +14,6 @@
#include "jit/IonFrames-inl.h"
#include "vm/Stack-inl.h"
using namespace mozilla;
using namespace js;
using namespace js::jit;
@ -124,7 +123,7 @@ struct DebugModeOSREntry
}
};
typedef js::Vector<DebugModeOSREntry> DebugModeOSREntryVector;
typedef Vector<DebugModeOSREntry> DebugModeOSREntryVector;
class UniqueScriptOSREntryIter
{

View File

@ -786,7 +786,7 @@ TraceDataRelocations(JSTracer *trc, uint8_t *buffer, CompactBufferReader &reader
while (reader.more()) {
size_t offset = reader.readUnsigned();
InstructionIterator iter((Instruction*)(buffer+offset));
void *ptr = const_cast<uint32_t *>(js::jit::Assembler::getPtr32Target(&iter));
void *ptr = const_cast<uint32_t *>(Assembler::getPtr32Target(&iter));
// No barrier needed since these are constants.
gc::MarkGCThingUnbarriered(trc, reinterpret_cast<void **>(&ptr), "ion-masm-ptr");
}
@ -794,7 +794,7 @@ TraceDataRelocations(JSTracer *trc, uint8_t *buffer, CompactBufferReader &reader
}
static void
TraceDataRelocations(JSTracer *trc, ARMBuffer *buffer,
js::Vector<BufferOffset, 0, SystemAllocPolicy> *locs)
Vector<BufferOffset, 0, SystemAllocPolicy> *locs)
{
for (unsigned int idx = 0; idx < locs->length(); idx++) {
BufferOffset bo = (*locs)[idx];

View File

@ -4273,7 +4273,7 @@ struct AutoLastFrameCheck
# define fast_getc getc
#endif
typedef js::Vector<char, 8, TempAllocPolicy> FileContents;
typedef Vector<char, 8, TempAllocPolicy> FileContents;
static bool
ReadCompleteFile(JSContext *cx, FILE *fp, FileContents &buffer)