OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_AST_H_ | 5 #ifndef V8_AST_H_ |
6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3110 class RegExpEmpty FINAL : public RegExpTree { | 3110 class RegExpEmpty FINAL : public RegExpTree { |
3111 public: | 3111 public: |
3112 RegExpEmpty() { } | 3112 RegExpEmpty() { } |
3113 virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE; | 3113 virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE; |
3114 virtual RegExpNode* ToNode(RegExpCompiler* compiler, | 3114 virtual RegExpNode* ToNode(RegExpCompiler* compiler, |
3115 RegExpNode* on_success) OVERRIDE; | 3115 RegExpNode* on_success) OVERRIDE; |
3116 virtual RegExpEmpty* AsEmpty() OVERRIDE; | 3116 virtual RegExpEmpty* AsEmpty() OVERRIDE; |
3117 virtual bool IsEmpty() OVERRIDE; | 3117 virtual bool IsEmpty() OVERRIDE; |
3118 virtual int min_match() OVERRIDE { return 0; } | 3118 virtual int min_match() OVERRIDE { return 0; } |
3119 virtual int max_match() OVERRIDE { return 0; } | 3119 virtual int max_match() OVERRIDE { return 0; } |
3120 static RegExpEmpty* GetInstance() { | |
3121 static RegExpEmpty* instance = ::new RegExpEmpty(); | |
3122 return instance; | |
3123 } | |
3124 }; | 3120 }; |
3125 | 3121 |
3126 | 3122 |
3127 // ---------------------------------------------------------------------------- | 3123 // ---------------------------------------------------------------------------- |
3128 // Out-of-line inline constructors (to side-step cyclic dependencies). | 3124 // Out-of-line inline constructors (to side-step cyclic dependencies). |
3129 | 3125 |
3130 inline ModuleVariable::ModuleVariable(Zone* zone, VariableProxy* proxy, int pos) | 3126 inline ModuleVariable::ModuleVariable(Zone* zone, VariableProxy* proxy, int pos) |
3131 : Module(zone, proxy->interface(), pos), | 3127 : Module(zone, proxy->interface(), pos), |
3132 proxy_(proxy) { | 3128 proxy_(proxy) { |
3133 } | 3129 } |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3710 private: | 3706 private: |
3711 Zone* zone_; | 3707 Zone* zone_; |
3712 Visitor visitor_; | 3708 Visitor visitor_; |
3713 AstValueFactory* ast_value_factory_; | 3709 AstValueFactory* ast_value_factory_; |
3714 }; | 3710 }; |
3715 | 3711 |
3716 | 3712 |
3717 } } // namespace v8::internal | 3713 } } // namespace v8::internal |
3718 | 3714 |
3719 #endif // V8_AST_H_ | 3715 #endif // V8_AST_H_ |
OLD | NEW |