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" |
11 #include "src/ast-value-factory.h" | 11 #include "src/ast-value-factory.h" |
12 #include "src/factory.h" | 12 #include "src/factory.h" |
13 #include "src/feedback-slots.h" | 13 #include "src/feedback-slots.h" |
14 #include "src/interface.h" | 14 #include "src/interface.h" |
15 #include "src/isolate.h" | 15 #include "src/isolate.h" |
16 #include "src/jsregexp.h" | 16 #include "src/jsregexp.h" |
17 #include "src/list-inl.h" | 17 #include "src/list-inl.h" |
| 18 #include "src/ostreams.h" |
18 #include "src/runtime.h" | 19 #include "src/runtime.h" |
19 #include "src/small-pointer-list.h" | 20 #include "src/small-pointer-list.h" |
20 #include "src/smart-pointers.h" | 21 #include "src/smart-pointers.h" |
21 #include "src/token.h" | 22 #include "src/token.h" |
22 #include "src/types.h" | 23 #include "src/types.h" |
23 #include "src/utils.h" | 24 #include "src/utils.h" |
24 #include "src/variables.h" | 25 #include "src/variables.h" |
25 #include "src/zone-inl.h" | 26 #include "src/zone-inl.h" |
26 | 27 |
27 namespace v8 { | 28 namespace v8 { |
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 RegExpNode* on_success) = 0; | 2522 RegExpNode* on_success) = 0; |
2522 virtual bool IsTextElement() { return false; } | 2523 virtual bool IsTextElement() { return false; } |
2523 virtual bool IsAnchoredAtStart() { return false; } | 2524 virtual bool IsAnchoredAtStart() { return false; } |
2524 virtual bool IsAnchoredAtEnd() { return false; } | 2525 virtual bool IsAnchoredAtEnd() { return false; } |
2525 virtual int min_match() = 0; | 2526 virtual int min_match() = 0; |
2526 virtual int max_match() = 0; | 2527 virtual int max_match() = 0; |
2527 // Returns the interval of registers used for captures within this | 2528 // Returns the interval of registers used for captures within this |
2528 // expression. | 2529 // expression. |
2529 virtual Interval CaptureRegisters() { return Interval::Empty(); } | 2530 virtual Interval CaptureRegisters() { return Interval::Empty(); } |
2530 virtual void AppendToText(RegExpText* text, Zone* zone); | 2531 virtual void AppendToText(RegExpText* text, Zone* zone); |
2531 SmartArrayPointer<const char> ToString(Zone* zone); | 2532 OStream& Print(OStream& os, Zone* zone); // NOLINT |
2532 #define MAKE_ASTYPE(Name) \ | 2533 #define MAKE_ASTYPE(Name) \ |
2533 virtual RegExp##Name* As##Name(); \ | 2534 virtual RegExp##Name* As##Name(); \ |
2534 virtual bool Is##Name(); | 2535 virtual bool Is##Name(); |
2535 FOR_EACH_REG_EXP_TREE_TYPE(MAKE_ASTYPE) | 2536 FOR_EACH_REG_EXP_TREE_TYPE(MAKE_ASTYPE) |
2536 #undef MAKE_ASTYPE | 2537 #undef MAKE_ASTYPE |
2537 }; | 2538 }; |
2538 | 2539 |
2539 | 2540 |
2540 class RegExpDisjunction V8_FINAL : public RegExpTree { | 2541 class RegExpDisjunction V8_FINAL : public RegExpTree { |
2541 public: | 2542 public: |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3424 private: | 3425 private: |
3425 Zone* zone_; | 3426 Zone* zone_; |
3426 Visitor visitor_; | 3427 Visitor visitor_; |
3427 AstValueFactory* ast_value_factory_; | 3428 AstValueFactory* ast_value_factory_; |
3428 }; | 3429 }; |
3429 | 3430 |
3430 | 3431 |
3431 } } // namespace v8::internal | 3432 } } // namespace v8::internal |
3432 | 3433 |
3433 #endif // V8_AST_H_ | 3434 #endif // V8_AST_H_ |
OLD | NEW |