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

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

Issue 2448933002: [compiler] Make SFI "optimize" flag a "tier up" flag (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); 1496 __ CmpSmiLiteral(index, Smi::FromInt(1), r0);
1497 __ bgt(&loop_top); 1497 __ bgt(&loop_top);
1498 1498
1499 // We found neither literals nor code. 1499 // We found neither literals nor code.
1500 __ b(&gotta_call_runtime); 1500 __ b(&gotta_call_runtime);
1501 1501
1502 __ bind(&try_shared); 1502 __ bind(&try_shared);
1503 __ LoadP(entry, 1503 __ LoadP(entry,
1504 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1504 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1505 // Is the shared function marked for optimization? 1505 // Is the shared function marked for optimization?
1506 __ lbz(r8, 1506 __ lbz(r8, FieldMemOperand(
1507 FieldMemOperand( 1507 entry, SharedFunctionInfo::kWasMarkedForTierUpByteOffset));
1508 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); 1508 __ TestBit(r8, SharedFunctionInfo::kWasMarkedForTierUpBitWithinByte, r0);
1509 __ TestBit(r8, SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte,
1510 r0);
1511 __ beq(&gotta_call_runtime); 1509 __ beq(&gotta_call_runtime);
1512 // Is the full code valid? 1510 // Is the full code valid?
1513 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); 1511 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset));
1514 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset)); 1512 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset));
1515 __ DecodeField<Code::KindField>(r8); 1513 __ DecodeField<Code::KindField>(r8);
1516 __ cmpi(r8, Operand(Code::BUILTIN)); 1514 __ cmpi(r8, Operand(Code::BUILTIN));
1517 __ beq(&gotta_call_runtime); 1515 __ beq(&gotta_call_runtime);
1518 // Yes, install the full code. 1516 // Yes, install the full code.
1519 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); 1517 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
1520 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); 1518 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0);
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 __ CallRuntime(Runtime::kThrowStackOverflow); 3001 __ CallRuntime(Runtime::kThrowStackOverflow);
3004 __ bkpt(0); 3002 __ bkpt(0);
3005 } 3003 }
3006 } 3004 }
3007 3005
3008 #undef __ 3006 #undef __
3009 } // namespace internal 3007 } // namespace internal
3010 } // namespace v8 3008 } // namespace v8
3011 3009
3012 #endif // V8_TARGET_ARCH_PPC 3010 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698