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

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

Issue 2437043002: [compiler] Mark shared functions for optimization (Closed)
Patch Set: Unmark after compiling 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
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | src/builtins/x64/builtins-x64.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_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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 __ bind(&loop_bottom); 1496 __ bind(&loop_bottom);
1497 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), 1497 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength),
1498 r0); 1498 r0);
1499 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); 1499 __ CmpSmiLiteral(index, Smi::FromInt(1), r0);
1500 __ bgt(&loop_top); 1500 __ bgt(&loop_top);
1501 1501
1502 // We found neither literals nor code. 1502 // We found neither literals nor code.
1503 __ b(&gotta_call_runtime); 1503 __ b(&gotta_call_runtime);
1504 1504
1505 __ bind(&try_shared); 1505 __ bind(&try_shared);
1506 // Is the full code valid?
1507 __ LoadP(entry, 1506 __ LoadP(entry,
1508 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1507 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1508 // Is the shared function marked for optimization?
1509 __ LoadlB(temp, FieldMemOperand(
1510 entry,
1511 SharedFunctionInfo::kWasMarkedForOptimizationByteOffset));
1512 __ TestBit(temp, SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte,
1513 r0);
1514 __ bne(&gotta_call_runtime);
1515 // Is the full code valid?
1509 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); 1516 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset));
1510 __ LoadlW(r7, FieldMemOperand(entry, Code::kFlagsOffset)); 1517 __ LoadlW(r7, FieldMemOperand(entry, Code::kFlagsOffset));
1511 __ DecodeField<Code::KindField>(r7); 1518 __ DecodeField<Code::KindField>(r7);
1512 __ CmpP(r7, Operand(Code::BUILTIN)); 1519 __ CmpP(r7, Operand(Code::BUILTIN));
1513 __ beq(&gotta_call_runtime); 1520 __ beq(&gotta_call_runtime);
1514 // Yes, install the full code. 1521 // Yes, install the full code.
1515 __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); 1522 __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
1516 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); 1523 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0);
1517 __ RecordWriteCodeEntryField(closure, entry, r7); 1524 __ RecordWriteCodeEntryField(closure, entry, r7);
1518 __ JumpToJSEntry(entry); 1525 __ JumpToJSEntry(entry);
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
3007 __ bkpt(0); 3014 __ bkpt(0);
3008 } 3015 }
3009 } 3016 }
3010 3017
3011 #undef __ 3018 #undef __
3012 3019
3013 } // namespace internal 3020 } // namespace internal
3014 } // namespace v8 3021 } // namespace v8
3015 3022
3016 #endif // V8_TARGET_ARCH_S390 3023 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698