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

Side by Side Diff: src/objects.cc

Issue 11346: Experimental: peridic merge from bleeding_edge. Merge... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years, 1 month 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/macro-assembler-arm.cc ('k') | src/platform.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 4585 matching lines...) Expand 10 before | Expand all | Expand 10 after
4596 case CALL_IC: return "CALL_IC"; 4596 case CALL_IC: return "CALL_IC";
4597 } 4597 }
4598 UNREACHABLE(); 4598 UNREACHABLE();
4599 return NULL; 4599 return NULL;
4600 } 4600 }
4601 4601
4602 4602
4603 const char* Code::ICState2String(InlineCacheState state) { 4603 const char* Code::ICState2String(InlineCacheState state) {
4604 switch (state) { 4604 switch (state) {
4605 case UNINITIALIZED: return "UNINITIALIZED"; 4605 case UNINITIALIZED: return "UNINITIALIZED";
4606 case UNINITIALIZED_IN_LOOP: return "UNINITIALIZED_IN_LOOP";
4606 case PREMONOMORPHIC: return "PREMONOMORPHIC"; 4607 case PREMONOMORPHIC: return "PREMONOMORPHIC";
4607 case MONOMORPHIC: return "MONOMORPHIC"; 4608 case MONOMORPHIC: return "MONOMORPHIC";
4608 case MONOMORPHIC_PROTOTYPE_FAILURE: return "MONOMORPHIC_PROTOTYPE_FAILURE"; 4609 case MONOMORPHIC_PROTOTYPE_FAILURE: return "MONOMORPHIC_PROTOTYPE_FAILURE";
4609 case MEGAMORPHIC: return "MEGAMORPHIC"; 4610 case MEGAMORPHIC: return "MEGAMORPHIC";
4610 case DEBUG_BREAK: return "DEBUG_BREAK"; 4611 case DEBUG_BREAK: return "DEBUG_BREAK";
4611 case DEBUG_PREPARE_STEP_IN: return "DEBUG_PREPARE_STEP_IN"; 4612 case DEBUG_PREPARE_STEP_IN: return "DEBUG_PREPARE_STEP_IN";
4612 } 4613 }
4613 UNREACHABLE(); 4614 UNREACHABLE();
4614 return NULL; 4615 return NULL;
4615 } 4616 }
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
5798 if (length_field_ != 0) return length_field_ >> String::kHashShift; 5799 if (length_field_ != 0) return length_field_ >> String::kHashShift;
5799 unibrow::Utf8InputBuffer<> buffer(string_.start(), 5800 unibrow::Utf8InputBuffer<> buffer(string_.start(),
5800 static_cast<unsigned>(string_.length())); 5801 static_cast<unsigned>(string_.length()));
5801 chars_ = buffer.Length(); 5802 chars_ = buffer.Length();
5802 length_field_ = String::ComputeLengthAndHashField(&buffer, chars_); 5803 length_field_ = String::ComputeLengthAndHashField(&buffer, chars_);
5803 return length_field_ >> String::kHashShift; 5804 return length_field_ >> String::kHashShift;
5804 } 5805 }
5805 5806
5806 Object* GetObject() { 5807 Object* GetObject() {
5807 if (length_field_ == 0) Hash(); 5808 if (length_field_ == 0) Hash();
5808 unibrow::Utf8InputBuffer<> buffer(string_.start(), 5809 return Heap::AllocateSymbol(string_, chars_, length_field_);
5809 static_cast<unsigned>(string_.length()));
5810 return Heap::AllocateSymbol(&buffer, chars_, length_field_);
5811 } 5810 }
5812 5811
5813 static uint32_t StringHash(Object* obj) { 5812 static uint32_t StringHash(Object* obj) {
5814 return String::cast(obj)->Hash(); 5813 return String::cast(obj)->Hash();
5815 } 5814 }
5816 5815
5817 bool IsStringKey() { return true; } 5816 bool IsStringKey() { return true; }
5818 5817
5819 Vector<const char> string_; 5818 Vector<const char> string_;
5820 uint32_t length_field_; 5819 uint32_t length_field_;
(...skipping 28 matching lines...) Expand all
5849 } 5848 }
5850 } 5849 }
5851 // Transform string to symbol if possible. 5850 // Transform string to symbol if possible.
5852 Map* map = Heap::SymbolMapForString(string_); 5851 Map* map = Heap::SymbolMapForString(string_);
5853 if (map != NULL) { 5852 if (map != NULL) {
5854 string_->set_map(map); 5853 string_->set_map(map);
5855 return string_; 5854 return string_;
5856 } 5855 }
5857 // Otherwise allocate a new symbol. 5856 // Otherwise allocate a new symbol.
5858 StringInputBuffer buffer(string_); 5857 StringInputBuffer buffer(string_);
5859 return Heap::AllocateSymbol(&buffer, 5858 return Heap::AllocateInternalSymbol(&buffer,
5860 string_->length(), 5859 string_->length(),
5861 string_->length_field()); 5860 string_->length_field());
5862 } 5861 }
5863 5862
5864 static uint32_t StringHash(Object* obj) { 5863 static uint32_t StringHash(Object* obj) {
5865 return String::cast(obj)->Hash(); 5864 return String::cast(obj)->Hash();
5866 } 5865 }
5867 5866
5868 bool IsStringKey() { return true; } 5867 bool IsStringKey() { return true; }
5869 5868
5870 String* string_; 5869 String* string_;
5871 }; 5870 };
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
6904 // No break point. 6903 // No break point.
6905 if (break_point_objects()->IsUndefined()) return 0; 6904 if (break_point_objects()->IsUndefined()) return 0;
6906 // Single beak point. 6905 // Single beak point.
6907 if (!break_point_objects()->IsFixedArray()) return 1; 6906 if (!break_point_objects()->IsFixedArray()) return 1;
6908 // Multiple break points. 6907 // Multiple break points.
6909 return FixedArray::cast(break_point_objects())->length(); 6908 return FixedArray::cast(break_point_objects())->length();
6910 } 6909 }
6911 6910
6912 6911
6913 } } // namespace v8::internal 6912 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/macro-assembler-arm.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698