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

Side by Side Diff: src/factory.cc

Issue 2050343002: [regexp] Experimental support for regexp named captures (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 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/bootstrapper.cc ('k') | src/flag-definitions.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); 2384 store->set(JSRegExp::kTagIndex, Smi::FromInt(type));
2385 store->set(JSRegExp::kSourceIndex, *source); 2385 store->set(JSRegExp::kSourceIndex, *source);
2386 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags)); 2386 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags));
2387 store->set(JSRegExp::kIrregexpLatin1CodeIndex, uninitialized); 2387 store->set(JSRegExp::kIrregexpLatin1CodeIndex, uninitialized);
2388 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized); 2388 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized);
2389 store->set(JSRegExp::kIrregexpLatin1CodeSavedIndex, uninitialized); 2389 store->set(JSRegExp::kIrregexpLatin1CodeSavedIndex, uninitialized);
2390 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized); 2390 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized);
2391 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0)); 2391 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0));
2392 store->set(JSRegExp::kIrregexpCaptureCountIndex, 2392 store->set(JSRegExp::kIrregexpCaptureCountIndex,
2393 Smi::FromInt(capture_count)); 2393 Smi::FromInt(capture_count));
2394 store->set(JSRegExp::kIrregexpCaptureNameMapIndex, uninitialized);
2394 regexp->set_data(*store); 2395 regexp->set_data(*store);
2395 } 2396 }
2396 2397
2397 2398
2398 Handle<Object> Factory::GlobalConstantFor(Handle<Name> name) { 2399 Handle<Object> Factory::GlobalConstantFor(Handle<Name> name) {
2399 if (Name::Equals(name, undefined_string())) return undefined_value(); 2400 if (Name::Equals(name, undefined_string())) return undefined_value();
2400 if (Name::Equals(name, nan_string())) return nan_value(); 2401 if (Name::Equals(name, nan_string())) return nan_value();
2401 if (Name::Equals(name, infinity_string())) return infinity_value(); 2402 if (Name::Equals(name, infinity_string())) return infinity_value();
2402 return Handle<Object>::null(); 2403 return Handle<Object>::null();
2403 } 2404 }
2404 2405
2405 2406
2406 Handle<Object> Factory::ToBoolean(bool value) { 2407 Handle<Object> Factory::ToBoolean(bool value) {
2407 return value ? true_value() : false_value(); 2408 return value ? true_value() : false_value();
2408 } 2409 }
2409 2410
2410 2411
2411 } // namespace internal 2412 } // namespace internal
2412 } // namespace v8 2413 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698