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

Side by Side Diff: src/arm64/lithium-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/arm64/lithium-arm64.cc ('k') | src/full-codegen/arm/full-codegen-arm.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 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 #include "src/arm64/frames-arm64.h" 5 #include "src/arm64/frames-arm64.h"
6 #include "src/arm64/lithium-codegen-arm64.h" 6 #include "src/arm64/lithium-codegen-arm64.h"
7 #include "src/arm64/lithium-gap-resolver-arm64.h" 7 #include "src/arm64/lithium-gap-resolver-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 3092
3093 // Check the marker in the calling frame. 3093 // Check the marker in the calling frame.
3094 __ Bind(&check_frame_marker); 3094 __ Bind(&check_frame_marker);
3095 __ Ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset)); 3095 __ Ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset));
3096 3096
3097 EmitCompareAndBranch( 3097 EmitCompareAndBranch(
3098 instr, eq, temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); 3098 instr, eq, temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT)));
3099 } 3099 }
3100 3100
3101 3101
3102 void LCodeGen::DoIsObjectAndBranch(LIsObjectAndBranch* instr) {
3103 Label* is_object = instr->TrueLabel(chunk_);
3104 Label* is_not_object = instr->FalseLabel(chunk_);
3105 Register value = ToRegister(instr->value());
3106 Register map = ToRegister(instr->temp1());
3107 Register scratch = ToRegister(instr->temp2());
3108
3109 __ JumpIfSmi(value, is_not_object);
3110 __ JumpIfRoot(value, Heap::kNullValueRootIndex, is_object);
3111
3112 __ Ldr(map, FieldMemOperand(value, HeapObject::kMapOffset));
3113
3114 // Check for undetectable objects.
3115 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset));
3116 __ TestAndBranchIfAnySet(scratch, 1 << Map::kIsUndetectable, is_not_object);
3117
3118 // Check that instance type is in object type range.
3119 __ IsInstanceJSObjectType(map, scratch, NULL);
3120 // Flags have been updated by IsInstanceJSObjectType. We can now test the
3121 // flags for "le" condition to check if the object's type is a valid
3122 // JS object type.
3123 EmitBranch(instr, le);
3124 }
3125
3126
3127 Condition LCodeGen::EmitIsString(Register input, 3102 Condition LCodeGen::EmitIsString(Register input,
3128 Register temp1, 3103 Register temp1,
3129 Label* is_not_string, 3104 Label* is_not_string,
3130 SmiCheck check_needed = INLINE_SMI_CHECK) { 3105 SmiCheck check_needed = INLINE_SMI_CHECK) {
3131 if (check_needed == INLINE_SMI_CHECK) { 3106 if (check_needed == INLINE_SMI_CHECK) {
3132 __ JumpIfSmi(input, is_not_string); 3107 __ JumpIfSmi(input, is_not_string);
3133 } 3108 }
3134 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); 3109 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE);
3135 3110
3136 return lt; 3111 return lt;
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after
6070 Handle<ScopeInfo> scope_info = instr->scope_info(); 6045 Handle<ScopeInfo> scope_info = instr->scope_info();
6071 __ Push(scope_info); 6046 __ Push(scope_info);
6072 __ Push(ToRegister(instr->function())); 6047 __ Push(ToRegister(instr->function()));
6073 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6048 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6074 RecordSafepoint(Safepoint::kNoLazyDeopt); 6049 RecordSafepoint(Safepoint::kNoLazyDeopt);
6075 } 6050 }
6076 6051
6077 6052
6078 } // namespace internal 6053 } // namespace internal
6079 } // namespace v8 6054 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698