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

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

Issue 2437043002: [compiler] Mark shared functions for optimization (Closed)
Patch Set: Unmark after compiling Created 4 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 | « src/builtins/mips64/builtins-mips64.cc ('k') | 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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 __ bind(&loop_bottom); 1493 __ bind(&loop_bottom);
1494 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), 1494 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength),
1495 r0); 1495 r0);
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 // Is the full code valid?
1504 __ LoadP(entry, 1503 __ LoadP(entry,
1505 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1504 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1505 // Is the shared function marked for optimization?
1506 __ lbz(r8,
1507 FieldMemOperand(
1508 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset));
1509 __ TestBit(r8, SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte,
1510 r0);
1511 __ beq(&gotta_call_runtime);
1512 // Is the full code valid?
1506 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); 1513 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset));
1507 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset)); 1514 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset));
1508 __ DecodeField<Code::KindField>(r8); 1515 __ DecodeField<Code::KindField>(r8);
1509 __ cmpi(r8, Operand(Code::BUILTIN)); 1516 __ cmpi(r8, Operand(Code::BUILTIN));
1510 __ beq(&gotta_call_runtime); 1517 __ beq(&gotta_call_runtime);
1511 // Yes, install the full code. 1518 // Yes, install the full code.
1512 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); 1519 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
1513 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); 1520 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0);
1514 __ RecordWriteCodeEntryField(closure, entry, r8); 1521 __ RecordWriteCodeEntryField(closure, entry, r8);
1515 __ JumpToJSEntry(entry); 1522 __ JumpToJSEntry(entry);
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 __ CallRuntime(Runtime::kThrowStackOverflow); 3003 __ CallRuntime(Runtime::kThrowStackOverflow);
2997 __ bkpt(0); 3004 __ bkpt(0);
2998 } 3005 }
2999 } 3006 }
3000 3007
3001 #undef __ 3008 #undef __
3002 } // namespace internal 3009 } // namespace internal
3003 } // namespace v8 3010 } // namespace v8
3004 3011
3005 #endif // V8_TARGET_ARCH_PPC 3012 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698