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

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

Issue 2641473002: PPC/s390: [builtins] CompileLazy bailed out to the runtime entirely too often. (Closed)
Patch Set: Created 3 years, 11 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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 __ LoadP(index, FieldMemOperand(closure, JSFunction::kLiteralsOffset)); 1365 __ LoadP(index, FieldMemOperand(closure, JSFunction::kLiteralsOffset));
1366 __ LoadP(index, FieldMemOperand(index, LiteralsArray::kFeedbackVectorOffset)); 1366 __ LoadP(index, FieldMemOperand(index, LiteralsArray::kFeedbackVectorOffset));
1367 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, &gotta_call_runtime); 1367 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, &gotta_call_runtime);
1368 1368
1369 __ LoadP(map, 1369 __ LoadP(map,
1370 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1370 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1371 __ LoadP(map, 1371 __ LoadP(map,
1372 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); 1372 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
1373 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset)); 1373 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset));
1374 __ CmpSmiLiteral(index, Smi::FromInt(2), r0); 1374 __ CmpSmiLiteral(index, Smi::FromInt(2), r0);
1375 __ blt(&gotta_call_runtime); 1375 __ blt(&try_shared);
1376 1376
1377 // r10 : native context 1377 // r10 : native context
1378 // r5 : length / index 1378 // r5 : length / index
1379 // r9 : optimized code map 1379 // r9 : optimized code map
1380 // r6 : new target 1380 // r6 : new target
1381 // r4 : closure 1381 // r4 : closure
1382 Register native_context = r10; 1382 Register native_context = r10;
1383 __ LoadP(native_context, NativeContextMemOperand()); 1383 __ LoadP(native_context, NativeContextMemOperand());
1384 1384
1385 __ bind(&loop_top); 1385 __ bind(&loop_top);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 __ RecordWriteContextSlot(native_context, function_list_offset, r8, temp, 1430 __ RecordWriteContextSlot(native_context, function_list_offset, r8, temp,
1431 kLRHasNotBeenSaved, kDontSaveFPRegs); 1431 kLRHasNotBeenSaved, kDontSaveFPRegs);
1432 __ JumpToJSEntry(entry); 1432 __ JumpToJSEntry(entry);
1433 1433
1434 __ bind(&loop_bottom); 1434 __ bind(&loop_bottom);
1435 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), 1435 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength),
1436 r0); 1436 r0);
1437 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); 1437 __ CmpSmiLiteral(index, Smi::FromInt(1), r0);
1438 __ bgt(&loop_top); 1438 __ bgt(&loop_top);
1439 1439
1440 // We found no code. 1440 // We found no code. Try the SharedFunctionInfo.
1441 __ b(&gotta_call_runtime);
1442
1443 __ bind(&try_shared); 1441 __ bind(&try_shared);
1444 __ LoadP(entry, 1442 __ LoadP(entry,
1445 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1443 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1446 // Is the shared function marked for tier up? 1444 // Is the shared function marked for tier up?
1447 __ lbz(r8, FieldMemOperand(entry, 1445 __ lbz(r8, FieldMemOperand(entry,
1448 SharedFunctionInfo::kMarkedForTierUpByteOffset)); 1446 SharedFunctionInfo::kMarkedForTierUpByteOffset));
1449 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); 1447 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0);
1450 __ bne(&gotta_call_runtime, cr0); 1448 __ bne(&gotta_call_runtime, cr0);
1451 1449
1452 // If SFI points to anything other than CompileLazy, install that. 1450 // If SFI points to anything other than CompileLazy, install that.
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 __ CallRuntime(Runtime::kThrowStackOverflow); 2962 __ CallRuntime(Runtime::kThrowStackOverflow);
2965 __ bkpt(0); 2963 __ bkpt(0);
2966 } 2964 }
2967 } 2965 }
2968 2966
2969 #undef __ 2967 #undef __
2970 } // namespace internal 2968 } // namespace internal
2971 } // namespace v8 2969 } // namespace v8
2972 2970
2973 #endif // V8_TARGET_ARCH_PPC 2971 #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