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

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: u 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
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 4302 matching lines...) Expand 10 before | Expand all | Expand 10 after
4313 HInstruction* map = AddInstruction(new(zone()) HForInPrepareMap( 4313 HInstruction* map = AddInstruction(new(zone()) HForInPrepareMap(
4314 environment()->LookupContext(), enumerable)); 4314 environment()->LookupContext(), enumerable));
4315 AddSimulate(stmt->PrepareId()); 4315 AddSimulate(stmt->PrepareId());
4316 4316
4317 HInstruction* array = AddInstruction( 4317 HInstruction* array = AddInstruction(
4318 new(zone()) HForInCacheArray( 4318 new(zone()) HForInCacheArray(
4319 enumerable, 4319 enumerable,
4320 map, 4320 map,
4321 DescriptorArray::kEnumCacheBridgeCacheIndex)); 4321 DescriptorArray::kEnumCacheBridgeCacheIndex));
4322 4322
4323 HInstruction* array_length = AddInstruction( 4323 HInstruction* enum_length = AddInstruction(new(zone()) HMapEnumLength(map));
4324 new(zone()) HFixedArrayBaseLength(array));
4325 4324
4326 HInstruction* start_index = AddInstruction(new(zone()) HConstant( 4325 HInstruction* start_index = AddInstruction(new(zone()) HConstant(
4327 Handle<Object>(Smi::FromInt(0)), Representation::Integer32())); 4326 Handle<Object>(Smi::FromInt(0)), Representation::Integer32()));
4328 4327
4329 Push(map); 4328 Push(map);
4330 Push(array); 4329 Push(array);
4331 Push(array_length); 4330 Push(enum_length);
4332 Push(start_index); 4331 Push(start_index);
4333 4332
4334 HInstruction* index_cache = AddInstruction( 4333 HInstruction* index_cache = AddInstruction(
4335 new(zone()) HForInCacheArray( 4334 new(zone()) HForInCacheArray(
4336 enumerable, 4335 enumerable,
4337 map, 4336 map,
4338 DescriptorArray::kEnumCacheBridgeIndicesCacheIndex)); 4337 DescriptorArray::kEnumCacheBridgeIndicesCacheIndex));
4339 HForInCacheArray::cast(array)->set_index_cache( 4338 HForInCacheArray::cast(array)->set_index_cache(
4340 HForInCacheArray::cast(index_cache)); 4339 HForInCacheArray::cast(index_cache));
4341 4340
(...skipping 5301 matching lines...) Expand 10 before | Expand all | Expand 10 after
9643 } 9642 }
9644 } 9643 }
9645 9644
9646 #ifdef DEBUG 9645 #ifdef DEBUG
9647 if (graph_ != NULL) graph_->Verify(false); // No full verify. 9646 if (graph_ != NULL) graph_->Verify(false); // No full verify.
9648 if (allocator_ != NULL) allocator_->Verify(); 9647 if (allocator_ != NULL) allocator_->Verify();
9649 #endif 9648 #endif
9650 } 9649 }
9651 9650
9652 } } // namespace v8::internal 9651 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698