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

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

Issue 1313903003: [runtime] Remove the redundant %_IsObject intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comment. 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 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 3058
3059 uint64_t sign_mask = V8_UINT64_C(1) << (kSmiShift + kSmiValueSize - 1); 3059 uint64_t sign_mask = V8_UINT64_C(1) << (kSmiShift + kSmiValueSize - 1);
3060 3060
3061 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3061 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3062 __ TestAndSplit(x0, kSmiTagMask | sign_mask, if_true, if_false, fall_through); 3062 __ TestAndSplit(x0, kSmiTagMask | sign_mask, if_true, if_false, fall_through);
3063 3063
3064 context()->Plug(if_true, if_false); 3064 context()->Plug(if_true, if_false);
3065 } 3065 }
3066 3066
3067 3067
3068 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
3069 ZoneList<Expression*>* args = expr->arguments();
3070 DCHECK(args->length() == 1);
3071
3072 VisitForAccumulatorValue(args->at(0));
3073
3074 Label materialize_true, materialize_false;
3075 Label* if_true = NULL;
3076 Label* if_false = NULL;
3077 Label* fall_through = NULL;
3078 context()->PrepareTest(&materialize_true, &materialize_false,
3079 &if_true, &if_false, &fall_through);
3080
3081 __ JumpIfSmi(x0, if_false);
3082 __ JumpIfRoot(x0, Heap::kNullValueRootIndex, if_true);
3083 __ Ldr(x10, FieldMemOperand(x0, HeapObject::kMapOffset));
3084 // Undetectable objects behave like undefined when tested with typeof.
3085 __ Ldrb(x11, FieldMemOperand(x10, Map::kBitFieldOffset));
3086 __ Tbnz(x11, Map::kIsUndetectable, if_false);
3087 __ Ldrb(x12, FieldMemOperand(x10, Map::kInstanceTypeOffset));
3088 __ Cmp(x12, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE);
3089 __ B(lt, if_false);
3090 __ Cmp(x12, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
3091 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3092 Split(le, if_true, if_false, fall_through);
3093
3094 context()->Plug(if_true, if_false);
3095 }
3096
3097
3098 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { 3068 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
3099 ZoneList<Expression*>* args = expr->arguments(); 3069 ZoneList<Expression*>* args = expr->arguments();
3100 DCHECK(args->length() == 1); 3070 DCHECK(args->length() == 1);
3101 3071
3102 VisitForAccumulatorValue(args->at(0)); 3072 VisitForAccumulatorValue(args->at(0));
3103 3073
3104 Label materialize_true, materialize_false; 3074 Label materialize_true, materialize_false;
3105 Label* if_true = NULL; 3075 Label* if_true = NULL;
3106 Label* if_false = NULL; 3076 Label* if_false = NULL;
3107 Label* fall_through = NULL; 3077 Label* fall_through = NULL;
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
5401 } 5371 }
5402 5372
5403 return INTERRUPT; 5373 return INTERRUPT;
5404 } 5374 }
5405 5375
5406 5376
5407 } // namespace internal 5377 } // namespace internal
5408 } // namespace v8 5378 } // namespace v8
5409 5379
5410 #endif // V8_TARGET_ARCH_ARM64 5380 #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