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

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

Issue 1364373003: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 2 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
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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 __ Push(x0, x2, x1, xzr); 1116 __ Push(x0, x2, x1, xzr);
1117 __ B(&loop); 1117 __ B(&loop);
1118 1118
1119 __ Bind(&no_descriptors); 1119 __ Bind(&no_descriptors);
1120 __ Drop(1); 1120 __ Drop(1);
1121 __ B(&exit); 1121 __ B(&exit);
1122 1122
1123 // We got a fixed array in register x0. Iterate through that. 1123 // We got a fixed array in register x0. Iterate through that.
1124 __ Bind(&fixed_array); 1124 __ Bind(&fixed_array);
1125 1125
1126 __ LoadObject(x1, FeedbackVector()); 1126 __ EmitLoadTypeFeedbackVector(x1);
1127 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1127 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1128 int vector_index = FeedbackVector()->GetIndex(slot); 1128 int vector_index = SmiFromSlot(slot)->value();
1129 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index))); 1129 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index)));
1130 1130
1131 __ Mov(x1, Smi::FromInt(1)); // Smi indicates slow check. 1131 __ Mov(x1, Smi::FromInt(1)); // Smi indicates slow check.
1132 __ Peek(x10, 0); // Get enumerated object. 1132 __ Peek(x10, 0); // Get enumerated object.
1133 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1133 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1134 // TODO(all): similar check was done already. Can we avoid it here? 1134 // TODO(all): similar check was done already. Can we avoid it here?
1135 __ CompareObjectType(x10, x11, x12, LAST_JS_PROXY_TYPE); 1135 __ CompareObjectType(x10, x11, x12, LAST_JS_PROXY_TYPE);
1136 DCHECK(Smi::FromInt(0) == 0); 1136 DCHECK(Smi::FromInt(0) == 0);
1137 __ CzeroX(x1, le); // Zero indicates proxy. 1137 __ CzeroX(x1, le); // Zero indicates proxy.
1138 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset)); 1138 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset));
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 2886
2887 // Call the construct call builtin that handles allocation and 2887 // Call the construct call builtin that handles allocation and
2888 // constructor invocation. 2888 // constructor invocation.
2889 SetConstructCallPosition(expr); 2889 SetConstructCallPosition(expr);
2890 2890
2891 // Load function and argument count into x1 and x0. 2891 // Load function and argument count into x1 and x0.
2892 __ Mov(x0, arg_count); 2892 __ Mov(x0, arg_count);
2893 __ Peek(x1, arg_count * kXRegSize); 2893 __ Peek(x1, arg_count * kXRegSize);
2894 2894
2895 // Record call targets in unoptimized code. 2895 // Record call targets in unoptimized code.
2896 __ LoadObject(x2, FeedbackVector()); 2896 __ EmitLoadTypeFeedbackVector(x2);
2897 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); 2897 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot()));
2898 2898
2899 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 2899 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
2900 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 2900 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
2901 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2901 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
2902 // Restore context register. 2902 // Restore context register.
2903 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2903 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2904 context()->Plug(x0); 2904 context()->Plug(x0);
2905 } 2905 }
2906 2906
(...skipping 19 matching lines...) Expand all
2926 2926
2927 // Load original constructor into x4. 2927 // Load original constructor into x4.
2928 VisitForAccumulatorValue(super_call_ref->new_target_var()); 2928 VisitForAccumulatorValue(super_call_ref->new_target_var());
2929 __ Mov(x4, result_register()); 2929 __ Mov(x4, result_register());
2930 2930
2931 // Load function and argument count into x1 and x0. 2931 // Load function and argument count into x1 and x0.
2932 __ Mov(x0, arg_count); 2932 __ Mov(x0, arg_count);
2933 __ Peek(x1, arg_count * kXRegSize); 2933 __ Peek(x1, arg_count * kXRegSize);
2934 2934
2935 // Record call targets in unoptimized code. 2935 // Record call targets in unoptimized code.
2936 __ LoadObject(x2, FeedbackVector()); 2936 __ EmitLoadTypeFeedbackVector(x2);
2937 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); 2937 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot()));
2938 2938
2939 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 2939 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
2940 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 2940 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
2941 2941
2942 RecordJSReturnSite(expr); 2942 RecordJSReturnSite(expr);
2943 2943
2944 // Restore context register. 2944 // Restore context register.
2945 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2945 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2946 context()->Plug(x0); 2946 context()->Plug(x0);
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 } 5241 }
5242 5242
5243 return INTERRUPT; 5243 return INTERRUPT;
5244 } 5244 }
5245 5245
5246 5246
5247 } // namespace internal 5247 } // namespace internal
5248 } // namespace v8 5248 } // namespace v8
5249 5249
5250 #endif // V8_TARGET_ARCH_ARM64 5250 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698