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

Unified Diff: runtime/vm/jit_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
Index: runtime/vm/jit_optimizer.h
diff --git a/runtime/vm/jit_optimizer.h b/runtime/vm/jit_optimizer.h
index 6fe4562056b61165f6ecb2cc4133f8753184b195..ed539a7b4d263fa90f324f5aaea2b56c95c3f664 100644
--- a/runtime/vm/jit_optimizer.h
+++ b/runtime/vm/jit_optimizer.h
@@ -74,14 +74,10 @@ class JitOptimizer : 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,
@@ -89,10 +85,17 @@ class JitOptimizer : 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,
+ Definition* instr,
+ int argument_number);
+
+ // Add a class check for the call's first argument (receiver).
+ void AddReceiverCheck(InstanceCallInstr* call) {
+ AddChecksToArgNr(call, call->ArgumentAt(0), /* argument_number = */ 0);
+ }
void ReplaceCall(Definition* call, Definition* replacement);

Powered by Google App Engine
This is Rietveld 408576698