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

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

Issue 2873653002: [array] Don't adapt arguments for ArrayIndexOf and ArrayIncludes (Closed)
Patch Set: Created 3 years, 7 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 | « src/builtins/builtins-definitions.h ('k') | no next file » | 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/elements.h" 10 #include "src/elements.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 DCHECK_EQ(0, args.length()); 51 DCHECK_EQ(0, args.length());
52 Handle<JSObject> holder = 52 Handle<JSObject> holder =
53 isolate->factory()->NewJSObject(isolate->object_function()); 53 isolate->factory()->NewJSObject(isolate->object_function());
54 54
55 InstallBuiltin(isolate, holder, "pop", Builtins::kFastArrayPop); 55 InstallBuiltin(isolate, holder, "pop", Builtins::kFastArrayPop);
56 InstallBuiltin(isolate, holder, "push", Builtins::kFastArrayPush); 56 InstallBuiltin(isolate, holder, "push", Builtins::kFastArrayPush);
57 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); 57 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift);
58 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); 58 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift);
59 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); 59 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice);
60 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); 60 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice);
61 InstallBuiltin(isolate, holder, "includes", Builtins::kArrayIncludes, 2); 61 InstallBuiltin(isolate, holder, "includes", Builtins::kArrayIncludes);
62 InstallBuiltin(isolate, holder, "indexOf", Builtins::kArrayIndexOf, 2); 62 InstallBuiltin(isolate, holder, "indexOf", Builtins::kArrayIndexOf);
63 InstallBuiltin(isolate, holder, "keys", Builtins::kArrayPrototypeKeys, 0, 63 InstallBuiltin(isolate, holder, "keys", Builtins::kArrayPrototypeKeys, 0,
64 kArrayKeys); 64 kArrayKeys);
65 InstallBuiltin(isolate, holder, "values", Builtins::kArrayPrototypeValues, 0, 65 InstallBuiltin(isolate, holder, "values", Builtins::kArrayPrototypeValues, 0,
66 kArrayValues); 66 kArrayValues);
67 InstallBuiltin(isolate, holder, "entries", Builtins::kArrayPrototypeEntries, 67 InstallBuiltin(isolate, holder, "entries", Builtins::kArrayPrototypeEntries,
68 0, kArrayEntries); 68 0, kArrayEntries);
69 return *holder; 69 return *holder;
70 } 70 }
71 71
72 RUNTIME_FUNCTION(Runtime_FixedArrayGet) { 72 RUNTIME_FUNCTION(Runtime_FixedArrayGet) {
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 DCHECK(accessor->HasElement(*spread_array, i)); 658 DCHECK(accessor->HasElement(*spread_array, i));
659 Handle<Object> element = accessor->Get(spread_array, i); 659 Handle<Object> element = accessor->Get(spread_array, i);
660 result->set(i, *element); 660 result->set(i, *element);
661 } 661 }
662 662
663 return *result; 663 return *result;
664 } 664 }
665 665
666 } // namespace internal 666 } // namespace internal
667 } // namespace v8 667 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698