| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index 4142d0e77bf8ccdb520936dd5daa333f6b279451..f61f49527184408ab9a806e98ab920707bed4d0d 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -166,8 +166,8 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
|
|
|
|
|
| #define DECLARE_NODE_TYPE(type) \
|
| - virtual void Accept(AstVisitor* v) OVERRIDE; \
|
| - virtual AstNode::NodeType node_type() const FINAL OVERRIDE { \
|
| + virtual void Accept(AstVisitor* v) V8_OVERRIDE; \
|
| + virtual AstNode::NodeType node_type() const V8_FINAL V8_OVERRIDE { \
|
| return AstNode::k##type; \
|
| } \
|
| template<class> friend class AstNodeFactory;
|
| @@ -182,7 +182,7 @@ enum AstPropertiesFlag {
|
| };
|
|
|
|
|
| -class AstProperties FINAL BASE_EMBEDDED {
|
| +class AstProperties V8_FINAL BASE_EMBEDDED {
|
| public:
|
| class Flags : public EnumSet<AstPropertiesFlag, int> {};
|
|
|
| @@ -271,7 +271,7 @@ class Statement : public AstNode {
|
| };
|
|
|
|
|
| -class SmallMapList FINAL {
|
| +class SmallMapList V8_FINAL {
|
| public:
|
| SmallMapList() {}
|
| SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {}
|
| @@ -417,7 +417,7 @@ class BreakableStatement : public Statement {
|
| ZoneStringList* labels() const { return labels_; }
|
|
|
| // Type testing & conversion.
|
| - virtual BreakableStatement* AsBreakableStatement() FINAL OVERRIDE {
|
| + virtual BreakableStatement* AsBreakableStatement() V8_FINAL V8_OVERRIDE {
|
| return this;
|
| }
|
|
|
| @@ -452,7 +452,7 @@ class BreakableStatement : public Statement {
|
| };
|
|
|
|
|
| -class Block FINAL : public BreakableStatement {
|
| +class Block V8_FINAL : public BreakableStatement {
|
| public:
|
| DECLARE_NODE_TYPE(Block)
|
|
|
| @@ -463,7 +463,7 @@ class Block FINAL : public BreakableStatement {
|
| ZoneList<Statement*>* statements() { return &statements_; }
|
| bool is_initializer_block() const { return is_initializer_block_; }
|
|
|
| - virtual bool IsJump() const OVERRIDE {
|
| + virtual bool IsJump() const V8_OVERRIDE {
|
| return !statements_.is_empty() && statements_.last()->IsJump()
|
| && labels() == NULL; // Good enough as an approximation...
|
| }
|
| @@ -517,11 +517,11 @@ class Declaration : public AstNode {
|
| };
|
|
|
|
|
| -class VariableDeclaration FINAL : public Declaration {
|
| +class VariableDeclaration V8_FINAL : public Declaration {
|
| public:
|
| DECLARE_NODE_TYPE(VariableDeclaration)
|
|
|
| - virtual InitializationFlag initialization() const OVERRIDE {
|
| + virtual InitializationFlag initialization() const V8_OVERRIDE {
|
| return mode() == VAR ? kCreatedInitialized : kNeedsInitialization;
|
| }
|
|
|
| @@ -534,15 +534,15 @@ class VariableDeclaration FINAL : public Declaration {
|
| };
|
|
|
|
|
| -class FunctionDeclaration FINAL : public Declaration {
|
| +class FunctionDeclaration V8_FINAL : public Declaration {
|
| public:
|
| DECLARE_NODE_TYPE(FunctionDeclaration)
|
|
|
| FunctionLiteral* fun() const { return fun_; }
|
| - virtual InitializationFlag initialization() const OVERRIDE {
|
| + virtual InitializationFlag initialization() const V8_OVERRIDE {
|
| return kCreatedInitialized;
|
| }
|
| - virtual bool IsInlineable() const OVERRIDE;
|
| + virtual bool IsInlineable() const V8_OVERRIDE;
|
|
|
| protected:
|
| FunctionDeclaration(VariableProxy* proxy,
|
| @@ -561,12 +561,12 @@ class FunctionDeclaration FINAL : public Declaration {
|
| };
|
|
|
|
|
| -class ModuleDeclaration FINAL : public Declaration {
|
| +class ModuleDeclaration V8_FINAL : public Declaration {
|
| public:
|
| DECLARE_NODE_TYPE(ModuleDeclaration)
|
|
|
| Module* module() const { return module_; }
|
| - virtual InitializationFlag initialization() const OVERRIDE {
|
| + virtual InitializationFlag initialization() const V8_OVERRIDE {
|
| return kCreatedInitialized;
|
| }
|
|
|
| @@ -583,12 +583,12 @@ class ModuleDeclaration FINAL : public Declaration {
|
| };
|
|
|
|
|
| -class ImportDeclaration FINAL : public Declaration {
|
| +class ImportDeclaration V8_FINAL : public Declaration {
|
| public:
|
| DECLARE_NODE_TYPE(ImportDeclaration)
|
|
|
| Module* module() const { return module_; }
|
| - virtual InitializationFlag initialization() const OVERRIDE {
|
| + virtual InitializationFlag initialization() const V8_OVERRIDE {
|
| return kCreatedInitialized;
|
| }
|
|
|
| @@ -605,11 +605,11 @@ class ImportDeclaration FINAL : public Declaration {
|
| };
|
|
|
|
|
| -class ExportDeclaration FINAL : public Declaration {
|
| +class ExportDeclaration V8_FINAL : public Declaration {
|
| public:
|
| DECLARE_NODE_TYPE(ExportDeclaration)
|
|
|
| - virtual InitializationFlag initialization() const OVERRIDE {
|
| + virtual InitializationFlag initialization() const V8_OVERRIDE {
|
| return kCreatedInitialized;
|
| }
|
|
|
| @@ -638,7 +638,7 @@ class Module : public AstNode {
|
| };
|
|
|
|
|
| -class ModuleLiteral FINAL : public Module {
|
| +class ModuleLiteral V8_FINAL : public Module {
|
| public:
|
| DECLARE_NODE_TYPE(ModuleLiteral)
|
|
|
| @@ -647,7 +647,7 @@ class ModuleLiteral FINAL : public Module {
|
| };
|
|
|
|
|
| -class ModuleVariable FINAL : public Module {
|
| +class ModuleVariable V8_FINAL : public Module {
|
| public:
|
| DECLARE_NODE_TYPE(ModuleVariable)
|
|
|
| @@ -661,7 +661,7 @@ class ModuleVariable FINAL : public Module {
|
| };
|
|
|
|
|
| -class ModulePath FINAL : public Module {
|
| +class ModulePath V8_FINAL : public Module {
|
| public:
|
| DECLARE_NODE_TYPE(ModulePath)
|
|
|
| @@ -681,7 +681,7 @@ class ModulePath FINAL : public Module {
|
| };
|
|
|
|
|
| -class ModuleUrl FINAL : public Module {
|
| +class ModuleUrl V8_FINAL : public Module {
|
| public:
|
| DECLARE_NODE_TYPE(ModuleUrl)
|
|
|
| @@ -697,7 +697,7 @@ class ModuleUrl FINAL : public Module {
|
| };
|
|
|
|
|
| -class ModuleStatement FINAL : public Statement {
|
| +class ModuleStatement V8_FINAL : public Statement {
|
| public:
|
| DECLARE_NODE_TYPE(ModuleStatement)
|
|
|
| @@ -719,7 +719,7 @@ class ModuleStatement FINAL : public Statement {
|
| class IterationStatement : public BreakableStatement {
|
| public:
|
| // Type testing & conversion.
|
| - virtual IterationStatement* AsIterationStatement() FINAL OVERRIDE {
|
| + virtual IterationStatement* AsIterationStatement() V8_FINAL V8_OVERRIDE {
|
| return this;
|
| }
|
|
|
| @@ -751,7 +751,7 @@ class IterationStatement : public BreakableStatement {
|
| };
|
|
|
|
|
| -class DoWhileStatement FINAL : public IterationStatement {
|
| +class DoWhileStatement V8_FINAL : public IterationStatement {
|
| public:
|
| DECLARE_NODE_TYPE(DoWhileStatement)
|
|
|
| @@ -767,8 +767,8 @@ class DoWhileStatement FINAL : public IterationStatement {
|
| int condition_position() { return condition_position_; }
|
| void set_condition_position(int pos) { condition_position_ = pos; }
|
|
|
| - virtual BailoutId ContinueId() const OVERRIDE { return continue_id_; }
|
| - virtual BailoutId StackCheckId() const OVERRIDE { return back_edge_id_; }
|
| + virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; }
|
| + virtual BailoutId StackCheckId() const V8_OVERRIDE { return back_edge_id_; }
|
| BailoutId BackEdgeId() const { return back_edge_id_; }
|
|
|
| protected:
|
| @@ -790,7 +790,7 @@ class DoWhileStatement FINAL : public IterationStatement {
|
| };
|
|
|
|
|
| -class WhileStatement FINAL : public IterationStatement {
|
| +class WhileStatement V8_FINAL : public IterationStatement {
|
| public:
|
| DECLARE_NODE_TYPE(WhileStatement)
|
|
|
| @@ -807,8 +807,8 @@ class WhileStatement FINAL : public IterationStatement {
|
| may_have_function_literal_ = value;
|
| }
|
|
|
| - virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
|
| - virtual BailoutId StackCheckId() const OVERRIDE { return body_id_; }
|
| + virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); }
|
| + virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
|
| BailoutId BodyId() const { return body_id_; }
|
|
|
| protected:
|
| @@ -829,7 +829,7 @@ class WhileStatement FINAL : public IterationStatement {
|
| };
|
|
|
|
|
| -class ForStatement FINAL : public IterationStatement {
|
| +class ForStatement V8_FINAL : public IterationStatement {
|
| public:
|
| DECLARE_NODE_TYPE(ForStatement)
|
|
|
| @@ -854,8 +854,8 @@ class ForStatement FINAL : public IterationStatement {
|
| may_have_function_literal_ = value;
|
| }
|
|
|
| - virtual BailoutId ContinueId() const OVERRIDE { return continue_id_; }
|
| - virtual BailoutId StackCheckId() const OVERRIDE { return body_id_; }
|
| + virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; }
|
| + virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
|
| BailoutId BodyId() const { return body_id_; }
|
|
|
| bool is_fast_smi_loop() { return loop_variable_ != NULL; }
|
| @@ -917,7 +917,7 @@ class ForEachStatement : public IterationStatement {
|
| };
|
|
|
|
|
| -class ForInStatement FINAL : public ForEachStatement {
|
| +class ForInStatement V8_FINAL : public ForEachStatement {
|
| public:
|
| DECLARE_NODE_TYPE(ForInStatement)
|
|
|
| @@ -932,8 +932,8 @@ class ForInStatement FINAL : public ForEachStatement {
|
|
|
| BailoutId BodyId() const { return body_id_; }
|
| BailoutId PrepareId() const { return prepare_id_; }
|
| - virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
|
| - virtual BailoutId StackCheckId() const OVERRIDE { return body_id_; }
|
| + virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); }
|
| + virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
|
|
|
| protected:
|
| ForInStatement(Isolate* isolate, ZoneStringList* labels)
|
| @@ -949,7 +949,7 @@ class ForInStatement FINAL : public ForEachStatement {
|
| };
|
|
|
|
|
| -class ForOfStatement FINAL : public ForEachStatement {
|
| +class ForOfStatement V8_FINAL : public ForEachStatement {
|
| public:
|
| DECLARE_NODE_TYPE(ForOfStatement)
|
|
|
| @@ -991,8 +991,8 @@ class ForOfStatement FINAL : public ForEachStatement {
|
| return assign_each_;
|
| }
|
|
|
| - virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
|
| - virtual BailoutId StackCheckId() const OVERRIDE { return BackEdgeId(); }
|
| + virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); }
|
| + virtual BailoutId StackCheckId() const V8_OVERRIDE { return BackEdgeId(); }
|
|
|
| BailoutId BackEdgeId() const { return back_edge_id_; }
|
|
|
| @@ -1014,13 +1014,13 @@ class ForOfStatement FINAL : public ForEachStatement {
|
| };
|
|
|
|
|
| -class ExpressionStatement FINAL : public Statement {
|
| +class ExpressionStatement V8_FINAL : public Statement {
|
| public:
|
| DECLARE_NODE_TYPE(ExpressionStatement)
|
|
|
| void set_expression(Expression* e) { expression_ = e; }
|
| Expression* expression() const { return expression_; }
|
| - virtual bool IsJump() const OVERRIDE { return expression_->IsThrow(); }
|
| + virtual bool IsJump() const V8_OVERRIDE { return expression_->IsThrow(); }
|
|
|
| protected:
|
| explicit ExpressionStatement(Expression* expression)
|
| @@ -1033,14 +1033,14 @@ class ExpressionStatement FINAL : public Statement {
|
|
|
| class JumpStatement : public Statement {
|
| public:
|
| - virtual bool IsJump() const FINAL OVERRIDE { return true; }
|
| + virtual bool IsJump() const V8_FINAL V8_OVERRIDE { return true; }
|
|
|
| protected:
|
| JumpStatement() {}
|
| };
|
|
|
|
|
| -class ContinueStatement FINAL : public JumpStatement {
|
| +class ContinueStatement V8_FINAL : public JumpStatement {
|
| public:
|
| DECLARE_NODE_TYPE(ContinueStatement)
|
|
|
| @@ -1055,7 +1055,7 @@ class ContinueStatement FINAL : public JumpStatement {
|
| };
|
|
|
|
|
| -class BreakStatement FINAL : public JumpStatement {
|
| +class BreakStatement V8_FINAL : public JumpStatement {
|
| public:
|
| DECLARE_NODE_TYPE(BreakStatement)
|
|
|
| @@ -1070,7 +1070,7 @@ class BreakStatement FINAL : public JumpStatement {
|
| };
|
|
|
|
|
| -class ReturnStatement FINAL : public JumpStatement {
|
| +class ReturnStatement V8_FINAL : public JumpStatement {
|
| public:
|
| DECLARE_NODE_TYPE(ReturnStatement)
|
|
|
| @@ -1085,7 +1085,7 @@ class ReturnStatement FINAL : public JumpStatement {
|
| };
|
|
|
|
|
| -class WithStatement FINAL : public Statement {
|
| +class WithStatement V8_FINAL : public Statement {
|
| public:
|
| DECLARE_NODE_TYPE(WithStatement)
|
|
|
| @@ -1106,7 +1106,7 @@ class WithStatement FINAL : public Statement {
|
| };
|
|
|
|
|
| -class CaseClause FINAL : public ZoneObject {
|
| +class CaseClause V8_FINAL : public ZoneObject {
|
| public:
|
| CaseClause(Isolate* isolate,
|
| Expression* label,
|
| @@ -1143,7 +1143,7 @@ class CaseClause FINAL : public ZoneObject {
|
| };
|
|
|
|
|
| -class SwitchStatement FINAL : public BreakableStatement {
|
| +class SwitchStatement V8_FINAL : public BreakableStatement {
|
| public:
|
| DECLARE_NODE_TYPE(SwitchStatement)
|
|
|
| @@ -1178,7 +1178,7 @@ class SwitchStatement FINAL : public BreakableStatement {
|
| // the parser implicitly creates an empty statement. Use the
|
| // HasThenStatement() and HasElseStatement() functions to check if a
|
| // given if-statement has a then- or an else-part containing code.
|
| -class IfStatement FINAL : public Statement {
|
| +class IfStatement V8_FINAL : public Statement {
|
| public:
|
| DECLARE_NODE_TYPE(IfStatement)
|
|
|
| @@ -1189,7 +1189,7 @@ class IfStatement FINAL : public Statement {
|
| Statement* then_statement() const { return then_statement_; }
|
| Statement* else_statement() const { return else_statement_; }
|
|
|
| - virtual bool IsJump() const OVERRIDE {
|
| + virtual bool IsJump() const V8_OVERRIDE {
|
| return HasThenStatement() && then_statement()->IsJump()
|
| && HasElseStatement() && else_statement()->IsJump();
|
| }
|
| @@ -1223,7 +1223,7 @@ class IfStatement FINAL : public Statement {
|
|
|
| // NOTE: TargetCollectors are represented as nodes to fit in the target
|
| // stack in the compiler; this should probably be reworked.
|
| -class TargetCollector FINAL : public AstNode {
|
| +class TargetCollector V8_FINAL : public AstNode {
|
| public:
|
| explicit TargetCollector(Zone* zone) : targets_(0, zone) { }
|
|
|
| @@ -1233,9 +1233,9 @@ class TargetCollector FINAL : public AstNode {
|
| void AddTarget(Label* target, Zone* zone);
|
|
|
| // Virtual behaviour. TargetCollectors are never part of the AST.
|
| - virtual void Accept(AstVisitor* v) OVERRIDE { UNREACHABLE(); }
|
| - virtual NodeType node_type() const OVERRIDE { return kInvalid; }
|
| - virtual TargetCollector* AsTargetCollector() OVERRIDE { return this; }
|
| + virtual void Accept(AstVisitor* v) V8_OVERRIDE { UNREACHABLE(); }
|
| + virtual NodeType node_type() const V8_OVERRIDE { return kInvalid; }
|
| + virtual TargetCollector* AsTargetCollector() V8_OVERRIDE { return this; }
|
|
|
| ZoneList<Label*>* targets() { return &targets_; }
|
|
|
| @@ -1269,7 +1269,7 @@ class TryStatement : public Statement {
|
| };
|
|
|
|
|
| -class TryCatchStatement FINAL : public TryStatement {
|
| +class TryCatchStatement V8_FINAL : public TryStatement {
|
| public:
|
| DECLARE_NODE_TYPE(TryCatchStatement)
|
|
|
| @@ -1296,7 +1296,7 @@ class TryCatchStatement FINAL : public TryStatement {
|
| };
|
|
|
|
|
| -class TryFinallyStatement FINAL : public TryStatement {
|
| +class TryFinallyStatement V8_FINAL : public TryStatement {
|
| public:
|
| DECLARE_NODE_TYPE(TryFinallyStatement)
|
|
|
| @@ -1312,7 +1312,7 @@ class TryFinallyStatement FINAL : public TryStatement {
|
| };
|
|
|
|
|
| -class DebuggerStatement FINAL : public Statement {
|
| +class DebuggerStatement V8_FINAL : public Statement {
|
| public:
|
| DECLARE_NODE_TYPE(DebuggerStatement)
|
|
|
| @@ -1321,7 +1321,7 @@ class DebuggerStatement FINAL : public Statement {
|
| };
|
|
|
|
|
| -class EmptyStatement FINAL : public Statement {
|
| +class EmptyStatement V8_FINAL : public Statement {
|
| public:
|
| DECLARE_NODE_TYPE(EmptyStatement)
|
|
|
| @@ -1330,11 +1330,11 @@ class EmptyStatement FINAL : public Statement {
|
| };
|
|
|
|
|
| -class Literal FINAL : public Expression {
|
| +class Literal V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Literal)
|
|
|
| - virtual bool IsPropertyName() OVERRIDE {
|
| + virtual bool IsPropertyName() V8_OVERRIDE {
|
| if (value_->IsInternalizedString()) {
|
| uint32_t ignored;
|
| return !String::cast(*value_)->AsArrayIndex(&ignored);
|
| @@ -1347,8 +1347,12 @@ class Literal FINAL : public Expression {
|
| return Handle<String>::cast(value_);
|
| }
|
|
|
| - virtual bool ToBooleanIsTrue() OVERRIDE { return value_->BooleanValue(); }
|
| - virtual bool ToBooleanIsFalse() OVERRIDE { return !value_->BooleanValue(); }
|
| + virtual bool ToBooleanIsTrue() V8_OVERRIDE {
|
| + return value_->BooleanValue();
|
| + }
|
| + virtual bool ToBooleanIsFalse() V8_OVERRIDE {
|
| + return !value_->BooleanValue();
|
| + }
|
|
|
| // Identity testers.
|
| bool IsNull() const {
|
| @@ -1423,7 +1427,7 @@ class MaterializedLiteral : public Expression {
|
| // Property is used for passing information
|
| // about an object literal's properties from the parser
|
| // to the code generator.
|
| -class ObjectLiteralProperty FINAL : public ZoneObject {
|
| +class ObjectLiteralProperty V8_FINAL : public ZoneObject {
|
| public:
|
| enum Kind {
|
| CONSTANT, // Property with constant value (compile time).
|
| @@ -1466,7 +1470,7 @@ class ObjectLiteralProperty FINAL : public ZoneObject {
|
|
|
| // An object literal has a boilerplate object that is used
|
| // for minimizing the work when constructing it at runtime.
|
| -class ObjectLiteral FINAL : public MaterializedLiteral {
|
| +class ObjectLiteral V8_FINAL : public MaterializedLiteral {
|
| public:
|
| typedef ObjectLiteralProperty Property;
|
|
|
| @@ -1524,7 +1528,7 @@ class ObjectLiteral FINAL : public MaterializedLiteral {
|
|
|
|
|
| // Node for capturing a regexp literal.
|
| -class RegExpLiteral FINAL : public MaterializedLiteral {
|
| +class RegExpLiteral V8_FINAL : public MaterializedLiteral {
|
| public:
|
| DECLARE_NODE_TYPE(RegExpLiteral)
|
|
|
| @@ -1547,7 +1551,7 @@ class RegExpLiteral FINAL : public MaterializedLiteral {
|
|
|
| // An array literal has a literals object that is used
|
| // for minimizing the work when constructing it at runtime.
|
| -class ArrayLiteral FINAL : public MaterializedLiteral {
|
| +class ArrayLiteral V8_FINAL : public MaterializedLiteral {
|
| public:
|
| DECLARE_NODE_TYPE(ArrayLiteral)
|
|
|
| @@ -1578,11 +1582,11 @@ class ArrayLiteral FINAL : public MaterializedLiteral {
|
| };
|
|
|
|
|
| -class VariableProxy FINAL : public Expression {
|
| +class VariableProxy V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(VariableProxy)
|
|
|
| - virtual bool IsValidLeftHandSide() OVERRIDE {
|
| + virtual bool IsValidLeftHandSide() V8_OVERRIDE {
|
| return var_ == NULL ? true : var_->IsValidLeftHandSide();
|
| }
|
|
|
| @@ -1630,15 +1634,15 @@ class VariableProxy FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Property FINAL : public Expression {
|
| +class Property V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Property)
|
|
|
| - virtual bool IsValidLeftHandSide() OVERRIDE { return true; }
|
| + virtual bool IsValidLeftHandSide() V8_OVERRIDE { return true; }
|
|
|
| Expression* obj() const { return obj_; }
|
| Expression* key() const { return key_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| BailoutId LoadId() const { return load_id_; }
|
|
|
| @@ -1648,9 +1652,11 @@ class Property FINAL : public Expression {
|
|
|
| // Type feedback information.
|
| void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
|
| - virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
|
| - virtual SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
|
| - virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
|
| + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
|
| + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
|
| + return &receiver_types_;
|
| + }
|
| + virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
|
| return STANDARD_STORE;
|
| }
|
| bool IsUninitialized() { return is_uninitialized_; }
|
| @@ -1687,19 +1693,21 @@ class Property FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Call FINAL : public Expression {
|
| +class Call V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Call)
|
|
|
| Expression* expression() const { return expression_; }
|
| ZoneList<Expression*>* arguments() const { return arguments_; }
|
| - virtual int position() const FINAL { return pos_; }
|
| + virtual int position() const V8_FINAL { return pos_; }
|
|
|
| // Type feedback information.
|
| TypeFeedbackId CallFeedbackId() const { return reuse(id()); }
|
| void RecordTypeFeedback(TypeFeedbackOracle* oracle, CallKind call_kind);
|
| - virtual SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
|
| - virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
|
| + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
|
| + return &receiver_types_;
|
| + }
|
| + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
|
| CheckType check_type() const { return check_type_; }
|
|
|
| void set_string_check(Handle<JSObject> holder) {
|
| @@ -1770,18 +1778,18 @@ class Call FINAL : public Expression {
|
| };
|
|
|
|
|
| -class CallNew FINAL : public Expression {
|
| +class CallNew V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(CallNew)
|
|
|
| Expression* expression() const { return expression_; }
|
| ZoneList<Expression*>* arguments() const { return arguments_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| // Type feedback information.
|
| TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); }
|
| void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
| - virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
|
| + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
|
| Handle<JSFunction> target() const { return target_; }
|
| ElementsKind elements_kind() const { return elements_kind_; }
|
| Handle<Cell> allocation_info_cell() const {
|
| @@ -1821,7 +1829,7 @@ class CallNew FINAL : public Expression {
|
| // language construct. Instead it is used to call a C or JS function
|
| // with a set of arguments. This is used from the builtins that are
|
| // implemented in JavaScript (see "v8natives.js").
|
| -class CallRuntime FINAL : public Expression {
|
| +class CallRuntime V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(CallRuntime)
|
|
|
| @@ -1849,18 +1857,19 @@ class CallRuntime FINAL : public Expression {
|
| };
|
|
|
|
|
| -class UnaryOperation FINAL : public Expression {
|
| +class UnaryOperation V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(UnaryOperation)
|
|
|
| Token::Value op() const { return op_; }
|
| Expression* expression() const { return expression_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| BailoutId MaterializeTrueId() { return materialize_true_id_; }
|
| BailoutId MaterializeFalseId() { return materialize_false_id_; }
|
|
|
| - virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) OVERRIDE;
|
| + virtual void RecordToBooleanTypeFeedback(
|
| + TypeFeedbackOracle* oracle) V8_OVERRIDE;
|
|
|
| protected:
|
| UnaryOperation(Isolate* isolate,
|
| @@ -1888,7 +1897,7 @@ class UnaryOperation FINAL : public Expression {
|
| };
|
|
|
|
|
| -class BinaryOperation FINAL : public Expression {
|
| +class BinaryOperation V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(BinaryOperation)
|
|
|
| @@ -1897,7 +1906,7 @@ class BinaryOperation FINAL : public Expression {
|
| Token::Value op() const { return op_; }
|
| Expression* left() const { return left_; }
|
| Expression* right() const { return right_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| BailoutId RightId() const { return right_id_; }
|
|
|
| @@ -1905,7 +1914,8 @@ class BinaryOperation FINAL : public Expression {
|
| Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
|
| void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; }
|
|
|
| - virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) OVERRIDE;
|
| + virtual void RecordToBooleanTypeFeedback(
|
| + TypeFeedbackOracle* oracle) V8_OVERRIDE;
|
|
|
| protected:
|
| BinaryOperation(Isolate* isolate,
|
| @@ -1938,7 +1948,7 @@ class BinaryOperation FINAL : public Expression {
|
| };
|
|
|
|
|
| -class CountOperation FINAL : public Expression {
|
| +class CountOperation V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(CountOperation)
|
|
|
| @@ -1951,12 +1961,14 @@ class CountOperation FINAL : public Expression {
|
| }
|
|
|
| Expression* expression() const { return expression_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* znoe);
|
| - virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
|
| - virtual SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
|
| - virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
|
| + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
|
| + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
|
| + return &receiver_types_;
|
| + }
|
| + virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
|
| return store_mode_;
|
| }
|
| TypeInfo type() const { return type_; }
|
| @@ -1998,14 +2010,14 @@ class CountOperation FINAL : public Expression {
|
| };
|
|
|
|
|
| -class CompareOperation FINAL : public Expression {
|
| +class CompareOperation V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(CompareOperation)
|
|
|
| Token::Value op() const { return op_; }
|
| Expression* left() const { return left_; }
|
| Expression* right() const { return right_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| // Type feedback information.
|
| TypeFeedbackId CompareOperationFeedbackId() const { return reuse(id()); }
|
| @@ -2041,7 +2053,7 @@ class CompareOperation FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Conditional FINAL : public Expression {
|
| +class Conditional V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Conditional)
|
|
|
| @@ -2082,7 +2094,7 @@ class Conditional FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Assignment FINAL : public Expression {
|
| +class Assignment V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Assignment)
|
|
|
| @@ -2093,7 +2105,7 @@ class Assignment FINAL : public Expression {
|
| Token::Value op() const { return op_; }
|
| Expression* target() const { return target_; }
|
| Expression* value() const { return value_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
| BinaryOperation* binary_operation() const { return binary_operation_; }
|
|
|
| // This check relies on the definition order of token in token.h.
|
| @@ -2104,10 +2116,12 @@ class Assignment FINAL : public Expression {
|
| // Type feedback information.
|
| TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
|
| void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
|
| - virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
|
| + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
|
| bool IsUninitialized() { return is_uninitialized_; }
|
| - virtual SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
|
| - virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
|
| + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
|
| + return &receiver_types_;
|
| + }
|
| + virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
|
| return store_mode_;
|
| }
|
|
|
| @@ -2143,7 +2157,7 @@ class Assignment FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Yield FINAL : public Expression {
|
| +class Yield V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Yield)
|
|
|
| @@ -2157,7 +2171,7 @@ class Yield FINAL : public Expression {
|
| Expression* generator_object() const { return generator_object_; }
|
| Expression* expression() const { return expression_; }
|
| Kind yield_kind() const { return yield_kind_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| // Delegating yield surrounds the "yield" in a "try/catch". This index
|
| // locates the catch handler in the handler table, and is equivalent to
|
| @@ -2193,12 +2207,12 @@ class Yield FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Throw FINAL : public Expression {
|
| +class Throw V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Throw)
|
|
|
| Expression* exception() const { return exception_; }
|
| - virtual int position() const OVERRIDE { return pos_; }
|
| + virtual int position() const V8_OVERRIDE { return pos_; }
|
|
|
| protected:
|
| Throw(Isolate* isolate, Expression* exception, int pos)
|
| @@ -2210,7 +2224,7 @@ class Throw FINAL : public Expression {
|
| };
|
|
|
|
|
| -class FunctionLiteral FINAL : public Expression {
|
| +class FunctionLiteral V8_FINAL : public Expression {
|
| public:
|
| enum FunctionType {
|
| ANONYMOUS_EXPRESSION,
|
| @@ -2360,7 +2374,7 @@ class FunctionLiteral FINAL : public Expression {
|
| };
|
|
|
|
|
| -class SharedFunctionInfoLiteral FINAL : public Expression {
|
| +class SharedFunctionInfoLiteral V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(SharedFunctionInfoLiteral)
|
|
|
| @@ -2380,7 +2394,7 @@ class SharedFunctionInfoLiteral FINAL : public Expression {
|
| };
|
|
|
|
|
| -class ThisFunction FINAL : public Expression {
|
| +class ThisFunction V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(ThisFunction)
|
|
|
| @@ -2430,19 +2444,19 @@ class RegExpTree : public ZoneObject {
|
| };
|
|
|
|
|
| -class RegExpDisjunction FINAL : public RegExpTree {
|
| +class RegExpDisjunction V8_FINAL : public RegExpTree {
|
| public:
|
| explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpDisjunction* AsDisjunction() OVERRIDE;
|
| - virtual Interval CaptureRegisters() OVERRIDE;
|
| - virtual bool IsDisjunction() OVERRIDE;
|
| - virtual bool IsAnchoredAtStart() OVERRIDE;
|
| - virtual bool IsAnchoredAtEnd() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return min_match_; }
|
| - virtual int max_match() OVERRIDE { return max_match_; }
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpDisjunction* AsDisjunction() V8_OVERRIDE;
|
| + virtual Interval CaptureRegisters() V8_OVERRIDE;
|
| + virtual bool IsDisjunction() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtStart() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return min_match_; }
|
| + virtual int max_match() V8_OVERRIDE { return max_match_; }
|
| ZoneList<RegExpTree*>* alternatives() { return alternatives_; }
|
| private:
|
| ZoneList<RegExpTree*>* alternatives_;
|
| @@ -2451,19 +2465,19 @@ class RegExpDisjunction FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpAlternative FINAL : public RegExpTree {
|
| +class RegExpAlternative V8_FINAL : public RegExpTree {
|
| public:
|
| explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpAlternative* AsAlternative() OVERRIDE;
|
| - virtual Interval CaptureRegisters() OVERRIDE;
|
| - virtual bool IsAlternative() OVERRIDE;
|
| - virtual bool IsAnchoredAtStart() OVERRIDE;
|
| - virtual bool IsAnchoredAtEnd() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return min_match_; }
|
| - virtual int max_match() OVERRIDE { return max_match_; }
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpAlternative* AsAlternative() V8_OVERRIDE;
|
| + virtual Interval CaptureRegisters() V8_OVERRIDE;
|
| + virtual bool IsAlternative() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtStart() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return min_match_; }
|
| + virtual int max_match() V8_OVERRIDE { return max_match_; }
|
| ZoneList<RegExpTree*>* nodes() { return nodes_; }
|
| private:
|
| ZoneList<RegExpTree*>* nodes_;
|
| @@ -2472,7 +2486,7 @@ class RegExpAlternative FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpAssertion FINAL : public RegExpTree {
|
| +class RegExpAssertion V8_FINAL : public RegExpTree {
|
| public:
|
| enum AssertionType {
|
| START_OF_LINE,
|
| @@ -2483,22 +2497,22 @@ class RegExpAssertion FINAL : public RegExpTree {
|
| NON_BOUNDARY
|
| };
|
| explicit RegExpAssertion(AssertionType type) : assertion_type_(type) { }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpAssertion* AsAssertion() OVERRIDE;
|
| - virtual bool IsAssertion() OVERRIDE;
|
| - virtual bool IsAnchoredAtStart() OVERRIDE;
|
| - virtual bool IsAnchoredAtEnd() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return 0; }
|
| - virtual int max_match() OVERRIDE { return 0; }
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpAssertion* AsAssertion() V8_OVERRIDE;
|
| + virtual bool IsAssertion() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtStart() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return 0; }
|
| + virtual int max_match() V8_OVERRIDE { return 0; }
|
| AssertionType assertion_type() { return assertion_type_; }
|
| private:
|
| AssertionType assertion_type_;
|
| };
|
|
|
|
|
| -class CharacterSet FINAL BASE_EMBEDDED {
|
| +class CharacterSet V8_FINAL BASE_EMBEDDED {
|
| public:
|
| explicit CharacterSet(uc16 standard_set_type)
|
| : ranges_(NULL),
|
| @@ -2521,7 +2535,7 @@ class CharacterSet FINAL BASE_EMBEDDED {
|
| };
|
|
|
|
|
| -class RegExpCharacterClass FINAL : public RegExpTree {
|
| +class RegExpCharacterClass V8_FINAL : public RegExpTree {
|
| public:
|
| RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated)
|
| : set_(ranges),
|
| @@ -2529,15 +2543,15 @@ class RegExpCharacterClass FINAL : public RegExpTree {
|
| explicit RegExpCharacterClass(uc16 type)
|
| : set_(type),
|
| is_negated_(false) { }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpCharacterClass* AsCharacterClass() OVERRIDE;
|
| - virtual bool IsCharacterClass() OVERRIDE;
|
| - virtual bool IsTextElement() OVERRIDE { return true; }
|
| - virtual int min_match() OVERRIDE { return 1; }
|
| - virtual int max_match() OVERRIDE { return 1; }
|
| - virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpCharacterClass* AsCharacterClass() V8_OVERRIDE;
|
| + virtual bool IsCharacterClass() V8_OVERRIDE;
|
| + virtual bool IsTextElement() V8_OVERRIDE { return true; }
|
| + virtual int min_match() V8_OVERRIDE { return 1; }
|
| + virtual int max_match() V8_OVERRIDE { return 1; }
|
| + virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE;
|
| CharacterSet character_set() { return set_; }
|
| // TODO(lrn): Remove need for complex version if is_standard that
|
| // recognizes a mangled standard set and just do { return set_.is_special(); }
|
| @@ -2563,18 +2577,18 @@ class RegExpCharacterClass FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpAtom FINAL : public RegExpTree {
|
| +class RegExpAtom V8_FINAL : public RegExpTree {
|
| public:
|
| explicit RegExpAtom(Vector<const uc16> data) : data_(data) { }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpAtom* AsAtom() OVERRIDE;
|
| - virtual bool IsAtom() OVERRIDE;
|
| - virtual bool IsTextElement() OVERRIDE { return true; }
|
| - virtual int min_match() OVERRIDE { return data_.length(); }
|
| - virtual int max_match() OVERRIDE { return data_.length(); }
|
| - virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpAtom* AsAtom() V8_OVERRIDE;
|
| + virtual bool IsAtom() V8_OVERRIDE;
|
| + virtual bool IsTextElement() V8_OVERRIDE { return true; }
|
| + virtual int min_match() V8_OVERRIDE { return data_.length(); }
|
| + virtual int max_match() V8_OVERRIDE { return data_.length(); }
|
| + virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE;
|
| Vector<const uc16> data() { return data_; }
|
| int length() { return data_.length(); }
|
| private:
|
| @@ -2582,18 +2596,18 @@ class RegExpAtom FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpText FINAL : public RegExpTree {
|
| +class RegExpText V8_FINAL : public RegExpTree {
|
| public:
|
| explicit RegExpText(Zone* zone) : elements_(2, zone), length_(0) {}
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpText* AsText() OVERRIDE;
|
| - virtual bool IsText() OVERRIDE;
|
| - virtual bool IsTextElement() OVERRIDE { return true; }
|
| - virtual int min_match() OVERRIDE { return length_; }
|
| - virtual int max_match() OVERRIDE { return length_; }
|
| - virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpText* AsText() V8_OVERRIDE;
|
| + virtual bool IsText() V8_OVERRIDE;
|
| + virtual bool IsTextElement() V8_OVERRIDE { return true; }
|
| + virtual int min_match() V8_OVERRIDE { return length_; }
|
| + virtual int max_match() V8_OVERRIDE { return length_; }
|
| + virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE;
|
| void AddElement(TextElement elm, Zone* zone) {
|
| elements_.Add(elm, zone);
|
| length_ += elm.length();
|
| @@ -2605,7 +2619,7 @@ class RegExpText FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpQuantifier FINAL : public RegExpTree {
|
| +class RegExpQuantifier V8_FINAL : public RegExpTree {
|
| public:
|
| enum QuantifierType { GREEDY, NON_GREEDY, POSSESSIVE };
|
| RegExpQuantifier(int min, int max, QuantifierType type, RegExpTree* body)
|
| @@ -2620,9 +2634,9 @@ class RegExpQuantifier FINAL : public RegExpTree {
|
| max_match_ = max * body->max_match();
|
| }
|
| }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| static RegExpNode* ToNode(int min,
|
| int max,
|
| bool is_greedy,
|
| @@ -2630,11 +2644,11 @@ class RegExpQuantifier FINAL : public RegExpTree {
|
| RegExpCompiler* compiler,
|
| RegExpNode* on_success,
|
| bool not_at_start = false);
|
| - virtual RegExpQuantifier* AsQuantifier() OVERRIDE;
|
| - virtual Interval CaptureRegisters() OVERRIDE;
|
| - virtual bool IsQuantifier() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return min_match_; }
|
| - virtual int max_match() OVERRIDE { return max_match_; }
|
| + virtual RegExpQuantifier* AsQuantifier() V8_OVERRIDE;
|
| + virtual Interval CaptureRegisters() V8_OVERRIDE;
|
| + virtual bool IsQuantifier() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return min_match_; }
|
| + virtual int max_match() V8_OVERRIDE { return max_match_; }
|
| int min() { return min_; }
|
| int max() { return max_; }
|
| bool is_possessive() { return quantifier_type_ == POSSESSIVE; }
|
| @@ -2652,24 +2666,24 @@ class RegExpQuantifier FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpCapture FINAL : public RegExpTree {
|
| +class RegExpCapture V8_FINAL : public RegExpTree {
|
| public:
|
| explicit RegExpCapture(RegExpTree* body, int index)
|
| : body_(body), index_(index) { }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| static RegExpNode* ToNode(RegExpTree* body,
|
| int index,
|
| RegExpCompiler* compiler,
|
| RegExpNode* on_success);
|
| - virtual RegExpCapture* AsCapture() OVERRIDE;
|
| - virtual bool IsAnchoredAtStart() OVERRIDE;
|
| - virtual bool IsAnchoredAtEnd() OVERRIDE;
|
| - virtual Interval CaptureRegisters() OVERRIDE;
|
| - virtual bool IsCapture() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return body_->min_match(); }
|
| - virtual int max_match() OVERRIDE { return body_->max_match(); }
|
| + virtual RegExpCapture* AsCapture() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtStart() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
|
| + virtual Interval CaptureRegisters() V8_OVERRIDE;
|
| + virtual bool IsCapture() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return body_->min_match(); }
|
| + virtual int max_match() V8_OVERRIDE { return body_->max_match(); }
|
| RegExpTree* body() { return body_; }
|
| int index() { return index_; }
|
| static int StartRegister(int index) { return index * 2; }
|
| @@ -2681,7 +2695,7 @@ class RegExpCapture FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpLookahead FINAL : public RegExpTree {
|
| +class RegExpLookahead V8_FINAL : public RegExpTree {
|
| public:
|
| RegExpLookahead(RegExpTree* body,
|
| bool is_positive,
|
| @@ -2692,15 +2706,15 @@ class RegExpLookahead FINAL : public RegExpTree {
|
| capture_count_(capture_count),
|
| capture_from_(capture_from) { }
|
|
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpLookahead* AsLookahead() OVERRIDE;
|
| - virtual Interval CaptureRegisters() OVERRIDE;
|
| - virtual bool IsLookahead() OVERRIDE;
|
| - virtual bool IsAnchoredAtStart() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return 0; }
|
| - virtual int max_match() OVERRIDE { return 0; }
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpLookahead* AsLookahead() V8_OVERRIDE;
|
| + virtual Interval CaptureRegisters() V8_OVERRIDE;
|
| + virtual bool IsLookahead() V8_OVERRIDE;
|
| + virtual bool IsAnchoredAtStart() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return 0; }
|
| + virtual int max_match() V8_OVERRIDE { return 0; }
|
| RegExpTree* body() { return body_; }
|
| bool is_positive() { return is_positive_; }
|
| int capture_count() { return capture_count_; }
|
| @@ -2714,17 +2728,17 @@ class RegExpLookahead FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpBackReference FINAL : public RegExpTree {
|
| +class RegExpBackReference V8_FINAL : public RegExpTree {
|
| public:
|
| explicit RegExpBackReference(RegExpCapture* capture)
|
| : capture_(capture) { }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpBackReference* AsBackReference() OVERRIDE;
|
| - virtual bool IsBackReference() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return 0; }
|
| - virtual int max_match() OVERRIDE { return capture_->max_match(); }
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpBackReference* AsBackReference() V8_OVERRIDE;
|
| + virtual bool IsBackReference() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return 0; }
|
| + virtual int max_match() V8_OVERRIDE { return capture_->max_match(); }
|
| int index() { return capture_->index(); }
|
| RegExpCapture* capture() { return capture_; }
|
| private:
|
| @@ -2732,16 +2746,16 @@ class RegExpBackReference FINAL : public RegExpTree {
|
| };
|
|
|
|
|
| -class RegExpEmpty FINAL : public RegExpTree {
|
| +class RegExpEmpty V8_FINAL : public RegExpTree {
|
| public:
|
| RegExpEmpty() { }
|
| - virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
|
| + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
|
| virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
| - RegExpNode* on_success) OVERRIDE;
|
| - virtual RegExpEmpty* AsEmpty() OVERRIDE;
|
| - virtual bool IsEmpty() OVERRIDE;
|
| - virtual int min_match() OVERRIDE { return 0; }
|
| - virtual int max_match() OVERRIDE { return 0; }
|
| + RegExpNode* on_success) V8_OVERRIDE;
|
| + virtual RegExpEmpty* AsEmpty() V8_OVERRIDE;
|
| + virtual bool IsEmpty() V8_OVERRIDE;
|
| + virtual int min_match() V8_OVERRIDE { return 0; }
|
| + virtual int max_match() V8_OVERRIDE { return 0; }
|
| static RegExpEmpty* GetInstance() {
|
| static RegExpEmpty* instance = ::new RegExpEmpty();
|
| return instance;
|
| @@ -2785,7 +2799,7 @@ class AstVisitor BASE_EMBEDDED {
|
|
|
| #define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS() \
|
| public: \
|
| - virtual void Visit(AstNode* node) FINAL OVERRIDE { \
|
| + virtual void Visit(AstNode* node) V8_FINAL V8_OVERRIDE { \
|
| if (!CheckStackOverflow()) node->Accept(this); \
|
| } \
|
| \
|
| @@ -2851,7 +2865,7 @@ class AstNullVisitor BASE_EMBEDDED {
|
| // AstNode factory
|
|
|
| template<class Visitor>
|
| -class AstNodeFactory FINAL BASE_EMBEDDED {
|
| +class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| public:
|
| AstNodeFactory(Isolate* isolate, Zone* zone)
|
| : isolate_(isolate),
|
|
|