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

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

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: merging with master Created 4 years 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.h ('k') | src/builtins/builtins-date.cc » ('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 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/code-stub-assembler.h" 9 #include "src/code-stub-assembler.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return true; 138 return true;
139 } 139 }
140 140
141 MUST_USE_RESULT static Object* CallJsIntrinsic(Isolate* isolate, 141 MUST_USE_RESULT static Object* CallJsIntrinsic(Isolate* isolate,
142 Handle<JSFunction> function, 142 Handle<JSFunction> function,
143 BuiltinArguments args) { 143 BuiltinArguments args) {
144 HandleScope handleScope(isolate); 144 HandleScope handleScope(isolate);
145 int argc = args.length() - 1; 145 int argc = args.length() - 1;
146 ScopedVector<Handle<Object>> argv(argc); 146 ScopedVector<Handle<Object>> argv(argc);
147 for (int i = 0; i < argc; ++i) { 147 for (int i = 0; i < argc; ++i) {
148 argv[i] = args.at<Object>(i + 1); 148 argv[i] = args.at(i + 1);
149 } 149 }
150 RETURN_RESULT_OR_FAILURE( 150 RETURN_RESULT_OR_FAILURE(
151 isolate, 151 isolate,
152 Execution::Call(isolate, function, args.receiver(), argc, argv.start())); 152 Execution::Call(isolate, function, args.receiver(), argc, argv.start()));
153 } 153 }
154 } // namespace 154 } // namespace
155 155
156 BUILTIN(ArrayPush) { 156 BUILTIN(ArrayPush) {
157 HandleScope scope(isolate); 157 HandleScope scope(isolate);
158 Handle<Object> receiver = args.receiver(); 158 Handle<Object> receiver = args.receiver();
(...skipping 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after
2751 Runtime::kThrowIncompatibleMethodReceiver, context, 2751 Runtime::kThrowIncompatibleMethodReceiver, context,
2752 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( 2752 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked(
2753 "Array Iterator.prototype.next", TENURED)), 2753 "Array Iterator.prototype.next", TENURED)),
2754 iterator); 2754 iterator);
2755 assembler.Return(result); 2755 assembler.Return(result);
2756 } 2756 }
2757 } 2757 }
2758 2758
2759 } // namespace internal 2759 } // namespace internal
2760 } // namespace v8 2760 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698