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 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 bool multiline, | 1440 bool multiline, |
1441 Handle<String> pattern, | 1441 Handle<String> pattern, |
1442 bool is_ascii); | 1442 bool is_ascii); |
1443 | 1443 |
1444 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1444 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
1445 }; | 1445 }; |
1446 | 1446 |
1447 | 1447 |
1448 class OffsetsVector { | 1448 class OffsetsVector { |
1449 public: | 1449 public: |
1450 inline OffsetsVector(int num_registers) | 1450 explicit inline OffsetsVector(int num_registers) |
1451 : offsets_vector_length_(num_registers) { | 1451 : offsets_vector_length_(num_registers) { |
1452 if (offsets_vector_length_ > Isolate::kJSRegexpStaticOffsetsVectorSize) { | 1452 if (offsets_vector_length_ > Isolate::kJSRegexpStaticOffsetsVectorSize) { |
1453 vector_ = NewArray<int>(offsets_vector_length_); | 1453 vector_ = NewArray<int>(offsets_vector_length_); |
1454 } else { | 1454 } else { |
1455 vector_ = Isolate::Current()->jsregexp_static_offsets_vector(); | 1455 vector_ = Isolate::Current()->jsregexp_static_offsets_vector(); |
1456 } | 1456 } |
1457 } | 1457 } |
1458 inline ~OffsetsVector() { | 1458 inline ~OffsetsVector() { |
1459 if (offsets_vector_length_ > Isolate::kJSRegexpStaticOffsetsVectorSize) { | 1459 if (offsets_vector_length_ > Isolate::kJSRegexpStaticOffsetsVectorSize) { |
1460 DeleteArray(vector_); | 1460 DeleteArray(vector_); |
(...skipping 13 matching lines...) Expand all Loading... |
1474 int* vector_; | 1474 int* vector_; |
1475 int offsets_vector_length_; | 1475 int offsets_vector_length_; |
1476 | 1476 |
1477 friend class ExternalReference; | 1477 friend class ExternalReference; |
1478 }; | 1478 }; |
1479 | 1479 |
1480 | 1480 |
1481 } } // namespace v8::internal | 1481 } } // namespace v8::internal |
1482 | 1482 |
1483 #endif // V8_JSREGEXP_H_ | 1483 #endif // V8_JSREGEXP_H_ |
OLD | NEW |