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

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

Issue 1381803002: PPC: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 __ b(&loop); 1088 __ b(&loop);
1089 1089
1090 __ bind(&no_descriptors); 1090 __ bind(&no_descriptors);
1091 __ Drop(1); 1091 __ Drop(1);
1092 __ b(&exit); 1092 __ b(&exit);
1093 1093
1094 // We got a fixed array in register r3. Iterate through that. 1094 // We got a fixed array in register r3. Iterate through that.
1095 Label non_proxy; 1095 Label non_proxy;
1096 __ bind(&fixed_array); 1096 __ bind(&fixed_array);
1097 1097
1098 __ Move(r4, FeedbackVector()); 1098 __ EmitLoadTypeFeedbackVector(r4);
1099 __ mov(r5, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1099 __ mov(r5, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1100 int vector_index = FeedbackVector()->GetIndex(slot); 1100 int vector_index = SmiFromSlot(slot)->value();
1101 __ StoreP( 1101 __ StoreP(
1102 r5, FieldMemOperand(r4, FixedArray::OffsetOfElementAt(vector_index)), r0); 1102 r5, FieldMemOperand(r4, FixedArray::OffsetOfElementAt(vector_index)), r0);
1103 1103
1104 __ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi indicates slow check 1104 __ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi indicates slow check
1105 __ LoadP(r5, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1105 __ LoadP(r5, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1106 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1106 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1107 __ CompareObjectType(r5, r6, r6, LAST_JS_PROXY_TYPE); 1107 __ CompareObjectType(r5, r6, r6, LAST_JS_PROXY_TYPE);
1108 __ bgt(&non_proxy); 1108 __ bgt(&non_proxy);
1109 __ LoadSmiLiteral(r4, Smi::FromInt(0)); // Zero indicates proxy 1109 __ LoadSmiLiteral(r4, Smi::FromInt(0)); // Zero indicates proxy
1110 __ bind(&non_proxy); 1110 __ bind(&non_proxy);
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after
3175 3175
3176 // Call the construct call builtin that handles allocation and 3176 // Call the construct call builtin that handles allocation and
3177 // constructor invocation. 3177 // constructor invocation.
3178 SetConstructCallPosition(expr); 3178 SetConstructCallPosition(expr);
3179 3179
3180 // Load function and argument count into r4 and r3. 3180 // Load function and argument count into r4 and r3.
3181 __ mov(r3, Operand(arg_count)); 3181 __ mov(r3, Operand(arg_count));
3182 __ LoadP(r4, MemOperand(sp, arg_count * kPointerSize), r0); 3182 __ LoadP(r4, MemOperand(sp, arg_count * kPointerSize), r0);
3183 3183
3184 // Record call targets in unoptimized code. 3184 // Record call targets in unoptimized code.
3185 __ Move(r5, FeedbackVector()); 3185 __ EmitLoadTypeFeedbackVector(r5);
3186 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallNewFeedbackSlot())); 3186 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallNewFeedbackSlot()));
3187 3187
3188 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3188 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
3189 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3189 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3190 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 3190 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
3191 // Restore context register. 3191 // Restore context register.
3192 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3192 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3193 context()->Plug(r3); 3193 context()->Plug(r3);
3194 } 3194 }
3195 3195
(...skipping 19 matching lines...) Expand all
3215 3215
3216 // Load original constructor into r7. 3216 // Load original constructor into r7.
3217 VisitForAccumulatorValue(super_call_ref->new_target_var()); 3217 VisitForAccumulatorValue(super_call_ref->new_target_var());
3218 __ mr(r7, result_register()); 3218 __ mr(r7, result_register());
3219 3219
3220 // Load function and argument count into r1 and r0. 3220 // Load function and argument count into r1 and r0.
3221 __ mov(r3, Operand(arg_count)); 3221 __ mov(r3, Operand(arg_count));
3222 __ LoadP(r4, MemOperand(sp, arg_count * kPointerSize)); 3222 __ LoadP(r4, MemOperand(sp, arg_count * kPointerSize));
3223 3223
3224 // Record call targets in unoptimized code. 3224 // Record call targets in unoptimized code.
3225 __ Move(r5, FeedbackVector()); 3225 __ EmitLoadTypeFeedbackVector(r5);
3226 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackSlot())); 3226 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackSlot()));
3227 3227
3228 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 3228 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
3229 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3229 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3230 3230
3231 RecordJSReturnSite(expr); 3231 RecordJSReturnSite(expr);
3232 3232
3233 // Restore context register. 3233 // Restore context register.
3234 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3234 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3235 context()->Plug(r3); 3235 context()->Plug(r3);
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after
5223 return ON_STACK_REPLACEMENT; 5223 return ON_STACK_REPLACEMENT;
5224 } 5224 }
5225 5225
5226 DCHECK(interrupt_address == 5226 DCHECK(interrupt_address ==
5227 isolate->builtins()->OsrAfterStackCheck()->entry()); 5227 isolate->builtins()->OsrAfterStackCheck()->entry());
5228 return OSR_AFTER_STACK_CHECK; 5228 return OSR_AFTER_STACK_CHECK;
5229 } 5229 }
5230 } // namespace internal 5230 } // namespace internal
5231 } // namespace v8 5231 } // namespace v8
5232 #endif // V8_TARGET_ARCH_PPC 5232 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698