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

Side by Side Diff: src/objects.cc

Issue 2780173002: [regexp] Add support for dotAll flag (Closed)
Patch Set: Address comments Created 3 years, 8 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/objects.h ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 16122 matching lines...) Expand 10 before | Expand all | Expand 10 after
16133 switch (flags->Get(i)) { 16133 switch (flags->Get(i)) {
16134 case 'g': 16134 case 'g':
16135 flag = JSRegExp::kGlobal; 16135 flag = JSRegExp::kGlobal;
16136 break; 16136 break;
16137 case 'i': 16137 case 'i':
16138 flag = JSRegExp::kIgnoreCase; 16138 flag = JSRegExp::kIgnoreCase;
16139 break; 16139 break;
16140 case 'm': 16140 case 'm':
16141 flag = JSRegExp::kMultiline; 16141 flag = JSRegExp::kMultiline;
16142 break; 16142 break;
16143 case 's':
16144 if (FLAG_harmony_regexp_dotall) {
16145 flag = JSRegExp::kDotAll;
16146 } else {
16147 return JSRegExp::Flags(0);
16148 }
16149 break;
16143 case 'u': 16150 case 'u':
16144 flag = JSRegExp::kUnicode; 16151 flag = JSRegExp::kUnicode;
16145 break; 16152 break;
16146 case 'y': 16153 case 'y':
16147 flag = JSRegExp::kSticky; 16154 flag = JSRegExp::kSticky;
16148 break; 16155 break;
16149 default: 16156 default:
16150 return JSRegExp::Flags(0); 16157 return JSRegExp::Flags(0);
16151 } 16158 }
16152 // Duplicate flag. 16159 // Duplicate flag.
(...skipping 4241 matching lines...) Expand 10 before | Expand all | Expand 10 after
20394 // depend on this. 20401 // depend on this.
20395 return DICTIONARY_ELEMENTS; 20402 return DICTIONARY_ELEMENTS;
20396 } 20403 }
20397 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20404 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20398 return kind; 20405 return kind;
20399 } 20406 }
20400 } 20407 }
20401 20408
20402 } // namespace internal 20409 } // namespace internal
20403 } // namespace v8 20410 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698