OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 Handle<String> pattern = isolate->factory()-> | 505 Handle<String> pattern = isolate->factory()-> |
506 NewStringFromUtf8(CStrVector(input)); | 506 NewStringFromUtf8(CStrVector(input)); |
507 Handle<String> sample_subject = | 507 Handle<String> sample_subject = |
508 isolate->factory()->NewStringFromUtf8(CStrVector("")); | 508 isolate->factory()->NewStringFromUtf8(CStrVector("")); |
509 RegExpEngine::Compile(&compile_data, | 509 RegExpEngine::Compile(&compile_data, |
510 false, | 510 false, |
511 false, | 511 false, |
512 multiline, | 512 multiline, |
513 pattern, | 513 pattern, |
514 sample_subject, | 514 sample_subject, |
515 is_ascii); | 515 is_ascii, |
| 516 isolate->zone()); |
516 return compile_data.node; | 517 return compile_data.node; |
517 } | 518 } |
518 | 519 |
519 | 520 |
520 static void Execute(const char* input, | 521 static void Execute(const char* input, |
521 bool multiline, | 522 bool multiline, |
522 bool is_ascii, | 523 bool is_ascii, |
523 bool dot_output = false) { | 524 bool dot_output = false) { |
524 v8::HandleScope scope; | 525 v8::HandleScope scope; |
525 ZoneScope zone_scope(Isolate::Current(), DELETE_ON_EXIT); | 526 ZoneScope zone_scope(Isolate::Current(), DELETE_ON_EXIT); |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1764 ZoneList<CharacterRange> first_only(4); | 1765 ZoneList<CharacterRange> first_only(4); |
1765 ZoneList<CharacterRange> second_only(4); | 1766 ZoneList<CharacterRange> second_only(4); |
1766 ZoneList<CharacterRange> both(4); | 1767 ZoneList<CharacterRange> both(4); |
1767 } | 1768 } |
1768 | 1769 |
1769 | 1770 |
1770 TEST(Graph) { | 1771 TEST(Graph) { |
1771 V8::Initialize(NULL); | 1772 V8::Initialize(NULL); |
1772 Execute("\\b\\w+\\b", false, true, true); | 1773 Execute("\\b\\w+\\b", false, true, true); |
1773 } | 1774 } |
OLD | NEW |