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

Side by Side Diff: src/interface-descriptors.cc

Issue 1676883002: [runtime] Optimize and unify rest parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/interface-descriptors.h" 5 #include "src/interface-descriptors.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 namespace { 10 namespace {
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return function; 358 return function;
359 } 359 }
360 360
361 361
362 void ArgumentsAccessNewDescriptor::InitializePlatformSpecific( 362 void ArgumentsAccessNewDescriptor::InitializePlatformSpecific(
363 CallInterfaceDescriptorData* data) { 363 CallInterfaceDescriptorData* data) {
364 Register registers[] = {function(), parameter_count(), parameter_pointer()}; 364 Register registers[] = {function(), parameter_count(), parameter_pointer()};
365 data->InitializePlatformSpecific(arraysize(registers), registers); 365 data->InitializePlatformSpecific(arraysize(registers), registers);
366 } 366 }
367 367
368 FunctionType*
369 RestParamAccessDescriptor::BuildCallInterfaceDescriptorFunctionType(
370 Isolate* isolate, int paramater_count) {
371 Zone* zone = isolate->interface_descriptor_zone();
372 FunctionType* function =
373 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
374 function->InitParameter(0, SmiType(zone));
375 function->InitParameter(1, ExternalPointer(zone));
376 function->InitParameter(2, SmiType(zone));
377 return function;
378 }
379
380
381 void RestParamAccessDescriptor::InitializePlatformSpecific(
382 CallInterfaceDescriptorData* data) {
383 Register registers[] = {parameter_count(), parameter_pointer(),
384 rest_parameter_index()};
385 data->InitializePlatformSpecific(arraysize(registers), registers);
386 }
387
388 368
389 void ContextOnlyDescriptor::InitializePlatformSpecific( 369 void ContextOnlyDescriptor::InitializePlatformSpecific(
390 CallInterfaceDescriptorData* data) { 370 CallInterfaceDescriptorData* data) {
391 data->InitializePlatformSpecific(0, nullptr); 371 data->InitializePlatformSpecific(0, nullptr);
392 } 372 }
393 373
394 374
395 void GrowArrayElementsDescriptor::InitializePlatformSpecific( 375 void GrowArrayElementsDescriptor::InitializePlatformSpecific(
396 CallInterfaceDescriptorData* data) { 376 CallInterfaceDescriptorData* data) {
397 Register registers[] = {ObjectRegister(), KeyRegister()}; 377 Register registers[] = {ObjectRegister(), KeyRegister()};
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 function->InitParameter(0, AnyTagged(zone)); // callee 541 function->InitParameter(0, AnyTagged(zone)); // callee
562 function->InitParameter(1, AnyTagged(zone)); // call_data 542 function->InitParameter(1, AnyTagged(zone)); // call_data
563 function->InitParameter(2, AnyTagged(zone)); // holder 543 function->InitParameter(2, AnyTagged(zone)); // holder
564 function->InitParameter(3, ExternalPointer(zone)); // api_function_address 544 function->InitParameter(3, ExternalPointer(zone)); // api_function_address
565 return function; 545 return function;
566 } 546 }
567 547
568 548
569 } // namespace internal 549 } // namespace internal
570 } // namespace v8 550 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698