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

Side by Side Diff: src/bootstrapper.cc

Issue 2776433003: [builtins] Implement Array.prototype.reduceRight in the CSA (Closed)
Patch Set: Add back accidental removals Created 3 years, 9 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 | « no previous file | src/builtins/builtins.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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698