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

Side by Side Diff: src/hydrogen.cc

Issue 10831049: Improve constant element index access code generation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 4 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 | « src/arm/lithium-codegen-arm.cc ('k') | 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 5846 matching lines...) Expand 10 before | Expand all | Expand 10 after
5857 } 5857 }
5858 ASSERT(fast_smi_only_elements || 5858 ASSERT(fast_smi_only_elements ||
5859 fast_elements || 5859 fast_elements ||
5860 map->has_fast_double_elements()); 5860 map->has_fast_double_elements());
5861 if (map->instance_type() == JS_ARRAY_TYPE) { 5861 if (map->instance_type() == JS_ARRAY_TYPE) {
5862 length = AddInstruction(new(zone()) HJSArrayLength(object, mapcheck, 5862 length = AddInstruction(new(zone()) HJSArrayLength(object, mapcheck,
5863 HType::Smi())); 5863 HType::Smi()));
5864 } else { 5864 } else {
5865 length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements)); 5865 length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements));
5866 } 5866 }
5867 checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length)); 5867 checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length,
5868 ALLOW_SMI_KEY));
5868 return BuildFastElementAccess(elements, checked_key, val, mapcheck, 5869 return BuildFastElementAccess(elements, checked_key, val, mapcheck,
5869 map->elements_kind(), is_store); 5870 map->elements_kind(), is_store);
5870 } 5871 }
5871 5872
5872 5873
5873 HInstruction* HGraphBuilder::TryBuildConsolidatedElementLoad( 5874 HInstruction* HGraphBuilder::TryBuildConsolidatedElementLoad(
5874 HValue* object, 5875 HValue* object,
5875 HValue* key, 5876 HValue* key,
5876 HValue* val, 5877 HValue* val,
5877 SmallMapList* maps) { 5878 SmallMapList* maps) {
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after
9583 } 9584 }
9584 } 9585 }
9585 9586
9586 #ifdef DEBUG 9587 #ifdef DEBUG
9587 if (graph_ != NULL) graph_->Verify(false); // No full verify. 9588 if (graph_ != NULL) graph_->Verify(false); // No full verify.
9588 if (allocator_ != NULL) allocator_->Verify(); 9589 if (allocator_ != NULL) allocator_->Verify();
9589 #endif 9590 #endif
9590 } 9591 }
9591 9592
9592 } } // namespace v8::internal 9593 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698