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

Side by Side Diff: runtime/vm/stub_code_arm64.cc

Issue 254723003: Remember all deopt reasons in ic_data, not just the last one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 __ Stop("GenerateOptimizedUsageCounterIncrement"); 402 __ Stop("GenerateOptimizedUsageCounterIncrement");
403 } 403 }
404 404
405 405
406 // Loads function into 'temp_reg'. 406 // Loads function into 'temp_reg'.
407 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, 407 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler,
408 Register temp_reg) { 408 Register temp_reg) {
409 Register ic_reg = R5; 409 Register ic_reg = R5;
410 Register func_reg = temp_reg; 410 Register func_reg = temp_reg;
411 ASSERT(temp_reg == R6); 411 ASSERT(temp_reg == R6);
412 __ LoadFieldFromOffset(func_reg, ic_reg, ICData::function_offset()); 412 __ LoadFieldFromOffset(func_reg, ic_reg, ICData::owner_offset());
413 __ LoadFieldFromOffset(R7, func_reg, Function::usage_counter_offset()); 413 __ LoadFieldFromOffset(R7, func_reg, Function::usage_counter_offset());
414 __ AddImmediate(R7, R7, 1, PP); 414 __ AddImmediate(R7, R7, 1, PP);
415 __ StoreFieldToOffset(R7, func_reg, Function::usage_counter_offset()); 415 __ StoreFieldToOffset(R7, func_reg, Function::usage_counter_offset());
416 } 416 }
417 417
418 418
419 void StubCode::GenerateNArgsCheckInlineCacheStub( 419 void StubCode::GenerateNArgsCheckInlineCacheStub(
420 Assembler* assembler, 420 Assembler* assembler,
421 intptr_t num_args, 421 intptr_t num_args,
422 const RuntimeEntry& handle_ic_miss) { 422 const RuntimeEntry& handle_ic_miss) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { 465 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) {
466 __ Stop("GenerateMegamorphicCallStub"); 466 __ Stop("GenerateMegamorphicCallStub");
467 } 467 }
468 468
469 469
470 void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) { 470 void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) {
471 GenerateUsageCounterIncrement(assembler, R6); 471 GenerateUsageCounterIncrement(assembler, R6);
472 #if defined(DEBUG) 472 #if defined(DEBUG)
473 { Label ok; 473 { Label ok;
474 // Check that the IC data array has NumberOfArgumentsChecked() == 0. 474 // Check that the IC data array has NumArgsTested() == 0.
475 // 'num_args_tested' is stored as an untagged int. 475 // 'NumArgsTested' is stored in the least significant bits of 'state_bits'.
476 __ LoadFieldFromOffset(R6, R5, ICData::num_args_tested_offset()); 476 __ ldr(R6, FieldAddress(R5, ICData::state_bits_offset()), kUnsignedWord);
477 ASSERT(ICData::NumArgsTestedShift() == 0); // No shift needed.
478 __ andi(R6, R6, ICData::NumArgsTestedMask());
477 __ CompareImmediate(R6, 0, PP); 479 __ CompareImmediate(R6, 0, PP);
478 __ b(&ok, EQ); 480 __ b(&ok, EQ);
479 __ Stop("Incorrect IC data for unoptimized static call"); 481 __ Stop("Incorrect IC data for unoptimized static call");
480 __ Bind(&ok); 482 __ Bind(&ok);
481 } 483 }
482 #endif // DEBUG 484 #endif // DEBUG
483 485
484 // Check single stepping. 486 // Check single stepping.
485 Label not_stepping; 487 Label not_stepping;
486 __ LoadFieldFromOffset(R6, CTX, Context::isolate_offset()); 488 __ LoadFieldFromOffset(R6, CTX, Context::isolate_offset());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 595
594 596
595 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub( 597 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub(
596 Assembler* assembler) { 598 Assembler* assembler) {
597 __ Stop("GenerateOptimizedIdenticalWithNumberCheckStub"); 599 __ Stop("GenerateOptimizedIdenticalWithNumberCheckStub");
598 } 600 }
599 601
600 } // namespace dart 602 } // namespace dart
601 603
602 #endif // defined TARGET_ARCH_ARM64 604 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698