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

Side by Side Diff: src/hydrogen.cc

Issue 20295005: Fix JSArray-specific length lookup in polymorphic array handling (Closed) Base URL: https://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 | test/mjsunit/regress/regress-crbug-263276.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 5683 matching lines...) Expand 10 before | Expand all | Expand 10 after
5694 5694
5695 set_current_block(this_map); 5695 set_current_block(this_map);
5696 HInstruction* checked_key = NULL; 5696 HInstruction* checked_key = NULL;
5697 HInstruction* access = NULL; 5697 HInstruction* access = NULL;
5698 if (IsFastElementsKind(elements_kind)) { 5698 if (IsFastElementsKind(elements_kind)) {
5699 if (is_store && !IsFastDoubleElementsKind(elements_kind)) { 5699 if (is_store && !IsFastDoubleElementsKind(elements_kind)) {
5700 AddInstruction(HCheckMaps::New( 5700 AddInstruction(HCheckMaps::New(
5701 elements, isolate()->factory()->fixed_array_map(), 5701 elements, isolate()->factory()->fixed_array_map(),
5702 zone(), top_info(), mapcompare)); 5702 zone(), top_info(), mapcompare));
5703 } 5703 }
5704 if (map->IsJSArray()) { 5704 if (map->instance_type() == JS_ARRAY_TYPE) {
5705 HInstruction* length = AddLoad(object, HObjectAccess::ForArrayLength(), 5705 HInstruction* length = AddLoad(object, HObjectAccess::ForArrayLength(),
5706 mapcompare, Representation::Smi()); 5706 mapcompare, Representation::Smi());
5707 length->set_type(HType::Smi()); 5707 length->set_type(HType::Smi());
5708 checked_key = Add<HBoundsCheck>(key, length); 5708 checked_key = Add<HBoundsCheck>(key, length);
5709 } else { 5709 } else {
5710 HInstruction* length = AddLoadFixedArrayLength(elements); 5710 HInstruction* length = AddLoadFixedArrayLength(elements);
5711 checked_key = Add<HBoundsCheck>(key, length); 5711 checked_key = Add<HBoundsCheck>(key, length);
5712 } 5712 }
5713 access = AddFastElementAccess( 5713 access = AddFastElementAccess(
5714 elements, checked_key, val, mapcompare, 5714 elements, checked_key, val, mapcompare,
(...skipping 4245 matching lines...) Expand 10 before | Expand all | Expand 10 after
9960 if (ShouldProduceTraceOutput()) { 9960 if (ShouldProduceTraceOutput()) {
9961 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9961 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9962 } 9962 }
9963 9963
9964 #ifdef DEBUG 9964 #ifdef DEBUG
9965 graph_->Verify(false); // No full verify. 9965 graph_->Verify(false); // No full verify.
9966 #endif 9966 #endif
9967 } 9967 }
9968 9968
9969 } } // namespace v8::internal 9969 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-263276.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698