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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 // Set the length for the function to satisfy ECMA-262. | 1343 // Set the length for the function to satisfy ECMA-262. |
1344 next->shared()->set_length(0); | 1344 next->shared()->set_length(0); |
1345 | 1345 |
1346 Handle<JSFunction> array_iterator_function = CreateFunction( | 1346 Handle<JSFunction> array_iterator_function = CreateFunction( |
1347 isolate, factory->ArrayIterator_string(), | 1347 isolate, factory->ArrayIterator_string(), |
1348 JS_FAST_ARRAY_VALUE_ITERATOR_TYPE, JSArrayIterator::kSize, | 1348 JS_FAST_ARRAY_VALUE_ITERATOR_TYPE, JSArrayIterator::kSize, |
1349 array_iterator_prototype, Builtins::kIllegal); | 1349 array_iterator_prototype, Builtins::kIllegal); |
1350 array_iterator_function->shared()->set_instance_class_name( | 1350 array_iterator_function->shared()->set_instance_class_name( |
1351 isolate->heap()->ArrayIterator_string()); | 1351 isolate->heap()->ArrayIterator_string()); |
1352 | 1352 |
| 1353 native_context()->set_initial_array_iterator_prototype( |
| 1354 *array_iterator_prototype); |
| 1355 native_context()->set_initial_array_iterator_prototype_map( |
| 1356 array_iterator_prototype->map()); |
| 1357 |
1353 Handle<Map> initial_map(array_iterator_function->initial_map(), isolate); | 1358 Handle<Map> initial_map(array_iterator_function->initial_map(), isolate); |
1354 | 1359 |
1355 #define ARRAY_ITERATOR_LIST(V) \ | 1360 #define ARRAY_ITERATOR_LIST(V) \ |
1356 V(TYPED_ARRAY, KEY, typed_array, key) \ | 1361 V(TYPED_ARRAY, KEY, typed_array, key) \ |
1357 V(FAST_ARRAY, KEY, fast_array, key) \ | 1362 V(FAST_ARRAY, KEY, fast_array, key) \ |
1358 V(GENERIC_ARRAY, KEY, array, key) \ | 1363 V(GENERIC_ARRAY, KEY, array, key) \ |
1359 V(UINT8_ARRAY, KEY_VALUE, uint8_array, key_value) \ | 1364 V(UINT8_ARRAY, KEY_VALUE, uint8_array, key_value) \ |
1360 V(INT8_ARRAY, KEY_VALUE, int8_array, key_value) \ | 1365 V(INT8_ARRAY, KEY_VALUE, int8_array, key_value) \ |
1361 V(UINT16_ARRAY, KEY_VALUE, uint16_array, key_value) \ | 1366 V(UINT16_ARRAY, KEY_VALUE, uint16_array, key_value) \ |
1362 V(INT16_ARRAY, KEY_VALUE, int16_array, key_value) \ | 1367 V(INT16_ARRAY, KEY_VALUE, int16_array, key_value) \ |
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4560 } | 4565 } |
4561 | 4566 |
4562 | 4567 |
4563 // Called when the top-level V8 mutex is destroyed. | 4568 // Called when the top-level V8 mutex is destroyed. |
4564 void Bootstrapper::FreeThreadResources() { | 4569 void Bootstrapper::FreeThreadResources() { |
4565 DCHECK(!IsActive()); | 4570 DCHECK(!IsActive()); |
4566 } | 4571 } |
4567 | 4572 |
4568 } // namespace internal | 4573 } // namespace internal |
4569 } // namespace v8 | 4574 } // namespace v8 |
OLD | NEW |