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

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

Issue 1295433002: [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE again. Remove unused ReplaceWithBuiltinCall. 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 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 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 context()->PrepareTest(&materialize_true, &materialize_false, 2980 context()->PrepareTest(&materialize_true, &materialize_false,
2981 &if_true, &if_false, &fall_through); 2981 &if_true, &if_false, &fall_through);
2982 2982
2983 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 2983 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2984 __ TestAndSplit(x0, kSmiTagMask, if_true, if_false, fall_through); 2984 __ TestAndSplit(x0, kSmiTagMask, if_true, if_false, fall_through);
2985 2985
2986 context()->Plug(if_true, if_false); 2986 context()->Plug(if_true, if_false);
2987 } 2987 }
2988 2988
2989 2989
2990 void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
2991 ZoneList<Expression*>* args = expr->arguments();
2992 DCHECK(args->length() == 1);
2993
2994 VisitForAccumulatorValue(args->at(0));
2995
2996 Label materialize_true, materialize_false;
2997 Label* if_true = NULL;
2998 Label* if_false = NULL;
2999 Label* fall_through = NULL;
3000 context()->PrepareTest(&materialize_true, &materialize_false,
3001 &if_true, &if_false, &fall_through);
3002
3003 uint64_t sign_mask = V8_UINT64_C(1) << (kSmiShift + kSmiValueSize - 1);
3004
3005 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3006 __ TestAndSplit(x0, kSmiTagMask | sign_mask, if_true, if_false, fall_through);
3007
3008 context()->Plug(if_true, if_false);
3009 }
3010
3011
3012 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { 2990 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
3013 ZoneList<Expression*>* args = expr->arguments(); 2991 ZoneList<Expression*>* args = expr->arguments();
3014 DCHECK(args->length() == 1); 2992 DCHECK(args->length() == 1);
3015 2993
3016 VisitForAccumulatorValue(args->at(0)); 2994 VisitForAccumulatorValue(args->at(0));
3017 2995
3018 Label materialize_true, materialize_false; 2996 Label materialize_true, materialize_false;
3019 Label* if_true = NULL; 2997 Label* if_true = NULL;
3020 Label* if_false = NULL; 2998 Label* if_false = NULL;
3021 Label* fall_through = NULL; 2999 Label* fall_through = NULL;
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
4764 Label* if_false = NULL; 4742 Label* if_false = NULL;
4765 Label* fall_through = NULL; 4743 Label* fall_through = NULL;
4766 context()->PrepareTest(&materialize_true, &materialize_false, 4744 context()->PrepareTest(&materialize_true, &materialize_false,
4767 &if_true, &if_false, &fall_through); 4745 &if_true, &if_false, &fall_through);
4768 4746
4769 Token::Value op = expr->op(); 4747 Token::Value op = expr->op();
4770 VisitForStackValue(expr->left()); 4748 VisitForStackValue(expr->left());
4771 switch (op) { 4749 switch (op) {
4772 case Token::IN: 4750 case Token::IN:
4773 VisitForStackValue(expr->right()); 4751 VisitForStackValue(expr->right());
4774 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION); 4752 __ CallRuntime(Runtime::kHasProperty, 2);
4775 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 4753 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
4776 __ CompareRoot(x0, Heap::kTrueValueRootIndex); 4754 __ CompareRoot(x0, Heap::kTrueValueRootIndex);
4777 Split(eq, if_true, if_false, fall_through); 4755 Split(eq, if_true, if_false, fall_through);
4778 break; 4756 break;
4779 4757
4780 case Token::INSTANCEOF: { 4758 case Token::INSTANCEOF: {
4781 VisitForAccumulatorValue(expr->right()); 4759 VisitForAccumulatorValue(expr->right());
4782 __ Pop(x1); 4760 __ Pop(x1);
4783 InstanceOfStub stub(isolate()); 4761 InstanceOfStub stub(isolate());
4784 __ CallStub(&stub); 4762 __ CallStub(&stub);
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
5370 } 5348 }
5371 5349
5372 return INTERRUPT; 5350 return INTERRUPT;
5373 } 5351 }
5374 5352
5375 5353
5376 } // namespace internal 5354 } // namespace internal
5377 } // namespace v8 5355 } // namespace v8
5378 5356
5379 #endif // V8_TARGET_ARCH_ARM64 5357 #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