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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1491223002: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in arm64. Created 5 years 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/compiler/verifier.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 664 }
665 } 665 }
666 666
667 667
668 void FullCodeGenerator::DoTest(Expression* condition, 668 void FullCodeGenerator::DoTest(Expression* condition,
669 Label* if_true, 669 Label* if_true,
670 Label* if_false, 670 Label* if_false,
671 Label* fall_through) { 671 Label* fall_through) {
672 Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate()); 672 Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate());
673 CallIC(ic, condition->test_id()); 673 CallIC(ic, condition->test_id());
674 __ tst(result_register(), result_register()); 674 __ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
675 Split(ne, if_true, if_false, fall_through); 675 Split(eq, if_true, if_false, fall_through);
676 } 676 }
677 677
678 678
679 void FullCodeGenerator::Split(Condition cond, 679 void FullCodeGenerator::Split(Condition cond,
680 Label* if_true, 680 Label* if_true,
681 Label* if_false, 681 Label* if_false,
682 Label* fall_through) { 682 Label* fall_through) {
683 if (if_false == fall_through) { 683 if (if_false == fall_through) {
684 __ b(cond, if_true); 684 __ b(cond, if_true);
685 } else if (if_true == fall_through) { 685 } else if (if_true == fall_through) {
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 __ bind(&l_loop); 2059 __ bind(&l_loop);
2060 __ Move(load_receiver, r0); 2060 __ Move(load_receiver, r0);
2061 2061
2062 __ push(load_receiver); // save result 2062 __ push(load_receiver); // save result
2063 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" 2063 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
2064 __ mov(LoadDescriptor::SlotRegister(), 2064 __ mov(LoadDescriptor::SlotRegister(),
2065 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); 2065 Operand(SmiFromSlot(expr->DoneFeedbackSlot())));
2066 CallLoadIC(NOT_INSIDE_TYPEOF); // r0=result.done 2066 CallLoadIC(NOT_INSIDE_TYPEOF); // r0=result.done
2067 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); 2067 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
2068 CallIC(bool_ic); 2068 CallIC(bool_ic);
2069 __ cmp(r0, Operand(0)); 2069 __ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
2070 __ b(eq, &l_try); 2070 __ b(ne, &l_try);
2071 2071
2072 // result.value 2072 // result.value
2073 __ pop(load_receiver); // result 2073 __ pop(load_receiver); // result
2074 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" 2074 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
2075 __ mov(LoadDescriptor::SlotRegister(), 2075 __ mov(LoadDescriptor::SlotRegister(),
2076 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); 2076 Operand(SmiFromSlot(expr->ValueFeedbackSlot())));
2077 CallLoadIC(NOT_INSIDE_TYPEOF); // r0=result.value 2077 CallLoadIC(NOT_INSIDE_TYPEOF); // r0=result.value
2078 context()->DropAndPlug(2, r0); // drop iter and g 2078 context()->DropAndPlug(2, r0); // drop iter and g
2079 break; 2079 break;
2080 } 2080 }
(...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
4973 DCHECK(interrupt_address == 4973 DCHECK(interrupt_address ==
4974 isolate->builtins()->OsrAfterStackCheck()->entry()); 4974 isolate->builtins()->OsrAfterStackCheck()->entry());
4975 return OSR_AFTER_STACK_CHECK; 4975 return OSR_AFTER_STACK_CHECK;
4976 } 4976 }
4977 4977
4978 4978
4979 } // namespace internal 4979 } // namespace internal
4980 } // namespace v8 4980 } // namespace v8
4981 4981
4982 #endif // V8_TARGET_ARCH_ARM 4982 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698