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 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); | 2376 store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); |
2377 store->set(JSRegExp::kSourceIndex, *source); | 2377 store->set(JSRegExp::kSourceIndex, *source); |
2378 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags)); | 2378 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags)); |
2379 store->set(JSRegExp::kIrregexpLatin1CodeIndex, uninitialized); | 2379 store->set(JSRegExp::kIrregexpLatin1CodeIndex, uninitialized); |
2380 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized); | 2380 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized); |
2381 store->set(JSRegExp::kIrregexpLatin1CodeSavedIndex, uninitialized); | 2381 store->set(JSRegExp::kIrregexpLatin1CodeSavedIndex, uninitialized); |
2382 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized); | 2382 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized); |
2383 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0)); | 2383 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0)); |
2384 store->set(JSRegExp::kIrregexpCaptureCountIndex, | 2384 store->set(JSRegExp::kIrregexpCaptureCountIndex, |
2385 Smi::FromInt(capture_count)); | 2385 Smi::FromInt(capture_count)); |
| 2386 store->set(JSRegExp::kIrregexpCaptureNameMapIndex, uninitialized); |
2386 regexp->set_data(*store); | 2387 regexp->set_data(*store); |
2387 } | 2388 } |
2388 | 2389 |
2389 | 2390 |
2390 Handle<Object> Factory::GlobalConstantFor(Handle<Name> name) { | 2391 Handle<Object> Factory::GlobalConstantFor(Handle<Name> name) { |
2391 if (Name::Equals(name, undefined_string())) return undefined_value(); | 2392 if (Name::Equals(name, undefined_string())) return undefined_value(); |
2392 if (Name::Equals(name, nan_string())) return nan_value(); | 2393 if (Name::Equals(name, nan_string())) return nan_value(); |
2393 if (Name::Equals(name, infinity_string())) return infinity_value(); | 2394 if (Name::Equals(name, infinity_string())) return infinity_value(); |
2394 return Handle<Object>::null(); | 2395 return Handle<Object>::null(); |
2395 } | 2396 } |
2396 | 2397 |
2397 | 2398 |
2398 Handle<Object> Factory::ToBoolean(bool value) { | 2399 Handle<Object> Factory::ToBoolean(bool value) { |
2399 return value ? true_value() : false_value(); | 2400 return value ? true_value() : false_value(); |
2400 } | 2401 } |
2401 | 2402 |
2402 | 2403 |
2403 } // namespace internal | 2404 } // namespace internal |
2404 } // namespace v8 | 2405 } // namespace v8 |
OLD | NEW |