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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 23684036: Fix large performance regression in Box2D, MD5, and SHA1 benchmarks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 006c2d1ecab36c04dc2cebd61ebe9dfdb46b969a..5c670f819ef0647c959179c547444ac164984b22 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -1570,6 +1570,11 @@ void GuardFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// list length here, without this check the list length could change
// without triggering a deoptimization.
Label check_array, length_compared, no_fixed_length;
+ // If length is negative the length guard is either disabled or
+ // has not been initialized, either way it is safe to skip the
+ // length check.
+ __ cmpq(field_length_operand, Immediate(Smi::RawValue(0)));
+ __ j(LESS, &skip_length_check);
__ cmpq(value_cid_reg, Immediate(kNullCid));
__ j(EQUAL, &no_fixed_length, Assembler::kNearJump);
// Check for typed data array.
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698