Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: src/jsregexp.cc

Issue 1143583002: Remove Isolate::Current() call from jsregexp (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/jsregexp.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/compilation-cache.h" 9 #include "src/compilation-cache.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 int budget, 2274 int budget,
2275 bool not_at_start) { 2275 bool not_at_start) {
2276 if (budget <= 0) return 0; 2276 if (budget <= 0) return 0;
2277 if (action_type_ == POSITIVE_SUBMATCH_SUCCESS) return 0; // Rewinds input! 2277 if (action_type_ == POSITIVE_SUBMATCH_SUCCESS) return 0; // Rewinds input!
2278 return on_success()->EatsAtLeast(still_to_find, 2278 return on_success()->EatsAtLeast(still_to_find,
2279 budget - 1, 2279 budget - 1,
2280 not_at_start); 2280 not_at_start);
2281 } 2281 }
2282 2282
2283 2283
2284 void ActionNode::FillInBMInfo(int offset, 2284 void ActionNode::FillInBMInfo(Isolate* isolate, int offset, int budget,
2285 int budget, 2285 BoyerMooreLookahead* bm, bool not_at_start) {
2286 BoyerMooreLookahead* bm,
2287 bool not_at_start) {
2288 if (action_type_ == BEGIN_SUBMATCH) { 2286 if (action_type_ == BEGIN_SUBMATCH) {
2289 bm->SetRest(offset); 2287 bm->SetRest(offset);
2290 } else if (action_type_ != POSITIVE_SUBMATCH_SUCCESS) { 2288 } else if (action_type_ != POSITIVE_SUBMATCH_SUCCESS) {
2291 on_success()->FillInBMInfo(offset, budget - 1, bm, not_at_start); 2289 on_success()->FillInBMInfo(isolate, offset, budget - 1, bm, not_at_start);
2292 } 2290 }
2293 SaveBMInfo(bm, not_at_start, offset); 2291 SaveBMInfo(bm, not_at_start, offset);
2294 } 2292 }
2295 2293
2296 2294
2297 int AssertionNode::EatsAtLeast(int still_to_find, 2295 int AssertionNode::EatsAtLeast(int still_to_find,
2298 int budget, 2296 int budget,
2299 bool not_at_start) { 2297 bool not_at_start) {
2300 if (budget <= 0) return 0; 2298 if (budget <= 0) return 0;
2301 // If we know we are not at the start and we are asked "how many characters 2299 // If we know we are not at the start and we are asked "how many characters
2302 // will you match if you succeed?" then we can answer anything since false 2300 // will you match if you succeed?" then we can answer anything since false
2303 // implies false. So lets just return the max answer (still_to_find) since 2301 // implies false. So lets just return the max answer (still_to_find) since
2304 // that won't prevent us from preloading a lot of characters for the other 2302 // that won't prevent us from preloading a lot of characters for the other
2305 // branches in the node graph. 2303 // branches in the node graph.
2306 if (assertion_type() == AT_START && not_at_start) return still_to_find; 2304 if (assertion_type() == AT_START && not_at_start) return still_to_find;
2307 return on_success()->EatsAtLeast(still_to_find, 2305 return on_success()->EatsAtLeast(still_to_find,
2308 budget - 1, 2306 budget - 1,
2309 not_at_start); 2307 not_at_start);
2310 } 2308 }
2311 2309
2312 2310
2313 void AssertionNode::FillInBMInfo(int offset, 2311 void AssertionNode::FillInBMInfo(Isolate* isolate, int offset, int budget,
2314 int budget, 2312 BoyerMooreLookahead* bm, bool not_at_start) {
2315 BoyerMooreLookahead* bm,
2316 bool not_at_start) {
2317 // Match the behaviour of EatsAtLeast on this node. 2313 // Match the behaviour of EatsAtLeast on this node.
2318 if (assertion_type() == AT_START && not_at_start) return; 2314 if (assertion_type() == AT_START && not_at_start) return;
2319 on_success()->FillInBMInfo(offset, budget - 1, bm, not_at_start); 2315 on_success()->FillInBMInfo(isolate, offset, budget - 1, bm, not_at_start);
2320 SaveBMInfo(bm, not_at_start, offset); 2316 SaveBMInfo(bm, not_at_start, offset);
2321 } 2317 }
2322 2318
2323 2319
2324 int BackReferenceNode::EatsAtLeast(int still_to_find, 2320 int BackReferenceNode::EatsAtLeast(int still_to_find,
2325 int budget, 2321 int budget,
2326 bool not_at_start) { 2322 bool not_at_start) {
2327 if (budget <= 0) return 0; 2323 if (budget <= 0) return 0;
2328 return on_success()->EatsAtLeast(still_to_find, 2324 return on_success()->EatsAtLeast(still_to_find,
2329 budget - 1, 2325 budget - 1,
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 bool not_at_start) { 2934 bool not_at_start) {
2939 if (body_can_be_zero_length_ || info()->visited) return; 2935 if (body_can_be_zero_length_ || info()->visited) return;
2940 VisitMarker marker(info()); 2936 VisitMarker marker(info());
2941 return ChoiceNode::GetQuickCheckDetails(details, 2937 return ChoiceNode::GetQuickCheckDetails(details,
2942 compiler, 2938 compiler,
2943 characters_filled_in, 2939 characters_filled_in,
2944 not_at_start); 2940 not_at_start);
2945 } 2941 }
2946 2942
2947 2943
2948 void LoopChoiceNode::FillInBMInfo(int offset, 2944 void LoopChoiceNode::FillInBMInfo(Isolate* isolate, int offset, int budget,
2949 int budget, 2945 BoyerMooreLookahead* bm, bool not_at_start) {
2950 BoyerMooreLookahead* bm,
2951 bool not_at_start) {
2952 if (body_can_be_zero_length_ || budget <= 0) { 2946 if (body_can_be_zero_length_ || budget <= 0) {
2953 bm->SetRest(offset); 2947 bm->SetRest(offset);
2954 SaveBMInfo(bm, not_at_start, offset); 2948 SaveBMInfo(bm, not_at_start, offset);
2955 return; 2949 return;
2956 } 2950 }
2957 ChoiceNode::FillInBMInfo(offset, budget - 1, bm, not_at_start); 2951 ChoiceNode::FillInBMInfo(isolate, offset, budget - 1, bm, not_at_start);
2958 SaveBMInfo(bm, not_at_start, offset); 2952 SaveBMInfo(bm, not_at_start, offset);
2959 } 2953 }
2960 2954
2961 2955
2962 void ChoiceNode::GetQuickCheckDetails(QuickCheckDetails* details, 2956 void ChoiceNode::GetQuickCheckDetails(QuickCheckDetails* details,
2963 RegExpCompiler* compiler, 2957 RegExpCompiler* compiler,
2964 int characters_filled_in, 2958 int characters_filled_in,
2965 bool not_at_start) { 2959 bool not_at_start) {
2966 not_at_start = (not_at_start || not_at_start_); 2960 not_at_start = (not_at_start || not_at_start_);
2967 int choice_count = alternatives_->length(); 2961 int choice_count = alternatives_->length();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 assembler->CheckNotCharacter('\r', new_trace.backtrack()); 3033 assembler->CheckNotCharacter('\r', new_trace.backtrack());
3040 } 3034 }
3041 assembler->Bind(&ok); 3035 assembler->Bind(&ok);
3042 on_success->Emit(compiler, &new_trace); 3036 on_success->Emit(compiler, &new_trace);
3043 } 3037 }
3044 3038
3045 3039
3046 // Emit the code to handle \b and \B (word-boundary or non-word-boundary). 3040 // Emit the code to handle \b and \B (word-boundary or non-word-boundary).
3047 void AssertionNode::EmitBoundaryCheck(RegExpCompiler* compiler, Trace* trace) { 3041 void AssertionNode::EmitBoundaryCheck(RegExpCompiler* compiler, Trace* trace) {
3048 RegExpMacroAssembler* assembler = compiler->macro_assembler(); 3042 RegExpMacroAssembler* assembler = compiler->macro_assembler();
3043 Isolate* isolate = assembler->isolate();
3049 Trace::TriBool next_is_word_character = Trace::UNKNOWN; 3044 Trace::TriBool next_is_word_character = Trace::UNKNOWN;
3050 bool not_at_start = (trace->at_start() == Trace::FALSE_VALUE); 3045 bool not_at_start = (trace->at_start() == Trace::FALSE_VALUE);
3051 BoyerMooreLookahead* lookahead = bm_info(not_at_start); 3046 BoyerMooreLookahead* lookahead = bm_info(not_at_start);
3052 if (lookahead == NULL) { 3047 if (lookahead == NULL) {
3053 int eats_at_least = 3048 int eats_at_least =
3054 Min(kMaxLookaheadForBoyerMoore, EatsAtLeast(kMaxLookaheadForBoyerMoore, 3049 Min(kMaxLookaheadForBoyerMoore, EatsAtLeast(kMaxLookaheadForBoyerMoore,
3055 kRecursionBudget, 3050 kRecursionBudget,
3056 not_at_start)); 3051 not_at_start));
3057 if (eats_at_least >= 1) { 3052 if (eats_at_least >= 1) {
3058 BoyerMooreLookahead* bm = 3053 BoyerMooreLookahead* bm =
3059 new(zone()) BoyerMooreLookahead(eats_at_least, compiler, zone()); 3054 new(zone()) BoyerMooreLookahead(eats_at_least, compiler, zone());
3060 FillInBMInfo(0, kRecursionBudget, bm, not_at_start); 3055 FillInBMInfo(isolate, 0, kRecursionBudget, bm, not_at_start);
3061 if (bm->at(0)->is_non_word()) 3056 if (bm->at(0)->is_non_word())
3062 next_is_word_character = Trace::FALSE_VALUE; 3057 next_is_word_character = Trace::FALSE_VALUE;
3063 if (bm->at(0)->is_word()) next_is_word_character = Trace::TRUE_VALUE; 3058 if (bm->at(0)->is_word()) next_is_word_character = Trace::TRUE_VALUE;
3064 } 3059 }
3065 } else { 3060 } else {
3066 if (lookahead->at(0)->is_non_word()) 3061 if (lookahead->at(0)->is_non_word())
3067 next_is_word_character = Trace::FALSE_VALUE; 3062 next_is_word_character = Trace::FALSE_VALUE;
3068 if (lookahead->at(0)->is_word()) 3063 if (lookahead->at(0)->is_word())
3069 next_is_word_character = Trace::TRUE_VALUE; 3064 next_is_word_character = Trace::TRUE_VALUE;
3070 } 3065 }
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
4065 4060
4066 // Really we should be creating a new trace when we execute this function, 4061 // Really we should be creating a new trace when we execute this function,
4067 // but there is no need, because the code it generates cannot backtrack, and 4062 // but there is no need, because the code it generates cannot backtrack, and
4068 // we always arrive here with a trivial trace (since it's the entry to a 4063 // we always arrive here with a trivial trace (since it's the entry to a
4069 // loop. That also implies that there are no preloaded characters, which is 4064 // loop. That also implies that there are no preloaded characters, which is
4070 // good, because it means we won't be violating any assumptions by 4065 // good, because it means we won't be violating any assumptions by
4071 // overwriting those characters with new load instructions. 4066 // overwriting those characters with new load instructions.
4072 DCHECK(trace->is_trivial()); 4067 DCHECK(trace->is_trivial());
4073 4068
4074 RegExpMacroAssembler* macro_assembler = compiler->macro_assembler(); 4069 RegExpMacroAssembler* macro_assembler = compiler->macro_assembler();
4070 Isolate* isolate = macro_assembler->isolate();
4075 // At this point we know that we are at a non-greedy loop that will eat 4071 // At this point we know that we are at a non-greedy loop that will eat
4076 // any character one at a time. Any non-anchored regexp has such a 4072 // any character one at a time. Any non-anchored regexp has such a
4077 // loop prepended to it in order to find where it starts. We look for 4073 // loop prepended to it in order to find where it starts. We look for
4078 // a pattern of the form ...abc... where we can look 6 characters ahead 4074 // a pattern of the form ...abc... where we can look 6 characters ahead
4079 // and step forwards 3 if the character is not one of abc. Abc need 4075 // and step forwards 3 if the character is not one of abc. Abc need
4080 // not be atoms, they can be any reasonably limited character class or 4076 // not be atoms, they can be any reasonably limited character class or
4081 // small alternation. 4077 // small alternation.
4082 BoyerMooreLookahead* bm = bm_info(false); 4078 BoyerMooreLookahead* bm = bm_info(false);
4083 if (bm == NULL) { 4079 if (bm == NULL) {
4084 eats_at_least = Min(kMaxLookaheadForBoyerMoore, 4080 eats_at_least = Min(kMaxLookaheadForBoyerMoore,
4085 EatsAtLeast(kMaxLookaheadForBoyerMoore, 4081 EatsAtLeast(kMaxLookaheadForBoyerMoore,
4086 kRecursionBudget, 4082 kRecursionBudget,
4087 false)); 4083 false));
4088 if (eats_at_least >= 1) { 4084 if (eats_at_least >= 1) {
4089 bm = new(zone()) BoyerMooreLookahead(eats_at_least, 4085 bm = new(zone()) BoyerMooreLookahead(eats_at_least,
4090 compiler, 4086 compiler,
4091 zone()); 4087 zone());
4092 GuardedAlternative alt0 = alternatives_->at(0); 4088 GuardedAlternative alt0 = alternatives_->at(0);
4093 alt0.node()->FillInBMInfo(0, kRecursionBudget, bm, false); 4089 alt0.node()->FillInBMInfo(isolate, 0, kRecursionBudget, bm, false);
4094 } 4090 }
4095 } 4091 }
4096 if (bm != NULL) { 4092 if (bm != NULL) {
4097 bm->EmitSkipInstructions(macro_assembler); 4093 bm->EmitSkipInstructions(macro_assembler);
4098 } 4094 }
4099 return eats_at_least; 4095 return eats_at_least;
4100 } 4096 }
4101 4097
4102 4098
4103 void ChoiceNode::EmitChoices(RegExpCompiler* compiler, 4099 void ChoiceNode::EmitChoices(RegExpCompiler* compiler,
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after
5818 void Analysis::VisitBackReference(BackReferenceNode* that) { 5814 void Analysis::VisitBackReference(BackReferenceNode* that) {
5819 EnsureAnalyzed(that->on_success()); 5815 EnsureAnalyzed(that->on_success());
5820 } 5816 }
5821 5817
5822 5818
5823 void Analysis::VisitAssertion(AssertionNode* that) { 5819 void Analysis::VisitAssertion(AssertionNode* that) {
5824 EnsureAnalyzed(that->on_success()); 5820 EnsureAnalyzed(that->on_success());
5825 } 5821 }
5826 5822
5827 5823
5828 void BackReferenceNode::FillInBMInfo(int offset, 5824 void BackReferenceNode::FillInBMInfo(Isolate* isolate, int offset, int budget,
5829 int budget,
5830 BoyerMooreLookahead* bm, 5825 BoyerMooreLookahead* bm,
5831 bool not_at_start) { 5826 bool not_at_start) {
5832 // Working out the set of characters that a backreference can match is too 5827 // Working out the set of characters that a backreference can match is too
5833 // hard, so we just say that any character can match. 5828 // hard, so we just say that any character can match.
5834 bm->SetRest(offset); 5829 bm->SetRest(offset);
5835 SaveBMInfo(bm, not_at_start, offset); 5830 SaveBMInfo(bm, not_at_start, offset);
5836 } 5831 }
5837 5832
5838 5833
5839 STATIC_ASSERT(BoyerMoorePositionInfo::kMapSize == 5834 STATIC_ASSERT(BoyerMoorePositionInfo::kMapSize ==
5840 RegExpMacroAssembler::kTableSize); 5835 RegExpMacroAssembler::kTableSize);
5841 5836
5842 5837
5843 void ChoiceNode::FillInBMInfo(int offset, 5838 void ChoiceNode::FillInBMInfo(Isolate* isolate, int offset, int budget,
5844 int budget, 5839 BoyerMooreLookahead* bm, bool not_at_start) {
5845 BoyerMooreLookahead* bm,
5846 bool not_at_start) {
5847 ZoneList<GuardedAlternative>* alts = alternatives(); 5840 ZoneList<GuardedAlternative>* alts = alternatives();
5848 budget = (budget - 1) / alts->length(); 5841 budget = (budget - 1) / alts->length();
5849 for (int i = 0; i < alts->length(); i++) { 5842 for (int i = 0; i < alts->length(); i++) {
5850 GuardedAlternative& alt = alts->at(i); 5843 GuardedAlternative& alt = alts->at(i);
5851 if (alt.guards() != NULL && alt.guards()->length() != 0) { 5844 if (alt.guards() != NULL && alt.guards()->length() != 0) {
5852 bm->SetRest(offset); // Give up trying to fill in info. 5845 bm->SetRest(offset); // Give up trying to fill in info.
5853 SaveBMInfo(bm, not_at_start, offset); 5846 SaveBMInfo(bm, not_at_start, offset);
5854 return; 5847 return;
5855 } 5848 }
5856 alt.node()->FillInBMInfo(offset, budget, bm, not_at_start); 5849 alt.node()->FillInBMInfo(isolate, offset, budget, bm, not_at_start);
5857 } 5850 }
5858 SaveBMInfo(bm, not_at_start, offset); 5851 SaveBMInfo(bm, not_at_start, offset);
5859 } 5852 }
5860 5853
5861 5854
5862 void TextNode::FillInBMInfo(int initial_offset, 5855 void TextNode::FillInBMInfo(Isolate* isolate, int initial_offset, int budget,
5863 int budget, 5856 BoyerMooreLookahead* bm, bool not_at_start) {
5864 BoyerMooreLookahead* bm,
5865 bool not_at_start) {
5866 if (initial_offset >= bm->length()) return; 5857 if (initial_offset >= bm->length()) return;
5867 int offset = initial_offset; 5858 int offset = initial_offset;
5868 int max_char = bm->max_char(); 5859 int max_char = bm->max_char();
5869 for (int i = 0; i < elements()->length(); i++) { 5860 for (int i = 0; i < elements()->length(); i++) {
5870 if (offset >= bm->length()) { 5861 if (offset >= bm->length()) {
5871 if (initial_offset == 0) set_bm_info(not_at_start, bm); 5862 if (initial_offset == 0) set_bm_info(not_at_start, bm);
5872 return; 5863 return;
5873 } 5864 }
5874 TextElement text = elements()->at(i); 5865 TextElement text = elements()->at(i);
5875 if (text.text_type() == TextElement::ATOM) { 5866 if (text.text_type() == TextElement::ATOM) {
5876 RegExpAtom* atom = text.atom(); 5867 RegExpAtom* atom = text.atom();
5877 for (int j = 0; j < atom->length(); j++, offset++) { 5868 for (int j = 0; j < atom->length(); j++, offset++) {
5878 if (offset >= bm->length()) { 5869 if (offset >= bm->length()) {
5879 if (initial_offset == 0) set_bm_info(not_at_start, bm); 5870 if (initial_offset == 0) set_bm_info(not_at_start, bm);
5880 return; 5871 return;
5881 } 5872 }
5882 uc16 character = atom->data()[j]; 5873 uc16 character = atom->data()[j];
5883 if (bm->compiler()->ignore_case()) { 5874 if (bm->compiler()->ignore_case()) {
5884 unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth]; 5875 unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth];
5885 int length = GetCaseIndependentLetters( 5876 int length = GetCaseIndependentLetters(
5886 Isolate::Current(), 5877 isolate, character, bm->max_char() == String::kMaxOneByteCharCode,
5887 character,
5888 bm->max_char() == String::kMaxOneByteCharCode,
5889 chars); 5878 chars);
5890 for (int j = 0; j < length; j++) { 5879 for (int j = 0; j < length; j++) {
5891 bm->Set(offset, chars[j]); 5880 bm->Set(offset, chars[j]);
5892 } 5881 }
5893 } else { 5882 } else {
5894 if (character <= max_char) bm->Set(offset, character); 5883 if (character <= max_char) bm->Set(offset, character);
5895 } 5884 }
5896 } 5885 }
5897 } else { 5886 } else {
5898 DCHECK_EQ(TextElement::CHAR_CLASS, text.text_type()); 5887 DCHECK_EQ(TextElement::CHAR_CLASS, text.text_type());
5899 RegExpCharacterClass* char_class = text.char_class(); 5888 RegExpCharacterClass* char_class = text.char_class();
5900 ZoneList<CharacterRange>* ranges = char_class->ranges(zone()); 5889 ZoneList<CharacterRange>* ranges = char_class->ranges(zone());
5901 if (char_class->is_negated()) { 5890 if (char_class->is_negated()) {
5902 bm->SetAll(offset); 5891 bm->SetAll(offset);
5903 } else { 5892 } else {
5904 for (int k = 0; k < ranges->length(); k++) { 5893 for (int k = 0; k < ranges->length(); k++) {
5905 CharacterRange& range = ranges->at(k); 5894 CharacterRange& range = ranges->at(k);
5906 if (range.from() > max_char) continue; 5895 if (range.from() > max_char) continue;
5907 int to = Min(max_char, static_cast<int>(range.to())); 5896 int to = Min(max_char, static_cast<int>(range.to()));
5908 bm->SetInterval(offset, Interval(range.from(), to)); 5897 bm->SetInterval(offset, Interval(range.from(), to));
5909 } 5898 }
5910 } 5899 }
5911 offset++; 5900 offset++;
5912 } 5901 }
5913 } 5902 }
5914 if (offset >= bm->length()) { 5903 if (offset >= bm->length()) {
5915 if (initial_offset == 0) set_bm_info(not_at_start, bm); 5904 if (initial_offset == 0) set_bm_info(not_at_start, bm);
5916 return; 5905 return;
5917 } 5906 }
5918 on_success()->FillInBMInfo(offset, 5907 on_success()->FillInBMInfo(isolate, offset, budget - 1, bm,
5919 budget - 1,
5920 bm,
5921 true); // Not at start after a text node. 5908 true); // Not at start after a text node.
5922 if (initial_offset == 0) set_bm_info(not_at_start, bm); 5909 if (initial_offset == 0) set_bm_info(not_at_start, bm);
5923 } 5910 }
5924 5911
5925 5912
5926 // ------------------------------------------------------------------- 5913 // -------------------------------------------------------------------
5927 // Dispatch table construction 5914 // Dispatch table construction
5928 5915
5929 5916
5930 void DispatchTableConstructor::VisitEnd(EndNode* that) { 5917 void DispatchTableConstructor::VisitEnd(EndNode* that) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
6184 Heap* heap = pattern->GetHeap(); 6171 Heap* heap = pattern->GetHeap();
6185 bool too_much = pattern->length() > RegExpImpl::kRegExpTooLargeToOptimize; 6172 bool too_much = pattern->length() > RegExpImpl::kRegExpTooLargeToOptimize;
6186 if (heap->total_regexp_code_generated() > RegExpImpl::kRegExpCompiledLimit && 6173 if (heap->total_regexp_code_generated() > RegExpImpl::kRegExpCompiledLimit &&
6187 heap->isolate()->memory_allocator()->SizeExecutable() > 6174 heap->isolate()->memory_allocator()->SizeExecutable() >
6188 RegExpImpl::kRegExpExecutableMemoryLimit) { 6175 RegExpImpl::kRegExpExecutableMemoryLimit) {
6189 too_much = true; 6176 too_much = true;
6190 } 6177 }
6191 return too_much; 6178 return too_much;
6192 } 6179 }
6193 }} // namespace v8::internal 6180 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698