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

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

Issue 1336273002: [builtins] Remove STRING_ADD_LEFT and STRING_ADD_RIGHT builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index 3ba34645ea1a56bdc7df6aafd925586a82877700..3f0dec1dd7dc165b25857418e0c2d01320439671 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -3243,91 +3243,6 @@ void FullCodeGenerator::EmitIsSimdValue(CallRuntime* expr) {
}
-void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
- CallRuntime* expr) {
- ZoneList<Expression*>* args = expr->arguments();
- DCHECK(args->length() == 1);
-
- VisitForAccumulatorValue(args->at(0));
-
- Label materialize_true, materialize_false, skip_lookup;
- Label* if_true = NULL;
- Label* if_false = NULL;
- Label* fall_through = NULL;
- context()->PrepareTest(&materialize_true, &materialize_false,
- &if_true, &if_false, &fall_through);
-
- __ AssertNotSmi(rax);
-
- // Check whether this map has already been checked to be safe for default
- // valueOf.
- __ movp(rbx, FieldOperand(rax, HeapObject::kMapOffset));
- __ testb(FieldOperand(rbx, Map::kBitField2Offset),
- Immediate(1 << Map::kStringWrapperSafeForDefaultValueOf));
- __ j(not_zero, &skip_lookup);
-
- // Check for fast case object. Generate false result for slow case object.
- __ movp(rcx, FieldOperand(rax, JSObject::kPropertiesOffset));
- __ movp(rcx, FieldOperand(rcx, HeapObject::kMapOffset));
- __ CompareRoot(rcx, Heap::kHashTableMapRootIndex);
- __ j(equal, if_false);
-
- // Look for valueOf string in the descriptor array, and indicate false if
- // found. Since we omit an enumeration index check, if it is added via a
- // transition that shares its descriptor array, this is a false positive.
- Label entry, loop, done;
-
- // Skip loop if no descriptors are valid.
- __ NumberOfOwnDescriptors(rcx, rbx);
- __ cmpp(rcx, Immediate(0));
- __ j(equal, &done);
-
- __ LoadInstanceDescriptors(rbx, r8);
- // rbx: descriptor array.
- // rcx: valid entries in the descriptor array.
- // Calculate the end of the descriptor array.
- __ imulp(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize));
- __ leap(rcx,
- Operand(r8, rcx, times_pointer_size, DescriptorArray::kFirstOffset));
- // Calculate location of the first key name.
- __ addp(r8, Immediate(DescriptorArray::kFirstOffset));
- // Loop through all the keys in the descriptor array. If one of these is the
- // internalized string "valueOf" the result is false.
- __ jmp(&entry);
- __ bind(&loop);
- __ movp(rdx, FieldOperand(r8, 0));
- __ CompareRoot(rdx, Heap::kvalueOf_stringRootIndex);
- __ j(equal, if_false);
- __ addp(r8, Immediate(DescriptorArray::kDescriptorSize * kPointerSize));
- __ bind(&entry);
- __ cmpp(r8, rcx);
- __ j(not_equal, &loop);
-
- __ bind(&done);
-
- // Set the bit in the map to indicate that there is no local valueOf field.
- __ orp(FieldOperand(rbx, Map::kBitField2Offset),
- Immediate(1 << Map::kStringWrapperSafeForDefaultValueOf));
-
- __ bind(&skip_lookup);
-
- // If a valueOf property is not found on the object check that its
- // prototype is the un-modified String prototype. If not result is false.
- __ movp(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
- __ testp(rcx, Immediate(kSmiTagMask));
- __ j(zero, if_false);
- __ movp(rcx, FieldOperand(rcx, HeapObject::kMapOffset));
- __ movp(rdx, Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ movp(rdx, FieldOperand(rdx, GlobalObject::kNativeContextOffset));
- __ cmpp(rcx,
- ContextOperand(rdx, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX));
- PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
- Split(equal, if_true, if_false, fall_through);
-
- context()->Plug(if_true, if_false);
-}
-
-
void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
DCHECK(args->length() == 1);
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698