|
Lines 1-5
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec1
|
| 1 |
/* |
1 |
/* |
| 2 |
* Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. |
2 |
* Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved. |
| 3 |
* |
3 |
* |
| 4 |
* Redistribution and use in source and binary forms, with or without |
4 |
* Redistribution and use in source and binary forms, with or without |
| 5 |
* modification, are permitted provided that the following conditions |
5 |
* modification, are permitted provided that the following conditions |
|
Lines 1158-1171
void ByteCodeParser::handleCall(Instruct
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec2
|
| 1158 |
|
1158 |
|
| 1159 |
if (m_graph.isConstant(callTarget)) |
1159 |
if (m_graph.isConstant(callTarget)) |
| 1160 |
callLinkStatus = CallLinkStatus(m_graph.valueOfJSConstant(callTarget)).setIsProved(true); |
1160 |
callLinkStatus = CallLinkStatus(m_graph.valueOfJSConstant(callTarget)).setIsProved(true); |
| 1161 |
else { |
1161 |
else |
| 1162 |
callLinkStatus = CallLinkStatus::computeFor(m_inlineStackTop->m_profiledBlock, m_currentIndex); |
1162 |
callLinkStatus = CallLinkStatus::computeFor(m_inlineStackTop->m_profiledBlock, m_currentIndex); |
| 1163 |
callLinkStatus.setHasBadFunctionExitSite(m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadFunction)); |
|
|
| 1164 |
callLinkStatus.setHasBadCacheExitSite( |
| 1165 |
m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache) |
| 1166 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCacheWatchpoint)); |
| 1167 |
callLinkStatus.setHasBadExecutableExitSite(m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadExecutable)); |
| 1168 |
} |
| 1169 |
|
1163 |
|
| 1170 |
if (!callLinkStatus.canOptimize()) { |
1164 |
if (!callLinkStatus.canOptimize()) { |
| 1171 |
// Oddly, this conflates calls that haven't executed with calls that behaved sufficiently polymorphically |
1165 |
// Oddly, this conflates calls that haven't executed with calls that behaved sufficiently polymorphically |
|
Lines 1775-1785
void ByteCodeParser::handleGetById(
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec3
|
| 1775 |
int destinationOperand, SpeculatedType prediction, Node* base, unsigned identifierNumber, |
1769 |
int destinationOperand, SpeculatedType prediction, Node* base, unsigned identifierNumber, |
| 1776 |
const GetByIdStatus& getByIdStatus) |
1770 |
const GetByIdStatus& getByIdStatus) |
| 1777 |
{ |
1771 |
{ |
| 1778 |
if (!getByIdStatus.isSimple() |
1772 |
if (!getByIdStatus.isSimple()) { |
| 1779 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache) |
|
|
| 1780 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCacheWatchpoint) |
| 1781 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCache) |
| 1782 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCacheWatchpoint)) { |
| 1783 |
set(VirtualRegister(destinationOperand), |
1773 |
set(VirtualRegister(destinationOperand), |
| 1784 |
addToGraph( |
1774 |
addToGraph( |
| 1785 |
getByIdStatus.makesCalls() ? GetByIdFlush : GetById, |
1775 |
getByIdStatus.makesCalls() ? GetByIdFlush : GetById, |
|
Lines 2481-2498
bool ByteCodeParser::parseBlock(unsigned
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec4
|
| 2481 |
canCountAsInlined = false; |
2471 |
canCountAsInlined = false; |
| 2482 |
} |
2472 |
} |
| 2483 |
|
2473 |
|
| 2484 |
bool hasExitSite = |
2474 |
if (putByIdStatus.isSimpleReplace()) { |
| 2485 |
m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache) |
|
|
| 2486 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCacheWatchpoint) |
| 2487 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCache) |
| 2488 |
|| m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCacheWatchpoint); |
| 2489 |
|
| 2490 |
if (!hasExitSite && putByIdStatus.isSimpleReplace()) { |
| 2491 |
addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(putByIdStatus.oldStructure())), base); |
2475 |
addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(putByIdStatus.oldStructure())), base); |
| 2492 |
handlePutByOffset(base, identifierNumber, putByIdStatus.offset(), value); |
2476 |
handlePutByOffset(base, identifierNumber, putByIdStatus.offset(), value); |
| 2493 |
} else if ( |
2477 |
} else if ( |
| 2494 |
!hasExitSite |
2478 |
putByIdStatus.isSimpleTransition() |
| 2495 |
&& putByIdStatus.isSimpleTransition() |
|
|
| 2496 |
&& (!putByIdStatus.structureChain() |
2479 |
&& (!putByIdStatus.structureChain() |
| 2497 |
|| putByIdStatus.structureChain()->isStillValid())) { |
2480 |
|| putByIdStatus.structureChain()->isStillValid())) { |
| 2498 |
|
2481 |
|