'jsregexp.cc', 'log.cc', 'mark-compact.cc', 'messages.cc',
'objects.cc', 'parser.cc', 'property.cc', 'regexp-macro-assembler.cc',
'regexp-macro-assembler-irregexp.cc', 'rewriter.cc', 'runtime.cc', 'scanner.cc',
- 'scopeinfo.cc', 'scopes.cc', 'serialize.cc', 'snapshot-common.cc',
+ 'scopeinfo.cc', 'scopes.cc', 'serialize.cc', 'snapshot-common.cc',
'spaces.cc', 'string-stream.cc', 'stub-cache.cc', 'token.cc', 'top.cc',
'unicode.cc', 'usage-analyzer.cc', 'utils.cc', 'v8-counters.cc',
'v8.cc', 'v8threads.cc', 'variables.cc', 'zone.cc'
'macro-assembler-arm.cc', 'stub-cache-arm.cc'],
'arch:ia32': ['assembler-ia32.cc', 'builtins-ia32.cc', 'codegen-ia32.cc',
'cpu-ia32.cc', 'disasm-ia32.cc', 'frames-ia32.cc', 'ic-ia32.cc',
- 'macro-assembler-ia32.cc', 'regexp-macro-assembler-ia32.cc',
+ 'macro-assembler-ia32.cc', 'regexp-macro-assembler-ia32.cc',
'stub-cache-ia32.cc'],
'simulator:arm': ['simulator-arm.cc'],
'os:freebsd': ['platform-freebsd.cc'],
class Declaration: public Node {
public:
Declaration(VariableProxy* proxy, Variable::Mode mode, FunctionLiteral* fun)
- : proxy_(proxy),
- mode_(mode),
- fun_(fun) {
+ : proxy_(proxy),
+ mode_(mode),
+ fun_(fun) {
ASSERT(mode == Variable::VAR || mode == Variable::CONST);
// At the moment there are no "const functions"'s in JavaScript...
ASSERT(fun == NULL || mode == Variable::VAR);
protected:
explicit IterationStatement(ZoneStringList* labels)
- : BreakableStatement(labels, TARGET_FOR_ANONYMOUS), body_(NULL) { }
+ : BreakableStatement(labels, TARGET_FOR_ANONYMOUS), body_(NULL) { }
void Initialize(Statement* body) {
body_ = body;
class ForInStatement: public IterationStatement {
public:
explicit ForInStatement(ZoneStringList* labels)
- : IterationStatement(labels), each_(NULL), enumerable_(NULL) { }
+ : IterationStatement(labels), each_(NULL), enumerable_(NULL) { }
void Initialize(Expression* each, Expression* enumerable, Statement* body) {
IterationStatement::Initialize(body);
};
Slot(Variable* var, Type type, int index)
- : var_(var), type_(type), index_(index) {
+ : var_(var), type_(type), index_(index) {
ASSERT(var != NULL);
}
class UnaryOperation: public Expression {
public:
UnaryOperation(Token::Value op, Expression* expression)
- : op_(op), expression_(expression) {
+ : op_(op), expression_(expression) {
ASSERT(Token::IsUnaryOp(op));
}
class BinaryOperation: public Expression {
public:
BinaryOperation(Token::Value op, Expression* left, Expression* right)
- : op_(op), left_(left), right_(right) {
+ : op_(op), left_(left), right_(right) {
ASSERT(Token::IsBinaryOp(op));
}
class CountOperation: public Expression {
public:
CountOperation(bool is_prefix, Token::Value op, Expression* expression)
- : is_prefix_(is_prefix), op_(op), expression_(expression) {
+ : is_prefix_(is_prefix), op_(op), expression_(expression) {
ASSERT(Token::IsCountOp(op));
}
class CompareOperation: public Expression {
public:
CompareOperation(Token::Value op, Expression* left, Expression* right)
- : op_(op), left_(left), right_(right) {
+ : op_(op), left_(left), right_(right) {
ASSERT(Token::IsCompareOp(op));
}
class Assignment: public Expression {
public:
Assignment(Token::Value op, Expression* target, Expression* value, int pos)
- : op_(op), target_(target), value_(value), pos_(pos) {
+ : op_(op), target_(target), value_(value), pos_(pos) {
ASSERT(Token::IsAssignmentOp(op));
}
class RegExpDisjunction: public RegExpTree {
public:
explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives)
- : alternatives_(alternatives) { }
+ : alternatives_(alternatives) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success,
class RegExpAssertion: public RegExpTree {
public:
enum Type {
- START_OF_LINE, START_OF_INPUT, END_OF_LINE, END_OF_INPUT,
- BOUNDARY, NON_BOUNDARY
+ START_OF_LINE,
+ START_OF_INPUT,
+ END_OF_LINE,
+ END_OF_INPUT,
+ BOUNDARY,
+ NON_BOUNDARY
};
explicit RegExpAssertion(Type type) : type_(type) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
class RegExpCharacterClass: public RegExpTree {
public:
RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated)
- : ranges_(ranges),
- is_negated_(is_negated) { }
+ : ranges_(ranges),
+ is_negated_(is_negated) { }
explicit RegExpCharacterClass(uc16 type)
- : ranges_(new ZoneList<CharacterRange>(2)),
- is_negated_(false) {
+ : ranges_(new ZoneList<CharacterRange>(2)),
+ is_negated_(false) {
CharacterRange::AddClassEscape(type, ranges_);
}
virtual void* Accept(RegExpVisitor* visitor, void* data);
class RegExpQuantifier: public RegExpTree {
public:
RegExpQuantifier(int min, int max, bool is_greedy, RegExpTree* body)
- : min_(min),
- max_(max),
- is_greedy_(is_greedy),
- body_(body) { }
+ : min_(min),
+ max_(max),
+ is_greedy_(is_greedy),
+ body_(body) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success,
class RegExpCapture: public RegExpTree {
public:
explicit RegExpCapture(RegExpTree* body, int index)
- : body_(body), index_(index), available_(CAPTURE_AVAILABLE) { }
+ : body_(body), index_(index), available_(CAPTURE_AVAILABLE) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success,
class RegExpLookahead: public RegExpTree {
public:
RegExpLookahead(RegExpTree* body, bool is_positive)
- : body_(body),
- is_positive_(is_positive) { }
+ : body_(body),
+ is_positive_(is_positive) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success,
class RegExpBackReference: public RegExpTree {
public:
explicit RegExpBackReference(RegExpCapture* capture)
- : capture_(capture) { }
+ : capture_(capture) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success,
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// Attempts to compile the regexp using an Irregexp code generator. Returns
// a fixed array or a null handle depending on whether it succeeded.
RegExpCompiler::RegExpCompiler(int capture_count, bool ignore_case)
- : next_register_(2 * (capture_count + 1)),
- work_list_(NULL),
- recursion_depth_(0),
- is_case_independent_(ignore_case) {
+ : next_register_(2 * (capture_count + 1)),
+ work_list_(NULL),
+ recursion_depth_(0),
+ is_case_independent_(ignore_case) {
accept_ = new EndNode(EndNode::ACCEPT);
backtrack_ = new EndNode(EndNode::BACKTRACK);
}
class TableEntryBodyPrinter {
public:
TableEntryBodyPrinter(StringStream* stream, ChoiceNode* choice)
- : stream_(stream), choice_(choice) { }
+ : stream_(stream), choice_(choice) { }
void Call(uc16 from, DispatchTable::Entry entry) {
OutSet* out_set = entry.out_set();
for (unsigned i = 0; i < OutSet::kFirstLimit; i++) {
class TableEntryHeaderPrinter {
public:
explicit TableEntryHeaderPrinter(StringStream* stream)
- : first_(true), stream_(stream) { }
+ : first_(true), stream_(stream) { }
void Call(uc16 from, DispatchTable::Entry entry) {
if (first_) {
first_ = false;
ranges->Add(CharacterRange::Singleton(chars[i]));
}
}
- } else if (from() <= kRangeCanonicalizeMax
- && to() <= kRangeCanonicalizeMax) {
+ } else if (from() <= kRangeCanonicalizeMax &&
+ to() <= kRangeCanonicalizeMax) {
// If this is a range we expand the characters block by block,
// expanding contiguous subranges (blocks) one at a time.
// The approach is as follows. For a given start character we
static int CompareRangeByFrom(const CharacterRange* a,
const CharacterRange* b) {
- return Spaceship<uc16>(a->from(), b->from());
+ return Compare<uc16>(a->from(), b->from());
}
CharacterRange() : from_(0), to_(0) { }
// For compatibility with the CHECK_OK macro
CharacterRange(void* null) { ASSERT_EQ(NULL, null); } //NOLINT
- CharacterRange(uc16 from, uc16 to)
- : from_(from),
- to_(to) {
- }
+ CharacterRange(uc16 from, uc16 to) : from_(from), to_(to) { }
static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges);
static inline CharacterRange Singleton(uc16 value) {
return CharacterRange(value, value);
class Node : public ZoneObject {
public:
Node(const Key& key, const Value& value)
- : key_(key),
- value_(value),
- left_(NULL),
- right_(NULL) { }
- Key key() { return key_; }
- Value value() { return value_; }
- Node* left() { return left_; }
- Node* right() { return right_; }
+ : key_(key),
+ value_(value),
+ left_(NULL),
+ right_(NULL) { }
+ Key key() { return key_; }
+ Value value() { return value_; }
+ Node* left() { return left_; }
+ Node* right() { return right_; }
private:
friend class ZoneSplayTree;
friend class Locator;
OutSet* Extend(unsigned value);
bool Get(unsigned value);
static const unsigned kFirstLimit = 32;
- private:
+ private:
// Destructively set a value in this set. In most cases you want
// to use Extend instead to ensure that only one instance exists
// that contains the same values.
ZoneList<OutSet*>* successors() { return successors_; }
OutSet(uint32_t first, ZoneList<unsigned>* remaining)
- : first_(first), remaining_(remaining), successors_(NULL) { }
+ : first_(first), remaining_(remaining), successors_(NULL) { }
uint32_t first_;
ZoneList<unsigned>* remaining_;
ZoneList<OutSet*>* successors_;
public:
class Entry {
public:
- Entry()
- : from_(0), to_(0), out_set_(NULL) { }
+ Entry() : from_(0), to_(0), out_set_(NULL) { }
Entry(uc16 from, uc16 to, OutSet* out_set)
- : from_(from), to_(to), out_set_(out_set) { }
+ : from_(from), to_(to), out_set_(out_set) { }
uc16 from() { return from_; }
uc16 to() { return to_; }
void set_to(uc16 value) { to_ = value; }
struct NodeInfo {
NodeInfo()
- : being_analyzed(false),
- been_analyzed(false),
- determine_word(false),
- determine_newline(false),
- determine_start(false),
- follows_word_interest(false),
- follows_newline_interest(false),
- follows_start_interest(false) { }
+ : being_analyzed(false),
+ been_analyzed(false),
+ determine_word(false),
+ determine_newline(false),
+ determine_start(false),
+ follows_word_interest(false),
+ follows_newline_interest(false),
+ follows_start_interest(false) { }
bool SameInterests(NodeInfo* that) {
return (follows_word_interest == that->follows_word_interest)
&& (follows_newline_interest == that->follows_newline_interest)
class SeqRegExpNode: public RegExpNode {
public:
explicit SeqRegExpNode(RegExpNode* on_success)
- : on_success_(on_success) { }
+ : on_success_(on_success) { }
RegExpNode* on_success() { return on_success_; }
void set_on_success(RegExpNode* node) { on_success_ = node; }
virtual bool Emit(RegExpCompiler* compiler) { return false; }
} u_submatch_stack_pointer_register;
} data_;
ActionNode(Type type, RegExpNode* on_success)
- : SeqRegExpNode(on_success),
- type_(type) { }
+ : SeqRegExpNode(on_success),
+ type_(type) { }
Type type_;
friend class DotPrinter;
};
TextNode(ZoneList<TextElement>* elms,
RegExpNode* on_success,
RegExpNode* on_failure)
- : SeqRegExpNode(on_success),
- on_failure_(on_failure),
- elms_(elms) { }
+ : SeqRegExpNode(on_success),
+ on_failure_(on_failure),
+ elms_(elms) { }
virtual void Accept(NodeVisitor* visitor);
virtual RegExpNode* PropagateInterest(NodeInfo* info);
RegExpNode* on_failure() { return on_failure_; }
int end_reg,
RegExpNode* on_success,
RegExpNode* on_failure)
- : SeqRegExpNode(on_success),
- on_failure_(on_failure),
- start_reg_(start_reg),
- end_reg_(end_reg) { }
+ : SeqRegExpNode(on_success),
+ on_failure_(on_failure),
+ start_reg_(start_reg),
+ end_reg_(end_reg) { }
virtual void Accept(NodeVisitor* visitor);
RegExpNode* on_failure() { return on_failure_; }
int start_register() { return start_reg_; }
public:
enum Relation { LT, GEQ };
Guard(int reg, Relation op, int value)
- : reg_(reg),
- op_(op),
- value_(value) { }
+ : reg_(reg),
+ op_(op),
+ value_(value) { }
int reg() { return reg_; }
Relation op() { return op_; }
int value() { return value_; }
class ChoiceNode: public RegExpNode {
public:
explicit ChoiceNode(int expected_size, RegExpNode* on_failure)
- : on_failure_(on_failure),
- alternatives_(new ZoneList<GuardedAlternative>(expected_size)),
- table_calculated_(false),
- being_calculated_(false) { }
+ : on_failure_(on_failure),
+ alternatives_(new ZoneList<GuardedAlternative>(expected_size)),
+ table_calculated_(false),
+ being_calculated_(false) { }
virtual void Accept(NodeVisitor* visitor);
void AddAlternative(GuardedAlternative node) { alternatives()->Add(node); }
ZoneList<GuardedAlternative>* alternatives() { return alternatives_; }
class DispatchTableConstructor: public NodeVisitor {
public:
explicit DispatchTableConstructor(DispatchTable* table)
- : table_(table),
- choice_index_(-1) { }
+ : table_(table),
+ choice_index_(-1) { }
void BuildTable(ChoiceNode* node);
template<typename T, class P>
void List<T, P>::Sort() {
- Sort(PointerSpaceship<T>);
+ Sort(PointerValueCompare<T>);
}
FlatStringReader::FlatStringReader(Handle<String> str)
- : str_(str.location()),
- length_(str->length()),
- prev_(top_) {
+ : str_(str.location()),
+ length_(str->length()),
+ prev_(top_) {
top_ = this;
RefreshState();
}
FlatStringReader::FlatStringReader(Vector<const char> input)
- : str_(NULL),
- is_ascii_(true),
- length_(input.length()),
- start_(input.start()),
- prev_(top_) {
+ : str_(NULL),
+ is_ascii_(true),
+ length_(input.length()),
+ start_(input.start()),
+ prev_(top_) {
top_ = this;
}
class RegExpKey : public HashTableKey {
public:
RegExpKey(String* string, JSRegExp::Flags flags)
- : string_(string),
- flags_(Smi::FromInt(flags.value())) { }
+ : string_(string),
+ flags_(Smi::FromInt(flags.value())) { }
bool IsMatch(Object* obj) {
FixedArray* val = FixedArray::cast(obj);
class MapNameKey : public HashTableKey {
public:
MapNameKey(Map* map, String* name)
- : map_(map), name_(name) { }
+ : map_(map), name_(name) { }
bool IsMatch(Object* other) {
if (!other->IsFixedArray()) return false;
template <typename T>
-static int Spaceship(const T& a, const T& b) {
+static int Compare(const T& a, const T& b) {
if (a == b)
return 0;
else if (a < b)
template <typename T>
-static int PointerSpaceship(const T* a, const T* b) {
- return Spaceship<T>(*a, *b);
+static int PointerValueCompare(const T* a, const T* b) {
+ return Compare<T>(*a, *b);
}
}
void Sort() {
- Sort(PointerSpaceship<T>);
+ Sort(PointerValueCompare<T>);
}
// Releases the array underlying this vector. Once disposed the
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met: