Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_AST_H_ | 28 #ifndef V8_AST_H_ |
| 29 #define V8_AST_H_ | 29 #define V8_AST_H_ |
| 30 | 30 |
| 31 #include <limits.h> | |
|
Mads Ager (chromium)
2008/12/17 12:00:49
Remove this and use kMaxInt from globals.h?
| |
| 32 | |
| 31 #include "execution.h" | 33 #include "execution.h" |
| 32 #include "factory.h" | 34 #include "factory.h" |
| 33 #include "runtime.h" | 35 #include "runtime.h" |
| 34 #include "token.h" | 36 #include "token.h" |
| 35 #include "variables.h" | 37 #include "variables.h" |
| 36 #include "macro-assembler.h" | 38 #include "macro-assembler.h" |
| 37 #include "jsregexp.h" | 39 #include "jsregexp.h" |
| 38 | 40 |
| 39 namespace v8 { namespace internal { | 41 namespace v8 { namespace internal { |
| 40 | 42 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 V(Slot) \ | 76 V(Slot) \ |
| 75 V(VariableProxy) \ | 77 V(VariableProxy) \ |
| 76 V(Literal) \ | 78 V(Literal) \ |
| 77 V(RegExpLiteral) \ | 79 V(RegExpLiteral) \ |
| 78 V(ObjectLiteral) \ | 80 V(ObjectLiteral) \ |
| 79 V(ArrayLiteral) \ | 81 V(ArrayLiteral) \ |
| 80 V(Assignment) \ | 82 V(Assignment) \ |
| 81 V(Throw) \ | 83 V(Throw) \ |
| 82 V(Property) \ | 84 V(Property) \ |
| 83 V(Call) \ | 85 V(Call) \ |
| 84 V(CallEval) \ | 86 V(CallEval) \ |
| 85 V(CallNew) \ | 87 V(CallNew) \ |
| 86 V(CallRuntime) \ | 88 V(CallRuntime) \ |
| 87 V(UnaryOperation) \ | 89 V(UnaryOperation) \ |
| 88 V(CountOperation) \ | 90 V(CountOperation) \ |
| 89 V(BinaryOperation) \ | 91 V(BinaryOperation) \ |
| 90 V(CompareOperation) \ | 92 V(CompareOperation) \ |
| 91 V(ThisFunction) | 93 V(ThisFunction) |
| 92 | 94 |
| 93 | 95 |
| 94 #define DEF_FORWARD_DECLARATION(type) class type; | 96 #define DEF_FORWARD_DECLARATION(type) class type; |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1206 virtual void Accept(AstVisitor* v); | 1208 virtual void Accept(AstVisitor* v); |
| 1207 }; | 1209 }; |
| 1208 | 1210 |
| 1209 | 1211 |
| 1210 // ---------------------------------------------------------------------------- | 1212 // ---------------------------------------------------------------------------- |
| 1211 // Regular expressions | 1213 // Regular expressions |
| 1212 | 1214 |
| 1213 | 1215 |
| 1214 class RegExpTree: public ZoneObject { | 1216 class RegExpTree: public ZoneObject { |
| 1215 public: | 1217 public: |
| 1216 static const int kInfinity = (1<<31)-1; | 1218 static const int kInfinity = INT_MAX; |
| 1217 virtual ~RegExpTree() { } | 1219 virtual ~RegExpTree() { } |
| 1218 virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; | 1220 virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; |
| 1219 virtual RegExpNode* ToNode(RegExpCompiler* compiler, | 1221 virtual RegExpNode* ToNode(RegExpCompiler* compiler, |
| 1220 RegExpNode* on_success) = 0; | 1222 RegExpNode* on_success) = 0; |
| 1221 virtual bool IsTextElement() { return false; } | 1223 virtual bool IsTextElement() { return false; } |
| 1222 virtual int min_match() = 0; | 1224 virtual int min_match() = 0; |
| 1223 virtual int max_match() = 0; | 1225 virtual int max_match() = 0; |
| 1224 virtual void AppendToText(RegExpText* text); | 1226 virtual void AppendToText(RegExpText* text); |
| 1225 SmartPointer<const char> ToString(); | 1227 SmartPointer<const char> ToString(); |
| 1226 #define MAKE_ASTYPE(Name) \ | 1228 #define MAKE_ASTYPE(Name) \ |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1539 #undef DEF_VISIT | 1541 #undef DEF_VISIT |
| 1540 | 1542 |
| 1541 private: | 1543 private: |
| 1542 bool stack_overflow_; | 1544 bool stack_overflow_; |
| 1543 }; | 1545 }; |
| 1544 | 1546 |
| 1545 | 1547 |
| 1546 } } // namespace v8::internal | 1548 } } // namespace v8::internal |
| 1547 | 1549 |
| 1548 #endif // V8_AST_H_ | 1550 #endif // V8_AST_H_ |
| OLD | NEW |