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

Side by Side Diff: src/mips64/code-stubs-mips64.cc

Issue 1774273002: [undetectable] Really get comparisons of document.all right now. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update comments. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 // Fast negative check for internalized-to-internalized equality. 496 // Fast negative check for internalized-to-internalized equality.
497 static void EmitCheckForInternalizedStringsOrObjects(MacroAssembler* masm, 497 static void EmitCheckForInternalizedStringsOrObjects(MacroAssembler* masm,
498 Register lhs, Register rhs, 498 Register lhs, Register rhs,
499 Label* possible_strings, 499 Label* possible_strings,
500 Label* runtime_call) { 500 Label* runtime_call) {
501 DCHECK((lhs.is(a0) && rhs.is(a1)) || 501 DCHECK((lhs.is(a0) && rhs.is(a1)) ||
502 (lhs.is(a1) && rhs.is(a0))); 502 (lhs.is(a1) && rhs.is(a0)));
503 503
504 // a2 is object type of rhs. 504 // a2 is object type of rhs.
505 Label object_test, return_unequal, undetectable; 505 Label object_test, return_equal, return_unequal, undetectable;
506 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); 506 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
507 __ And(at, a2, Operand(kIsNotStringMask)); 507 __ And(at, a2, Operand(kIsNotStringMask));
508 __ Branch(&object_test, ne, at, Operand(zero_reg)); 508 __ Branch(&object_test, ne, at, Operand(zero_reg));
509 __ And(at, a2, Operand(kIsNotInternalizedMask)); 509 __ And(at, a2, Operand(kIsNotInternalizedMask));
510 __ Branch(possible_strings, ne, at, Operand(zero_reg)); 510 __ Branch(possible_strings, ne, at, Operand(zero_reg));
511 __ GetObjectType(rhs, a3, a3); 511 __ GetObjectType(rhs, a3, a3);
512 __ Branch(runtime_call, ge, a3, Operand(FIRST_NONSTRING_TYPE)); 512 __ Branch(runtime_call, ge, a3, Operand(FIRST_NONSTRING_TYPE));
513 __ And(at, a3, Operand(kIsNotInternalizedMask)); 513 __ And(at, a3, Operand(kIsNotInternalizedMask));
514 __ Branch(possible_strings, ne, at, Operand(zero_reg)); 514 __ Branch(possible_strings, ne, at, Operand(zero_reg));
515 515
(...skipping 19 matching lines...) Expand all
535 __ Branch(runtime_call, lt, a3, Operand(FIRST_JS_RECEIVER_TYPE)); 535 __ Branch(runtime_call, lt, a3, Operand(FIRST_JS_RECEIVER_TYPE));
536 536
537 __ bind(&return_unequal); 537 __ bind(&return_unequal);
538 // Return non-equal by returning the non-zero object pointer in v0. 538 // Return non-equal by returning the non-zero object pointer in v0.
539 __ Ret(USE_DELAY_SLOT); 539 __ Ret(USE_DELAY_SLOT);
540 __ mov(v0, a0); // In delay slot. 540 __ mov(v0, a0); // In delay slot.
541 541
542 __ bind(&undetectable); 542 __ bind(&undetectable);
543 __ And(at, t1, Operand(1 << Map::kIsUndetectable)); 543 __ And(at, t1, Operand(1 << Map::kIsUndetectable));
544 __ Branch(&return_unequal, eq, at, Operand(zero_reg)); 544 __ Branch(&return_unequal, eq, at, Operand(zero_reg));
545
546 // If both sides are JSReceivers, then the result is false according to
547 // the HTML specification, which says that only comparisons with null or
548 // undefined are affected by special casing for document.all.
549 __ GetInstanceType(a2, a2);
550 __ Branch(&return_equal, eq, a2, Operand(ODDBALL_TYPE));
551 __ GetInstanceType(a3, a3);
552 __ Branch(&return_unequal, ne, a3, Operand(ODDBALL_TYPE));
553
554 __ bind(&return_equal);
545 __ Ret(USE_DELAY_SLOT); 555 __ Ret(USE_DELAY_SLOT);
546 __ li(v0, Operand(EQUAL)); // In delay slot. 556 __ li(v0, Operand(EQUAL)); // In delay slot.
547 } 557 }
548 558
549 559
550 static void CompareICStub_CheckInputType(MacroAssembler* masm, Register input, 560 static void CompareICStub_CheckInputType(MacroAssembler* masm, Register input,
551 Register scratch, 561 Register scratch,
552 CompareICState::State expected, 562 CompareICState::State expected,
553 Label* fail) { 563 Label* fail) {
554 Label ok; 564 Label ok;
(...skipping 5243 matching lines...) Expand 10 before | Expand all | Expand 10 after
5798 return_value_operand, NULL); 5808 return_value_operand, NULL);
5799 } 5809 }
5800 5810
5801 5811
5802 #undef __ 5812 #undef __
5803 5813
5804 } // namespace internal 5814 } // namespace internal
5805 } // namespace v8 5815 } // namespace v8
5806 5816
5807 #endif // V8_TARGET_ARCH_MIPS64 5817 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698