Remove obsolete elements kind check for array literals.
R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/17378005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
496af21047
commit
0524263a27
@ -6050,26 +6050,6 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
|
||||
Handle<FixedArray> constants = isolate()->factory()->empty_fixed_array();
|
||||
int literal_index = expr->literal_index();
|
||||
|
||||
// TODO(mstarzinger): The following check and deopt is actually obsolete
|
||||
// but test cases for the tick processor fails because profile differs.
|
||||
|
||||
// Deopt if the array literal boilerplate ElementsKind is of a type
|
||||
// different than the expected one. The check isn't necessary if the
|
||||
// boilerplate has already been converted to TERMINAL_FAST_ELEMENTS_KIND.
|
||||
if (CanTransitionToMoreGeneralFastElementsKind(
|
||||
boilerplate_elements_kind, true)) {
|
||||
IfBuilder builder(this);
|
||||
HValue* boilerplate = AddInstruction(new(zone())
|
||||
HConstant(original_boilerplate_object));
|
||||
HValue* elements_kind = AddInstruction(new(zone())
|
||||
HElementsKind(boilerplate));
|
||||
HValue* expected_kind = AddInstruction(new(zone())
|
||||
HConstant(boilerplate_elements_kind));
|
||||
builder.IfCompare(elements_kind, expected_kind, Token::EQ);
|
||||
builder.Then();
|
||||
builder.ElseDeopt();
|
||||
}
|
||||
|
||||
AddInstruction(new(zone()) HPushArgument(AddInstruction(
|
||||
new(zone()) HConstant(literals))));
|
||||
AddInstruction(new(zone()) HPushArgument(AddInstruction(
|
||||
|
@ -25,6 +25,10 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// This test case is not compatible with optimization stress because the
|
||||
// generated profile will look vastly different when more is optimized.
|
||||
// Flags: --nostress-opt --noalways-opt
|
||||
|
||||
// Load implementations from <project root>/tools.
|
||||
// Files: tools/splaytree.js tools/codemap.js tools/csvparser.js
|
||||
// Files: tools/consarray.js tools/profile.js tools/profile_view.js
|
||||
|
Loading…
Reference in New Issue
Block a user