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

Unified Diff: src/a64/full-codegen-a64.cc

Issue 153913002: A64: Synchronize with r16756. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « src/a64/codegen-a64.cc ('k') | src/a64/lithium-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/full-codegen-a64.cc
diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc
index 7d8bb8159c3a7f2b3f4f00fbedc3aef04934b329..261e920c8578e18328f357f26d9c8705c49fea8b 100644
--- a/src/a64/full-codegen-a64.cc
+++ b/src/a64/full-codegen-a64.cc
@@ -2747,7 +2747,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
ASSERT(args->length() == 1);
VisitForAccumulatorValue(args->at(0));
- Label materialize_true, materialize_false;
+ Label materialize_true, materialize_false, skip_lookup;
Label* if_true = NULL;
Label* if_false = NULL;
Label* fall_through = NULL;
@@ -2761,7 +2761,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
Register bitfield2 = x11;
__ Ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
__ Ldrb(bitfield2, FieldMemOperand(map, Map::kBitField2Offset));
- __ Tbnz(bitfield2, Map::kStringWrapperSafeForDefaultValueOf, if_true);
+ __ Tbnz(bitfield2, Map::kStringWrapperSafeForDefaultValueOf, &skip_lookup);
// Check for fast case object. Generate false result for slow case object.
Register props = x12;
@@ -2813,6 +2813,14 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
__ B(ne, &loop);
__ Bind(&done);
+
+ // Set the bit in the map to indicate that there is no local valueOf field.
+ __ Ldrb(x2, FieldMemOperand(map, Map::kBitField2Offset));
+ __ Orr(x2, x2, 1 << Map::kStringWrapperSafeForDefaultValueOf);
+ __ Strb(x2, FieldMemOperand(map, Map::kBitField2Offset));
+
+ __ Bind(&skip_lookup);
+
// If a valueOf property is not found on the object check that its prototype
// is the unmodified String prototype. If not result is false.
Register prototype = x1;
@@ -2830,11 +2838,10 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
ContextMemOperand(native_context,
Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX));
__ Cmp(proto_map, string_proto);
- __ B(ne, if_false);
-
- __ B(if_true);
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
+ Split(eq, if_true, if_false, fall_through);
+
context()->Plug(if_true, if_false);
}
« no previous file with comments | « src/a64/codegen-a64.cc ('k') | src/a64/lithium-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698