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

Unified Diff: runtime/vm/aot_optimizer.h

Issue 2856543002: Use off-heap data for class check instructions (Closed)
Patch Set: Feedback from Slava: rejig inheritance of CallTargets Created 3 years, 7 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 | « no previous file | runtime/vm/aot_optimizer.cc » ('j') | runtime/vm/aot_optimizer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/aot_optimizer.h
diff --git a/runtime/vm/aot_optimizer.h b/runtime/vm/aot_optimizer.h
index 359b116aff31cae745135ccb46c296b067fbcbd4..9b3148cde89c60b5839ce393011d0613cde853cd 100644
--- a/runtime/vm/aot_optimizer.h
+++ b/runtime/vm/aot_optimizer.h
@@ -53,7 +53,8 @@ class AotOptimizer : public FlowGraphVisitor {
// Attempt to build ICData for call using propagated class-ids.
bool TryCreateICData(InstanceCallInstr* call);
- bool TryReplaceWithIndexedOp(InstanceCallInstr* call);
+ bool TryReplaceWithIndexedOp(InstanceCallInstr* call,
+ const ICData* unary_checks);
bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind);
bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind);
@@ -78,14 +79,10 @@ class AotOptimizer : public FlowGraphVisitor {
// environment 'deopt_environment'. The check is inserted immediately
// before 'insert_before'.
void AddCheckClass(Definition* to_check,
- const ICData& unary_checks,
+ const Cids& cids,
intptr_t deopt_id,
Environment* deopt_environment,
Instruction* insert_before);
- Instruction* GetCheckClass(Definition* to_check,
- const ICData& unary_checks,
- intptr_t deopt_id,
- TokenPosition token_pos);
// Insert a Smi check if needed.
void AddCheckSmi(Definition* to_check,
@@ -93,10 +90,18 @@ class AotOptimizer : public FlowGraphVisitor {
Environment* deopt_environment,
Instruction* insert_before);
- // Add a class check for a call's first argument immediately before the
+ // Add a class check for a call's nth argument immediately before the
// call, using the call's IC data to determine the check, and the call's
// deopt ID and deoptimization environment if the check fails.
- void AddReceiverCheck(InstanceCallInstr* call);
+ void AddChecksToArgNr(InstanceCallInstr* call,
Vyacheslav Egorov (Google) 2017/05/09 21:07:27 s/ToArgNr/ForArgNr/ ?
erikcorry 2017/05/10 08:47:43 Done.
+ Definition* instr,
+ int argument_number);
+
+ // Convenience version of AddChecksToArgNr that works on the 0th argument
+ // (receiver).
+ void AddReceiverCheck(InstanceCallInstr* call) {
+ AddChecksToArgNr(call, call->ArgumentAt(0), /* arg_number = */ 0);
+ }
void ReplaceCall(Definition* call, Definition* replacement);
« no previous file with comments | « no previous file | runtime/vm/aot_optimizer.cc » ('j') | runtime/vm/aot_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698