OLD | NEW |
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 Loading... |
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 |
OLD | NEW |