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

Side by Side Diff: src/hydrogen.cc

Issue 10824079: Use a special EnumLength field to indicate number of valid enum cache values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 3 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/heap.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 4564 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 HInstruction* map = AddInstruction(new(zone()) HForInPrepareMap( 4575 HInstruction* map = AddInstruction(new(zone()) HForInPrepareMap(
4576 environment()->LookupContext(), enumerable)); 4576 environment()->LookupContext(), enumerable));
4577 AddSimulate(stmt->PrepareId()); 4577 AddSimulate(stmt->PrepareId());
4578 4578
4579 HInstruction* array = AddInstruction( 4579 HInstruction* array = AddInstruction(
4580 new(zone()) HForInCacheArray( 4580 new(zone()) HForInCacheArray(
4581 enumerable, 4581 enumerable,
4582 map, 4582 map,
4583 DescriptorArray::kEnumCacheBridgeCacheIndex)); 4583 DescriptorArray::kEnumCacheBridgeCacheIndex));
4584 4584
4585 HInstruction* array_length = AddInstruction( 4585 HInstruction* enum_length = AddInstruction(new(zone()) HMapEnumLength(map));
4586 new(zone()) HFixedArrayBaseLength(array));
4587 4586
4588 HInstruction* start_index = AddInstruction(new(zone()) HConstant( 4587 HInstruction* start_index = AddInstruction(new(zone()) HConstant(
4589 Handle<Object>(Smi::FromInt(0)), Representation::Integer32())); 4588 Handle<Object>(Smi::FromInt(0)), Representation::Integer32()));
4590 4589
4591 Push(map); 4590 Push(map);
4592 Push(array); 4591 Push(array);
4593 Push(array_length); 4592 Push(enum_length);
4594 Push(start_index); 4593 Push(start_index);
4595 4594
4596 HInstruction* index_cache = AddInstruction( 4595 HInstruction* index_cache = AddInstruction(
4597 new(zone()) HForInCacheArray( 4596 new(zone()) HForInCacheArray(
4598 enumerable, 4597 enumerable,
4599 map, 4598 map,
4600 DescriptorArray::kEnumCacheBridgeIndicesCacheIndex)); 4599 DescriptorArray::kEnumCacheBridgeIndicesCacheIndex));
4601 HForInCacheArray::cast(array)->set_index_cache( 4600 HForInCacheArray::cast(array)->set_index_cache(
4602 HForInCacheArray::cast(index_cache)); 4601 HForInCacheArray::cast(index_cache));
4603 4602
(...skipping 5365 matching lines...) Expand 10 before | Expand all | Expand 10 after
9969 } 9968 }
9970 } 9969 }
9971 9970
9972 #ifdef DEBUG 9971 #ifdef DEBUG
9973 if (graph_ != NULL) graph_->Verify(false); // No full verify. 9972 if (graph_ != NULL) graph_->Verify(false); // No full verify.
9974 if (allocator_ != NULL) allocator_->Verify(); 9973 if (allocator_ != NULL) allocator_->Verify();
9975 #endif 9974 #endif
9976 } 9975 }
9977 9976
9978 } } // namespace v8::internal 9977 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698