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

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

Issue 2146293003: [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add a basic impl in ElementsAccessor, cleanup %ArrayIncludes_Slow, lots of new tests Created 4 years, 5 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/api-natives.h" 9 #include "src/api-natives.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 25 matching lines...) Expand all
36 BUILTIN_LIST_C(FORWARD_DECLARE) 36 BUILTIN_LIST_C(FORWARD_DECLARE)
37 #undef FORWARD_DECLARE 37 #undef FORWARD_DECLARE
38 38
39 BUILTIN(Illegal) { 39 BUILTIN(Illegal) {
40 UNREACHABLE(); 40 UNREACHABLE();
41 return isolate->heap()->undefined_value(); // Make compiler happy. 41 return isolate->heap()->undefined_value(); // Make compiler happy.
42 } 42 }
43 43
44 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); } 44 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); }
45 45
46
47 void Builtins::Generate_ObjectHasOwnProperty(CodeStubAssembler* assembler) { 46 void Builtins::Generate_ObjectHasOwnProperty(CodeStubAssembler* assembler) {
48 typedef compiler::Node Node; 47 typedef compiler::Node Node;
49 typedef CodeStubAssembler::Label Label; 48 typedef CodeStubAssembler::Label Label;
50 typedef CodeStubAssembler::Variable Variable; 49 typedef CodeStubAssembler::Variable Variable;
51 50
52 Node* object = assembler->Parameter(0); 51 Node* object = assembler->Parameter(0);
53 Node* key = assembler->Parameter(1); 52 Node* key = assembler->Parameter(1);
54 Node* context = assembler->Parameter(4); 53 Node* context = assembler->Parameter(4);
55 54
56 Label call_runtime(assembler), return_true(assembler), 55 Label call_runtime(assembler), return_true(assembler),
(...skipping 5750 matching lines...) Expand 10 before | Expand all | Expand 10 after
5807 #define DEFINE_BUILTIN_ACCESSOR(Name, ...) \ 5806 #define DEFINE_BUILTIN_ACCESSOR(Name, ...) \
5808 Handle<Code> Builtins::Name() { \ 5807 Handle<Code> Builtins::Name() { \
5809 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##Name)); \ 5808 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##Name)); \
5810 return Handle<Code>(code_address); \ 5809 return Handle<Code>(code_address); \
5811 } 5810 }
5812 BUILTIN_LIST_ALL(DEFINE_BUILTIN_ACCESSOR) 5811 BUILTIN_LIST_ALL(DEFINE_BUILTIN_ACCESSOR)
5813 #undef DEFINE_BUILTIN_ACCESSOR 5812 #undef DEFINE_BUILTIN_ACCESSOR
5814 5813
5815 } // namespace internal 5814 } // namespace internal
5816 } // namespace v8 5815 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698