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

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

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: call runtime for large strings 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
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/contexts.h" 9 #include "src/contexts.h"
10 #include "src/elements.h" 10 #include "src/elements.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return true; 137 return true;
138 } 138 }
139 139
140 MUST_USE_RESULT static Object* CallJsIntrinsic(Isolate* isolate, 140 MUST_USE_RESULT static Object* CallJsIntrinsic(Isolate* isolate,
141 Handle<JSFunction> function, 141 Handle<JSFunction> function,
142 BuiltinArguments args) { 142 BuiltinArguments args) {
143 HandleScope handleScope(isolate); 143 HandleScope handleScope(isolate);
144 int argc = args.length() - 1; 144 int argc = args.length() - 1;
145 ScopedVector<Handle<Object>> argv(argc); 145 ScopedVector<Handle<Object>> argv(argc);
146 for (int i = 0; i < argc; ++i) { 146 for (int i = 0; i < argc; ++i) {
147 argv[i] = args.at<Object>(i + 1); 147 argv[i] = args.at(i + 1);
148 } 148 }
149 RETURN_RESULT_OR_FAILURE( 149 RETURN_RESULT_OR_FAILURE(
150 isolate, 150 isolate,
151 Execution::Call(isolate, function, args.receiver(), argc, argv.start())); 151 Execution::Call(isolate, function, args.receiver(), argc, argv.start()));
152 } 152 }
153 } // namespace 153 } // namespace
154 154
155 BUILTIN(ArrayPush) { 155 BUILTIN(ArrayPush) {
156 HandleScope scope(isolate); 156 HandleScope scope(isolate);
157 Handle<Object> receiver = args.receiver(); 157 Handle<Object> receiver = args.receiver();
(...skipping 2604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2762 Runtime::kThrowIncompatibleMethodReceiver, context, 2762 Runtime::kThrowIncompatibleMethodReceiver, context,
2763 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( 2763 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked(
2764 "Array Iterator.prototype.next", TENURED)), 2764 "Array Iterator.prototype.next", TENURED)),
2765 iterator); 2765 iterator);
2766 assembler.Return(result); 2766 assembler.Return(result);
2767 } 2767 }
2768 } 2768 }
2769 2769
2770 } // namespace internal 2770 } // namespace internal
2771 } // namespace v8 2771 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698