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

Side by Side Diff: src/builtins/ppc/builtins-ppc.cc

Issue 2659413002: PPC/s390: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: Created 3 years, 10 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/builtins/s390/builtins-s390.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/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 __ bind(&array_done); 1026 __ bind(&array_done);
1027 1027
1028 // Check whether we should continue to use the interpreter. 1028 // Check whether we should continue to use the interpreter.
1029 Label switch_to_different_code_kind; 1029 Label switch_to_different_code_kind;
1030 __ LoadP(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); 1030 __ LoadP(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset));
1031 __ mov(ip, Operand(masm->CodeObject())); // Self-reference to this code. 1031 __ mov(ip, Operand(masm->CodeObject())); // Self-reference to this code.
1032 __ cmp(r3, ip); 1032 __ cmp(r3, ip);
1033 __ bne(&switch_to_different_code_kind); 1033 __ bne(&switch_to_different_code_kind);
1034 1034
1035 // Increment invocation count for the function. 1035 // Increment invocation count for the function.
1036 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kLiteralsOffset)); 1036 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kFeedbackVectorOffset));
1037 __ LoadP(r7, FieldMemOperand(r7, LiteralsArray::kFeedbackVectorOffset));
1038 __ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * 1037 __ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex *
1039 kPointerSize + 1038 kPointerSize +
1040 TypeFeedbackVector::kHeaderSize)); 1039 TypeFeedbackVector::kHeaderSize));
1041 __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0); 1040 __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0);
1042 __ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * 1041 __ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex *
1043 kPointerSize + 1042 kPointerSize +
1044 TypeFeedbackVector::kHeaderSize), 1043 TypeFeedbackVector::kHeaderSize),
1045 r0); 1044 r0);
1046 1045
1047 // Check function data field is actually a BytecodeArray object. 1046 // Check function data field is actually a BytecodeArray object.
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 Register array_pointer = r8; 1386 Register array_pointer = r8;
1388 1387
1389 // Does the native context match? 1388 // Does the native context match?
1390 __ SmiToPtrArrayOffset(array_pointer, index); 1389 __ SmiToPtrArrayOffset(array_pointer, index);
1391 __ add(array_pointer, map, array_pointer); 1390 __ add(array_pointer, map, array_pointer);
1392 __ LoadP(temp, FieldMemOperand(array_pointer, 1391 __ LoadP(temp, FieldMemOperand(array_pointer,
1393 SharedFunctionInfo::kOffsetToPreviousContext)); 1392 SharedFunctionInfo::kOffsetToPreviousContext));
1394 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); 1393 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
1395 __ cmp(temp, native_context); 1394 __ cmp(temp, native_context);
1396 __ bne(&loop_bottom); 1395 __ bne(&loop_bottom);
1397 // Literals available? 1396 // Feedback vector available?
1398 __ LoadP(temp, 1397 __ LoadP(temp,
1399 FieldMemOperand(array_pointer, 1398 FieldMemOperand(array_pointer,
1400 SharedFunctionInfo::kOffsetToPreviousLiterals)); 1399 SharedFunctionInfo::kOffsetToPreviousLiterals));
1401 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); 1400 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
1402 __ JumpIfSmi(temp, &gotta_call_runtime); 1401 __ JumpIfSmi(temp, &gotta_call_runtime);
1403 1402
1404 // Save the literals in the closure. 1403 // Save the feedback vector in the closure.
1405 __ StoreP(temp, FieldMemOperand(closure, JSFunction::kLiteralsOffset), r0); 1404 __ StoreP(temp, FieldMemOperand(closure, JSFunction::kFeedbackVectorOffset),
1406 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r7, 1405 r0);
1406 __ RecordWriteField(closure, JSFunction::kFeedbackVectorOffset, temp, r7,
1407 kLRHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET, 1407 kLRHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET,
1408 OMIT_SMI_CHECK); 1408 OMIT_SMI_CHECK);
1409 1409
1410 // Code available? 1410 // Code available?
1411 Register entry = r7; 1411 Register entry = r7;
1412 __ LoadP(entry, 1412 __ LoadP(entry,
1413 FieldMemOperand(array_pointer, 1413 FieldMemOperand(array_pointer,
1414 SharedFunctionInfo::kOffsetToPreviousCachedCode)); 1414 SharedFunctionInfo::kOffsetToPreviousCachedCode));
1415 __ LoadP(entry, FieldMemOperand(entry, WeakCell::kValueOffset)); 1415 __ LoadP(entry, FieldMemOperand(entry, WeakCell::kValueOffset));
1416 __ JumpIfSmi(entry, &try_shared); 1416 __ JumpIfSmi(entry, &try_shared);
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 __ CallRuntime(Runtime::kThrowStackOverflow); 3205 __ CallRuntime(Runtime::kThrowStackOverflow);
3206 __ bkpt(0); 3206 __ bkpt(0);
3207 } 3207 }
3208 } 3208 }
3209 3209
3210 #undef __ 3210 #undef __
3211 } // namespace internal 3211 } // namespace internal
3212 } // namespace v8 3212 } // namespace v8
3213 3213
3214 #endif // V8_TARGET_ARCH_PPC 3214 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698