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

Side by Side Diff: src/objects.cc

Issue 7170012: Crankshaft support for polymorphic array handling (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments; add implemention for ARM and x64 Created 9 years, 6 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4390 matching lines...) Expand 10 before | Expand all | Expand 10 after
4401 maps->Rewind(0); 4401 maps->Rewind(0);
4402 *code_flags = Smi::cast(list->get(0))->value(); 4402 *code_flags = Smi::cast(list->get(0))->value();
4403 for (int i = 1; i < list->length(); ++i) { 4403 for (int i = 1; i < list->length(); ++i) {
4404 maps->Add(Map::cast(list->get(i))); 4404 maps->Add(Map::cast(list->get(i)));
4405 } 4405 }
4406 return maps; 4406 return maps;
4407 } 4407 }
4408 4408
4409 MapList* maps_; // weak. 4409 MapList* maps_; // weak.
4410 int code_flags_; 4410 int code_flags_;
4411 static const int kDefaultListAllocationSize = 4411 static const int kDefaultListAllocationSize = kMaxKeyedPolymorphism + 1;
4412 KeyedIC::kMaxKeyedPolymorphism + 1;
4413 }; 4412 };
4414 4413
4415 4414
4416 Object* PolymorphicCodeCacheHashTable::Lookup(MapList* maps, int code_flags) { 4415 Object* PolymorphicCodeCacheHashTable::Lookup(MapList* maps, int code_flags) {
4417 PolymorphicCodeCacheHashTableKey key(maps, code_flags); 4416 PolymorphicCodeCacheHashTableKey key(maps, code_flags);
4418 int entry = FindEntry(&key); 4417 int entry = FindEntry(&key);
4419 if (entry == kNotFound) return GetHeap()->undefined_value(); 4418 if (entry == kNotFound) return GetHeap()->undefined_value();
4420 return get(EntryToIndex(entry) + 1); 4419 return get(EntryToIndex(entry) + 1);
4421 } 4420 }
4422 4421
(...skipping 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after
7023 if (extra == kStrictMode) { 7022 if (extra == kStrictMode) {
7024 name = "STRICT"; 7023 name = "STRICT";
7025 } 7024 }
7026 break; 7025 break;
7027 default: 7026 default:
7028 break; 7027 break;
7029 } 7028 }
7030 if (name != NULL) { 7029 if (name != NULL) {
7031 PrintF(out, "extra_ic_state = %s\n", name); 7030 PrintF(out, "extra_ic_state = %s\n", name);
7032 } else { 7031 } else {
7033 PrintF(out, "etra_ic_state = %d\n", extra); 7032 PrintF(out, "extra_ic_state = %d\n", extra);
7034 } 7033 }
7035 } 7034 }
7036 7035
7037 7036
7038 void Code::Disassemble(const char* name, FILE* out) { 7037 void Code::Disassemble(const char* name, FILE* out) {
7039 PrintF(out, "kind = %s\n", Kind2String(kind())); 7038 PrintF(out, "kind = %s\n", Kind2String(kind()));
7040 if (is_inline_cache_stub()) { 7039 if (is_inline_cache_stub()) {
7041 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); 7040 PrintF(out, "ic_state = %s\n", ICState2String(ic_state()));
7042 PrintExtraICState(out, kind(), extra_ic_state()); 7041 PrintExtraICState(out, kind(), extra_ic_state());
7043 PrintF(out, "ic_in_loop = %d\n", ic_in_loop() == IN_LOOP); 7042 PrintF(out, "ic_in_loop = %d\n", ic_in_loop() == IN_LOOP);
(...skipping 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after
11206 if (break_point_objects()->IsUndefined()) return 0; 11205 if (break_point_objects()->IsUndefined()) return 0;
11207 // Single beak point. 11206 // Single beak point.
11208 if (!break_point_objects()->IsFixedArray()) return 1; 11207 if (!break_point_objects()->IsFixedArray()) return 1;
11209 // Multiple break points. 11208 // Multiple break points.
11210 return FixedArray::cast(break_point_objects())->length(); 11209 return FixedArray::cast(break_point_objects())->length();
11211 } 11210 }
11212 #endif 11211 #endif
11213 11212
11214 11213
11215 } } // namespace v8::internal 11214 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698