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

Side by Side Diff: src/builtins/builtins-array.cc

Issue 2232063002: [builtins] WIP: Array indexOf in TurboFan/Runtime (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 10
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 1732
1733 assembler->Bind(&return_false); 1733 assembler->Bind(&return_false);
1734 assembler->Return(assembler->BooleanConstant(false)); 1734 assembler->Return(assembler->BooleanConstant(false));
1735 1735
1736 assembler->Bind(&call_runtime); 1736 assembler->Bind(&call_runtime);
1737 assembler->Return(assembler->CallRuntime(Runtime::kArrayIncludes_Slow, 1737 assembler->Return(assembler->CallRuntime(Runtime::kArrayIncludes_Slow,
1738 context, array, search_element, 1738 context, array, search_element,
1739 start_from)); 1739 start_from));
1740 } 1740 }
1741 1741
1742 void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
1743 typedef compiler::Node Node;
1744
1745 Node* array = assembler->Parameter(0);
1746 Node* search_element = assembler->Parameter(1);
1747 Node* start_from = assembler->Parameter(2);
1748 Node* context = assembler->Parameter(3 + 2);
1749
1750 assembler->Return(assembler->CallRuntime(Runtime::kArrayIndexOf, context,
1751 array, search_element, start_from));
1752 }
1753
1742 } // namespace internal 1754 } // namespace internal
1743 } // namespace v8 1755 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins.h ('k') | src/js/array.js » ('j') | src/js/typedarray.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698