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

Side by Side Diff: src/builtins/s390/builtins-s390.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 | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | 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_S390 5 #if V8_TARGET_ARCH_S390
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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 __ LoadP(index, FieldMemOperand(closure, JSFunction::kLiteralsOffset)); 1370 __ LoadP(index, FieldMemOperand(closure, JSFunction::kLiteralsOffset));
1371 __ LoadP(index, FieldMemOperand(index, LiteralsArray::kFeedbackVectorOffset)); 1371 __ LoadP(index, FieldMemOperand(index, LiteralsArray::kFeedbackVectorOffset));
1372 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, &gotta_call_runtime); 1372 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, &gotta_call_runtime);
1373 1373
1374 __ LoadP(map, 1374 __ LoadP(map,
1375 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1375 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1376 __ LoadP(map, 1376 __ LoadP(map,
1377 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); 1377 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
1378 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset)); 1378 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset));
1379 __ CmpSmiLiteral(index, Smi::FromInt(2), r0); 1379 __ CmpSmiLiteral(index, Smi::FromInt(2), r0);
1380 __ blt(&gotta_call_runtime); 1380 __ blt(&try_shared);
1381 1381
1382 // Find literals. 1382 // Find literals.
1383 // r9 : native context 1383 // r9 : native context
1384 // r4 : length / index 1384 // r4 : length / index
1385 // r8 : optimized code map 1385 // r8 : optimized code map
1386 // r5 : new target 1386 // r5 : new target
1387 // r3 : closure 1387 // r3 : closure
1388 Register native_context = r9; 1388 Register native_context = r9;
1389 __ LoadP(native_context, NativeContextMemOperand()); 1389 __ LoadP(native_context, NativeContextMemOperand());
1390 1390
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 __ RecordWriteContextSlot(native_context, function_list_offset, r7, temp, 1436 __ RecordWriteContextSlot(native_context, function_list_offset, r7, temp,
1437 kLRHasNotBeenSaved, kDontSaveFPRegs); 1437 kLRHasNotBeenSaved, kDontSaveFPRegs);
1438 __ JumpToJSEntry(entry); 1438 __ JumpToJSEntry(entry);
1439 1439
1440 __ bind(&loop_bottom); 1440 __ bind(&loop_bottom);
1441 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), 1441 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength),
1442 r0); 1442 r0);
1443 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); 1443 __ CmpSmiLiteral(index, Smi::FromInt(1), r0);
1444 __ bgt(&loop_top); 1444 __ bgt(&loop_top);
1445 1445
1446 // We found no code. 1446 // We found no code. Try the SharedFunctionInfo.
1447 __ b(&gotta_call_runtime);
1448
1449 __ bind(&try_shared); 1447 __ bind(&try_shared);
1450 __ LoadP(entry, 1448 __ LoadP(entry,
1451 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1449 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1452 // Is the shared function marked for tier up? 1450 // Is the shared function marked for tier up?
1453 __ LoadlB(temp, FieldMemOperand( 1451 __ LoadlB(temp, FieldMemOperand(
1454 entry, SharedFunctionInfo::kMarkedForTierUpByteOffset)); 1452 entry, SharedFunctionInfo::kMarkedForTierUpByteOffset));
1455 __ TestBit(temp, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); 1453 __ TestBit(temp, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0);
1456 __ bne(&gotta_call_runtime); 1454 __ bne(&gotta_call_runtime);
1457 1455
1458 // If SFI points to anything other than CompileLazy, install that. 1456 // If SFI points to anything other than CompileLazy, install that.
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2978 __ bkpt(0); 2976 __ bkpt(0);
2979 } 2977 }
2980 } 2978 }
2981 2979
2982 #undef __ 2980 #undef __
2983 2981
2984 } // namespace internal 2982 } // namespace internal
2985 } // namespace v8 2983 } // namespace v8
2986 2984
2987 #endif // V8_TARGET_ARCH_S390 2985 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698