Bug 840339 - Move inlined functions that depend on jsscriptinlines.h into CompileInfo-inl.h r=dvander

This commit is contained in:
Nicholas D. Matsakis 2013-03-04 11:00:02 -05:00
parent 8b98f0070e
commit a67d1c4582
3 changed files with 68 additions and 22 deletions

View File

@ -0,0 +1,59 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=4 sw=4 et 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 jsion_compileinfo_inl_h__
#define jsion_compileinfo_inl_h__
#include "CompileInfo.h"
#include "jsscriptinlines.h"
using namespace js;
using namespace ion;
JSAtom *
CompileInfo::getAtom(jsbytecode *pc) const
{
return script_->getAtom(GET_UINT32_INDEX(pc));
}
PropertyName *
CompileInfo::getName(jsbytecode *pc) const
{
return script_->getName(GET_UINT32_INDEX(pc));
}
RegExpObject *
CompileInfo::getRegExp(jsbytecode *pc) const
{
return script_->getRegExp(GET_UINT32_INDEX(pc));
}
JSFunction *
CompileInfo::getFunction(jsbytecode *pc) const
{
return script_->getFunction(GET_UINT32_INDEX(pc));
}
JSObject *
CompileInfo::getObject(jsbytecode *pc) const
{
return script_->getObject(GET_UINT32_INDEX(pc));
}
const Value &
CompileInfo::getConst(jsbytecode *pc) const
{
return script_->getConst(GET_UINT32_INDEX(pc));
}
jssrcnote *
CompileInfo::getNote(JSContext *cx, jsbytecode *pc) const
{
return js_GetSrcNote(cx, script(), pc);
}
#endif // jsion_compileinfo_inl_h__

View File

@ -76,27 +76,13 @@ class CompileInfo
// Script accessors based on PC.
JSAtom *getAtom(jsbytecode *pc) const {
return script_->getAtom(GET_UINT32_INDEX(pc));
}
PropertyName *getName(jsbytecode *pc) const {
return script_->getName(GET_UINT32_INDEX(pc));
}
RegExpObject *getRegExp(jsbytecode *pc) const {
return script_->getRegExp(GET_UINT32_INDEX(pc));
}
JSObject *getObject(jsbytecode *pc) const {
return script_->getObject(GET_UINT32_INDEX(pc));
}
JSFunction *getFunction(jsbytecode *pc) const {
return script_->getFunction(GET_UINT32_INDEX(pc));
}
const Value &getConst(jsbytecode *pc) const {
return script_->getConst(GET_UINT32_INDEX(pc));
}
jssrcnote *getNote(JSContext *cx, jsbytecode *pc) const {
return js_GetSrcNote(cx, script(), pc);
}
inline JSAtom *getAtom(jsbytecode *pc) const;
inline PropertyName *getName(jsbytecode *pc) const;
inline RegExpObject *getRegExp(jsbytecode *pc) const;
inline JSObject *getObject(jsbytecode *pc) const;
inline JSFunction *getFunction(jsbytecode *pc) const;
inline const Value &getConst(jsbytecode *pc) const;
inline jssrcnote *getNote(JSContext *cx, jsbytecode *pc) const;
// Total number of slots: args, locals, and stack.
unsigned nslots() const {

View File

@ -17,9 +17,10 @@
#include "builtin/Eval.h"
#include "frontend/BytecodeEmitter.h"
#include "CompileInfo-inl.h"
#include "ExecutionModeInlines.h"
#include "jsscriptinlines.h"
#include "jstypedarrayinlines.h"
#include "ExecutionModeInlines.h"
#ifdef JS_THREADSAFE
# include "prthread.h"