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

Side by Side Diff: src/hydrogen.cc

Issue 18263002: Not consider the use representation in unintiliazed ArrayLiteral which always requires SMI (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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 | src/hydrogen-instructions.h » ('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 5750 matching lines...) Expand 10 before | Expand all | Expand 10 after
5761 ASSERT(current_block()->HasPredecessor()); 5761 ASSERT(current_block()->HasPredecessor());
5762 ZoneList<Expression*>* subexprs = expr->values(); 5762 ZoneList<Expression*>* subexprs = expr->values();
5763 int length = subexprs->length(); 5763 int length = subexprs->length();
5764 HValue* context = environment()->LookupContext(); 5764 HValue* context = environment()->LookupContext();
5765 HInstruction* literal; 5765 HInstruction* literal;
5766 5766
5767 Handle<FixedArray> literals(environment()->closure()->literals(), isolate()); 5767 Handle<FixedArray> literals(environment()->closure()->literals(), isolate());
5768 Handle<Object> raw_boilerplate(literals->get(expr->literal_index()), 5768 Handle<Object> raw_boilerplate(literals->get(expr->literal_index()),
5769 isolate()); 5769 isolate());
5770 5770
5771 bool uninitialized = false;
5771 if (raw_boilerplate->IsUndefined()) { 5772 if (raw_boilerplate->IsUndefined()) {
5773 uninitialized = true;
5772 raw_boilerplate = Runtime::CreateArrayLiteralBoilerplate( 5774 raw_boilerplate = Runtime::CreateArrayLiteralBoilerplate(
5773 isolate(), literals, expr->constant_elements()); 5775 isolate(), literals, expr->constant_elements());
5774 if (raw_boilerplate.is_null()) { 5776 if (raw_boilerplate.is_null()) {
5775 return Bailout("array boilerplate creation failed"); 5777 return Bailout("array boilerplate creation failed");
5776 } 5778 }
5777 literals->set(expr->literal_index(), *raw_boilerplate); 5779 literals->set(expr->literal_index(), *raw_boilerplate);
5778 if (JSObject::cast(*raw_boilerplate)->elements()->map() == 5780 if (JSObject::cast(*raw_boilerplate)->elements()->map() ==
5779 isolate()->heap()->fixed_cow_array_map()) { 5781 isolate()->heap()->fixed_cow_array_map()) {
5780 isolate()->counters()->cow_arrays_created_runtime()->Increment(); 5782 isolate()->counters()->cow_arrays_created_runtime()->Increment();
5781 } 5783 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5857 elements = AddLoadElements(literal); 5859 elements = AddLoadElements(literal);
5858 5860
5859 HValue* key = Add<HConstant>(i); 5861 HValue* key = Add<HConstant>(i);
5860 5862
5861 switch (boilerplate_elements_kind) { 5863 switch (boilerplate_elements_kind) {
5862 case FAST_SMI_ELEMENTS: 5864 case FAST_SMI_ELEMENTS:
5863 case FAST_HOLEY_SMI_ELEMENTS: 5865 case FAST_HOLEY_SMI_ELEMENTS:
5864 case FAST_ELEMENTS: 5866 case FAST_ELEMENTS:
5865 case FAST_HOLEY_ELEMENTS: 5867 case FAST_HOLEY_ELEMENTS:
5866 case FAST_DOUBLE_ELEMENTS: 5868 case FAST_DOUBLE_ELEMENTS:
5867 case FAST_HOLEY_DOUBLE_ELEMENTS: 5869 case FAST_HOLEY_DOUBLE_ELEMENTS: {
5868 Add<HStoreKeyed>(elements, key, value, 5870 HStoreKeyed* instr = Add<HStoreKeyed>(elements, key, value,
5869 boilerplate_elements_kind); 5871 boilerplate_elements_kind);
5872 instr->SetUninitialized(uninitialized);
5870 break; 5873 break;
5874 }
5871 default: 5875 default:
5872 UNREACHABLE(); 5876 UNREACHABLE();
5873 break; 5877 break;
5874 } 5878 }
5875 5879
5876 AddSimulate(expr->GetIdForElement(i)); 5880 AddSimulate(expr->GetIdForElement(i));
5877 } 5881 }
5878 5882
5879 Drop(1); // array literal index 5883 Drop(1); // array literal index
5880 return ast_context()->ReturnValue(Pop()); 5884 return ast_context()->ReturnValue(Pop());
(...skipping 5363 matching lines...) Expand 10 before | Expand all | Expand 10 after
11244 if (ShouldProduceTraceOutput()) { 11248 if (ShouldProduceTraceOutput()) {
11245 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11249 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11246 } 11250 }
11247 11251
11248 #ifdef DEBUG 11252 #ifdef DEBUG
11249 graph_->Verify(false); // No full verify. 11253 graph_->Verify(false); // No full verify.
11250 #endif 11254 #endif
11251 } 11255 }
11252 11256
11253 } } // namespace v8::internal 11257 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698