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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
===================================================================
--- runtime/vm/stub_code_arm64.cc (revision 35455)
+++ runtime/vm/stub_code_arm64.cc (working copy)
@@ -745,7 +745,7 @@
Register ic_reg = R5;
Register func_reg = temp_reg;
ASSERT(temp_reg == R6);
- __ LoadFieldFromOffset(func_reg, ic_reg, ICData::function_offset());
+ __ LoadFieldFromOffset(func_reg, ic_reg, ICData::owner_offset());
__ LoadFieldFromOffset(R7, func_reg, Function::usage_counter_offset());
__ AddImmediate(R7, R7, 1, PP);
__ StoreFieldToOffset(R7, func_reg, Function::usage_counter_offset());
@@ -769,9 +769,12 @@
ASSERT(num_args > 0);
#if defined(DEBUG)
{ Label ok;
- // Check that the IC data array has NumberOfArgumentsChecked() == num_args.
- // 'num_args_tested' is stored as an untagged int.
- __ LoadFieldFromOffset(R6, R5, ICData::num_args_tested_offset());
+ // Check that the IC data array has NumArgsTested() == num_args.
+ // 'NumArgsTested' is stored in the least significant bits of 'state_bits'.
+ __ LoadFromOffset(R6, R5, ICData::state_bits_offset() - kHeapObjectTag,
+ kUnsignedWord);
+ ASSERT(ICData::NumArgsTestedShift() == 0); // No shift needed.
+ __ andi(R6, R6, ICData::NumArgsTestedMask());
__ CompareImmediate(R6, num_args, PP);
__ b(&ok, EQ);
__ Stop("Incorrect stub for IC data");
@@ -1010,9 +1013,12 @@
GenerateUsageCounterIncrement(assembler, R6);
#if defined(DEBUG)
{ Label ok;
- // Check that the IC data array has NumberOfArgumentsChecked() == 0.
- // 'num_args_tested' is stored as an untagged int.
- __ LoadFieldFromOffset(R6, R5, ICData::num_args_tested_offset());
+ // Check that the IC data array has NumArgsTested() == 0.
+ // 'NumArgsTested' is stored in the least significant bits of 'state_bits'.
+ __ LoadFromOffset(R6, R5, ICData::state_bits_offset() - kHeapObjectTag,
+ kUnsignedWord);
+ ASSERT(ICData::NumArgsTestedShift() == 0); // No shift needed.
+ __ andi(R6, R6, ICData::NumArgsTestedMask());
__ CompareImmediate(R6, 0, PP);
__ b(&ok, EQ);
__ Stop("Incorrect IC data for unoptimized static call");
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698