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

Side by Side Diff: src/runtime/runtime-function.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/runtime/runtime-compiler.cc ('k') | src/runtime/runtime-internal.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 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 272
273 RUNTIME_FUNCTION(Runtime_Call) { 273 RUNTIME_FUNCTION(Runtime_Call) {
274 HandleScope scope(isolate); 274 HandleScope scope(isolate);
275 DCHECK_LE(2, args.length()); 275 DCHECK_LE(2, args.length());
276 int const argc = args.length() - 2; 276 int const argc = args.length() - 2;
277 CONVERT_ARG_HANDLE_CHECKED(Object, target, 0); 277 CONVERT_ARG_HANDLE_CHECKED(Object, target, 0);
278 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1); 278 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1);
279 ScopedVector<Handle<Object>> argv(argc); 279 ScopedVector<Handle<Object>> argv(argc);
280 for (int i = 0; i < argc; ++i) { 280 for (int i = 0; i < argc; ++i) {
281 argv[i] = args.at<Object>(2 + i); 281 argv[i] = args.at(2 + i);
282 } 282 }
283 RETURN_RESULT_OR_FAILURE( 283 RETURN_RESULT_OR_FAILURE(
284 isolate, Execution::Call(isolate, target, receiver, argc, argv.start())); 284 isolate, Execution::Call(isolate, target, receiver, argc, argv.start()));
285 } 285 }
286 286
287 287
288 // ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee. 288 // ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee.
289 RUNTIME_FUNCTION(Runtime_ConvertReceiver) { 289 RUNTIME_FUNCTION(Runtime_ConvertReceiver) {
290 HandleScope scope(isolate); 290 HandleScope scope(isolate);
291 DCHECK(args.length() == 1); 291 DCHECK(args.length() == 1);
(...skipping 15 matching lines...) Expand all
307 DCHECK_EQ(1, args.length()); 307 DCHECK_EQ(1, args.length());
308 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 308 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
309 return function->IsJSBoundFunction() 309 return function->IsJSBoundFunction()
310 ? *JSBoundFunction::ToString( 310 ? *JSBoundFunction::ToString(
311 Handle<JSBoundFunction>::cast(function)) 311 Handle<JSBoundFunction>::cast(function))
312 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 312 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
313 } 313 }
314 314
315 } // namespace internal 315 } // namespace internal
316 } // namespace v8 316 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698