| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 4739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4750 else | 4750 else |
| 4751 return empty(); | 4751 return empty(); |
| 4752 } | 4752 } |
| 4753 | 4753 |
| 4754 | 4754 |
| 4755 // ------------------------------------------------------------------- | 4755 // ------------------------------------------------------------------- |
| 4756 // Analysis | 4756 // Analysis |
| 4757 | 4757 |
| 4758 | 4758 |
| 4759 void Analysis::EnsureAnalyzed(RegExpNode* that) { | 4759 void Analysis::EnsureAnalyzed(RegExpNode* that) { |
| 4760 StackLimitCheck check; | 4760 StackLimitCheck check(Isolate::Current()); |
| 4761 if (check.HasOverflowed()) { | 4761 if (check.HasOverflowed()) { |
| 4762 fail("Stack overflow"); | 4762 fail("Stack overflow"); |
| 4763 return; | 4763 return; |
| 4764 } | 4764 } |
| 4765 if (that->info()->been_analyzed || that->info()->being_analyzed) | 4765 if (that->info()->been_analyzed || that->info()->being_analyzed) |
| 4766 return; | 4766 return; |
| 4767 that->info()->being_analyzed = true; | 4767 that->info()->being_analyzed = true; |
| 4768 that->Accept(this); | 4768 that->Accept(this); |
| 4769 that->info()->being_analyzed = false; | 4769 that->info()->being_analyzed = false; |
| 4770 that->info()->been_analyzed = true; | 4770 that->info()->been_analyzed = true; |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5249 #endif // V8_INTERPRETED_REGEXP | 5249 #endif // V8_INTERPRETED_REGEXP |
| 5250 | 5250 |
| 5251 return compiler.Assemble(¯o_assembler, | 5251 return compiler.Assemble(¯o_assembler, |
| 5252 node, | 5252 node, |
| 5253 data->capture_count, | 5253 data->capture_count, |
| 5254 pattern); | 5254 pattern); |
| 5255 } | 5255 } |
| 5256 | 5256 |
| 5257 | 5257 |
| 5258 }} // namespace v8::internal | 5258 }} // namespace v8::internal |
| OLD | NEW |