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

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

Issue 1288923002: Revert of [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.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/compiler.h" 10 #include "src/compiler.h"
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 context()->PrepareTest(&materialize_true, &materialize_false, 3036 context()->PrepareTest(&materialize_true, &materialize_false,
3037 &if_true, &if_false, &fall_through); 3037 &if_true, &if_false, &fall_through);
3038 3038
3039 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3039 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3040 __ TestAndSplit(x0, kSmiTagMask, if_true, if_false, fall_through); 3040 __ TestAndSplit(x0, kSmiTagMask, if_true, if_false, fall_through);
3041 3041
3042 context()->Plug(if_true, if_false); 3042 context()->Plug(if_true, if_false);
3043 } 3043 }
3044 3044
3045 3045
3046 void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
3047 ZoneList<Expression*>* args = expr->arguments();
3048 DCHECK(args->length() == 1);
3049
3050 VisitForAccumulatorValue(args->at(0));
3051
3052 Label materialize_true, materialize_false;
3053 Label* if_true = NULL;
3054 Label* if_false = NULL;
3055 Label* fall_through = NULL;
3056 context()->PrepareTest(&materialize_true, &materialize_false,
3057 &if_true, &if_false, &fall_through);
3058
3059 uint64_t sign_mask = V8_UINT64_C(1) << (kSmiShift + kSmiValueSize - 1);
3060
3061 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3062 __ TestAndSplit(x0, kSmiTagMask | sign_mask, if_true, if_false, fall_through);
3063
3064 context()->Plug(if_true, if_false);
3065 }
3066
3067
3046 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) { 3068 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
3047 ZoneList<Expression*>* args = expr->arguments(); 3069 ZoneList<Expression*>* args = expr->arguments();
3048 DCHECK(args->length() == 1); 3070 DCHECK(args->length() == 1);
3049 3071
3050 VisitForAccumulatorValue(args->at(0)); 3072 VisitForAccumulatorValue(args->at(0));
3051 3073
3052 Label materialize_true, materialize_false; 3074 Label materialize_true, materialize_false;
3053 Label* if_true = NULL; 3075 Label* if_true = NULL;
3054 Label* if_false = NULL; 3076 Label* if_false = NULL;
3055 Label* fall_through = NULL; 3077 Label* fall_through = NULL;
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
4762 Label* if_false = NULL; 4784 Label* if_false = NULL;
4763 Label* fall_through = NULL; 4785 Label* fall_through = NULL;
4764 context()->PrepareTest(&materialize_true, &materialize_false, 4786 context()->PrepareTest(&materialize_true, &materialize_false,
4765 &if_true, &if_false, &fall_through); 4787 &if_true, &if_false, &fall_through);
4766 4788
4767 Token::Value op = expr->op(); 4789 Token::Value op = expr->op();
4768 VisitForStackValue(expr->left()); 4790 VisitForStackValue(expr->left());
4769 switch (op) { 4791 switch (op) {
4770 case Token::IN: 4792 case Token::IN:
4771 VisitForStackValue(expr->right()); 4793 VisitForStackValue(expr->right());
4772 __ CallRuntime(Runtime::kHasProperty, 2); 4794 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
4773 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 4795 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
4774 __ CompareRoot(x0, Heap::kTrueValueRootIndex); 4796 __ CompareRoot(x0, Heap::kTrueValueRootIndex);
4775 Split(eq, if_true, if_false, fall_through); 4797 Split(eq, if_true, if_false, fall_through);
4776 break; 4798 break;
4777 4799
4778 case Token::INSTANCEOF: { 4800 case Token::INSTANCEOF: {
4779 VisitForStackValue(expr->right()); 4801 VisitForStackValue(expr->right());
4780 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); 4802 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags);
4781 __ CallStub(&stub); 4803 __ CallStub(&stub);
4782 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4804 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5378 } 5400 }
5379 5401
5380 return INTERRUPT; 5402 return INTERRUPT;
5381 } 5403 }
5382 5404
5383 5405
5384 } // namespace internal 5406 } // namespace internal
5385 } // namespace v8 5407 } // namespace v8
5386 5408
5387 #endif // V8_TARGET_ARCH_ARM64 5409 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698