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

Side by Side Diff: src/ic/arm/ic-arm.cc

Issue 1553703002: [runtime] TailCallRuntime and CallRuntime should use default argument counts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-12-29_TailCallRuntime_default_result_size_1_1550923002
Patch Set: Created 4 years, 11 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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // The return address is in lr. 302 // The return address is in lr.
303 Isolate* isolate = masm->isolate(); 303 Isolate* isolate = masm->isolate();
304 304
305 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(), 305 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(),
306 LoadWithVectorDescriptor::VectorRegister())); 306 LoadWithVectorDescriptor::VectorRegister()));
307 __ IncrementCounter(isolate->counters()->load_miss(), 1, r4, r5); 307 __ IncrementCounter(isolate->counters()->load_miss(), 1, r4, r5);
308 308
309 LoadIC_PushArgs(masm); 309 LoadIC_PushArgs(masm);
310 310
311 // Perform tail call to the entry. 311 // Perform tail call to the entry.
312 int arg_count = 4; 312 __ TailCallRuntime(Runtime::kLoadIC_Miss);
313 __ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
Camillo Bruni 2015/12/30 13:31:46 for some of the IC runtime functions I had to upda
314 } 313 }
315 314
316 315
317 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 316 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
318 LanguageMode language_mode) { 317 LanguageMode language_mode) {
319 // The return address is in lr. 318 // The return address is in lr.
320 319
321 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); 320 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
322 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); 321 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
323 322
324 // Do tail-call to runtime routine. 323 // Do tail-call to runtime routine.
325 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong 324 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
326 : Runtime::kGetProperty, 325 : Runtime::kGetProperty);
327 2);
328 } 326 }
329 327
330 328
331 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 329 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
332 // The return address is in lr. 330 // The return address is in lr.
333 Isolate* isolate = masm->isolate(); 331 Isolate* isolate = masm->isolate();
334 332
335 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(), 333 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(),
336 LoadWithVectorDescriptor::VectorRegister())); 334 LoadWithVectorDescriptor::VectorRegister()));
337 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r4, r5); 335 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r4, r5);
338 336
339 LoadIC_PushArgs(masm); 337 LoadIC_PushArgs(masm);
340 338
341 // Perform tail call to the entry. 339 // Perform tail call to the entry.
342 int arg_count = 4; 340 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
343 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
344 } 341 }
345 342
346 343
347 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 344 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
348 LanguageMode language_mode) { 345 LanguageMode language_mode) {
349 // The return address is in lr. 346 // The return address is in lr.
350 347
351 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 348 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
352 349
353 // Perform tail call to the entry. 350 // Perform tail call to the entry.
354 // Do tail-call to runtime routine. 351 // Do tail-call to runtime routine.
355 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong 352 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
356 : Runtime::kKeyedGetProperty, 353 : Runtime::kKeyedGetProperty);
357 2);
358 } 354 }
359 355
360 356
361 void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm, 357 void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
362 LanguageMode language_mode) { 358 LanguageMode language_mode) {
363 // The return address is in lr. 359 // The return address is in lr.
364 Label slow, check_name, index_smi, index_name, property_array_property; 360 Label slow, check_name, index_smi, index_name, property_array_property;
365 Label probe_dictionary, check_number_dictionary; 361 Label probe_dictionary, check_number_dictionary;
366 362
367 Register key = LoadDescriptor::NameRegister(); 363 Register key = LoadDescriptor::NameRegister();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 461 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
466 StoreDescriptor::ValueRegister(), 462 StoreDescriptor::ValueRegister(),
467 VectorStoreICDescriptor::SlotRegister(), 463 VectorStoreICDescriptor::SlotRegister(),
468 VectorStoreICDescriptor::VectorRegister()); 464 VectorStoreICDescriptor::VectorRegister());
469 } 465 }
470 466
471 467
472 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 468 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
473 StoreIC_PushArgs(masm); 469 StoreIC_PushArgs(masm);
474 470
475 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5); 471 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
476 } 472 }
477 473
478 474
479 static void KeyedStoreGenerateMegamorphicHelper( 475 static void KeyedStoreGenerateMegamorphicHelper(
480 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 476 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
481 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 477 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
482 Register value, Register key, Register receiver, Register receiver_map, 478 Register value, Register key, Register receiver, Register receiver_map,
483 Register elements_map, Register elements) { 479 Register elements_map, Register elements) {
484 Label transition_smi_elements; 480 Label transition_smi_elements;
485 Label finish_object_store, non_double_value, transition_double_elements; 481 Label finish_object_store, non_double_value, transition_double_elements;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 766
771 // Cache miss: Jump to runtime. 767 // Cache miss: Jump to runtime.
772 GenerateMiss(masm); 768 GenerateMiss(masm);
773 } 769 }
774 770
775 771
776 void StoreIC::GenerateMiss(MacroAssembler* masm) { 772 void StoreIC::GenerateMiss(MacroAssembler* masm) {
777 StoreIC_PushArgs(masm); 773 StoreIC_PushArgs(masm);
778 774
779 // Perform tail call to the entry. 775 // Perform tail call to the entry.
780 __ TailCallRuntime(Runtime::kStoreIC_Miss, 5); 776 __ TailCallRuntime(Runtime::kStoreIC_Miss);
781 } 777 }
782 778
783 779
784 void StoreIC::GenerateNormal(MacroAssembler* masm) { 780 void StoreIC::GenerateNormal(MacroAssembler* masm) {
785 Label miss; 781 Label miss;
786 Register receiver = StoreDescriptor::ReceiverRegister(); 782 Register receiver = StoreDescriptor::ReceiverRegister();
787 Register name = StoreDescriptor::NameRegister(); 783 Register name = StoreDescriptor::NameRegister();
788 Register value = StoreDescriptor::ValueRegister(); 784 Register value = StoreDescriptor::ValueRegister();
789 Register dictionary = r5; 785 Register dictionary = r5;
790 DCHECK(receiver.is(r1)); 786 DCHECK(receiver.is(r1));
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 patcher.EmitCondition(ne); 894 patcher.EmitCondition(ne);
899 } else { 895 } else {
900 DCHECK(Assembler::GetCondition(branch_instr) == ne); 896 DCHECK(Assembler::GetCondition(branch_instr) == ne);
901 patcher.EmitCondition(eq); 897 patcher.EmitCondition(eq);
902 } 898 }
903 } 899 }
904 } // namespace internal 900 } // namespace internal
905 } // namespace v8 901 } // namespace v8
906 902
907 #endif // V8_TARGET_ARCH_ARM 903 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698