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

Side by Side Diff: src/hydrogen.cc

Issue 17334004: Bugfix in hydrogen array literal code generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit addressed Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/array-literal-feedback.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6046 matching lines...) Expand 10 before | Expand all | Expand 10 after
6057 AddInstruction(new(zone()) HPushArgument(AddInstruction( 6057 AddInstruction(new(zone()) HPushArgument(AddInstruction(
6058 new(zone()) HConstant(constants)))); 6058 new(zone()) HConstant(constants))));
6059 6059
6060 Runtime::FunctionId function_id = (expr->depth() > 1) 6060 Runtime::FunctionId function_id = (expr->depth() > 1)
6061 ? Runtime::kCreateArrayLiteral : Runtime::kCreateArrayLiteralShallow; 6061 ? Runtime::kCreateArrayLiteral : Runtime::kCreateArrayLiteralShallow;
6062 literal = AddInstruction( 6062 literal = AddInstruction(
6063 new(zone()) HCallRuntime(context, 6063 new(zone()) HCallRuntime(context,
6064 isolate()->factory()->empty_string(), 6064 isolate()->factory()->empty_string(),
6065 Runtime::FunctionForId(function_id), 6065 Runtime::FunctionForId(function_id),
6066 3)); 6066 3));
6067
6068 // De-opt if elements kind changed from boilerplate_elements_kind.
6069 Handle<Map> map = Handle<Map>(original_boilerplate_object->map(),
6070 isolate());
6071 AddInstruction(HCheckMaps::New(literal, map, zone()));
6067 } 6072 }
6068 6073
6069 // The array is expected in the bailout environment during computation 6074 // The array is expected in the bailout environment during computation
6070 // of the property values and is the value of the entire expression. 6075 // of the property values and is the value of the entire expression.
6071 Push(literal); 6076 Push(literal);
6072 // The literal index is on the stack, too. 6077 // The literal index is on the stack, too.
6073 Push(AddInstruction(new(zone()) HConstant(expr->literal_index()))); 6078 Push(AddInstruction(new(zone()) HConstant(expr->literal_index())));
6074 6079
6075 HInstruction* elements = NULL; 6080 HInstruction* elements = NULL;
6076 6081
(...skipping 5570 matching lines...) Expand 10 before | Expand all | Expand 10 after
11647 } 11652 }
11648 } 11653 }
11649 11654
11650 #ifdef DEBUG 11655 #ifdef DEBUG
11651 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11656 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11652 if (allocator_ != NULL) allocator_->Verify(); 11657 if (allocator_ != NULL) allocator_->Verify();
11653 #endif 11658 #endif
11654 } 11659 }
11655 11660
11656 } } // namespace v8::internal 11661 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/array-literal-feedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698