| 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 4179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4190 native_context()->set_array_for_each_iterator(*forEach); | 4190 native_context()->set_array_for_each_iterator(*forEach); |
| 4191 | 4191 |
| 4192 // Install Array.prototype.every | 4192 // Install Array.prototype.every |
| 4193 InstallArrayBuiltinFunction(proto, "every", Builtins::kArrayEvery, 2); | 4193 InstallArrayBuiltinFunction(proto, "every", Builtins::kArrayEvery, 2); |
| 4194 | 4194 |
| 4195 // Install Array.prototype.some | 4195 // Install Array.prototype.some |
| 4196 InstallArrayBuiltinFunction(proto, "some", Builtins::kArraySome, 2); | 4196 InstallArrayBuiltinFunction(proto, "some", Builtins::kArraySome, 2); |
| 4197 | 4197 |
| 4198 // Install Array.prototype.reduce | 4198 // Install Array.prototype.reduce |
| 4199 InstallArrayBuiltinFunction(proto, "reduce", Builtins::kArrayReduce, 2); | 4199 InstallArrayBuiltinFunction(proto, "reduce", Builtins::kArrayReduce, 2); |
| 4200 |
| 4201 // Install Array.prototype.reduceRight |
| 4202 InstallArrayBuiltinFunction(proto, "reduceRight", |
| 4203 Builtins::kArrayReduceRight, 2); |
| 4200 } | 4204 } |
| 4201 | 4205 |
| 4202 // Install InternalArray.prototype.concat | 4206 // Install InternalArray.prototype.concat |
| 4203 { | 4207 { |
| 4204 Handle<JSFunction> array_constructor( | 4208 Handle<JSFunction> array_constructor( |
| 4205 native_context()->internal_array_function()); | 4209 native_context()->internal_array_function()); |
| 4206 Handle<JSObject> proto(JSObject::cast(array_constructor->prototype())); | 4210 Handle<JSObject> proto(JSObject::cast(array_constructor->prototype())); |
| 4207 Handle<JSFunction> concat = | 4211 Handle<JSFunction> concat = |
| 4208 InstallFunction(proto, "concat", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 4212 InstallFunction(proto, "concat", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 4209 MaybeHandle<JSObject>(), Builtins::kArrayConcat); | 4213 MaybeHandle<JSObject>(), Builtins::kArrayConcat); |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5096 } | 5100 } |
| 5097 | 5101 |
| 5098 | 5102 |
| 5099 // Called when the top-level V8 mutex is destroyed. | 5103 // Called when the top-level V8 mutex is destroyed. |
| 5100 void Bootstrapper::FreeThreadResources() { | 5104 void Bootstrapper::FreeThreadResources() { |
| 5101 DCHECK(!IsActive()); | 5105 DCHECK(!IsActive()); |
| 5102 } | 5106 } |
| 5103 | 5107 |
| 5104 } // namespace internal | 5108 } // namespace internal |
| 5105 } // namespace v8 | 5109 } // namespace v8 |
| OLD | NEW |