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

Side by Side Diff: src/objects-inl.h

Issue 4078: - Added a map cache for literal objects. This will... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 bool Object::IsSymbolTable() { 318 bool Object::IsSymbolTable() {
319 return IsHashTable() && this == Heap::symbol_table(); 319 return IsHashTable() && this == Heap::symbol_table();
320 } 320 }
321 321
322 322
323 bool Object::IsCompilationCacheTable() { 323 bool Object::IsCompilationCacheTable() {
324 return IsHashTable(); 324 return IsHashTable();
325 } 325 }
326 326
327 327
328 bool Object::IsMapCache() {
329 return IsHashTable();
330 }
331
332
328 bool Object::IsPrimitive() { 333 bool Object::IsPrimitive() {
329 return IsOddball() || IsNumber() || IsString(); 334 return IsOddball() || IsNumber() || IsString();
330 } 335 }
331 336
332 337
333 bool Object::IsGlobalObject() { 338 bool Object::IsGlobalObject() {
334 return IsHeapObject() && 339 return IsHeapObject() &&
335 ((HeapObject::cast(this)->map()->instance_type() == 340 ((HeapObject::cast(this)->map()->instance_type() ==
336 JS_GLOBAL_OBJECT_TYPE) || 341 JS_GLOBAL_OBJECT_TYPE) ||
337 (HeapObject::cast(this)->map()->instance_type() == 342 (HeapObject::cast(this)->map()->instance_type() ==
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 1110
1106 // ------------------------------------ 1111 // ------------------------------------
1107 // Cast operations 1112 // Cast operations
1108 1113
1109 1114
1110 CAST_ACCESSOR(FixedArray) 1115 CAST_ACCESSOR(FixedArray)
1111 CAST_ACCESSOR(DescriptorArray) 1116 CAST_ACCESSOR(DescriptorArray)
1112 CAST_ACCESSOR(Dictionary) 1117 CAST_ACCESSOR(Dictionary)
1113 CAST_ACCESSOR(SymbolTable) 1118 CAST_ACCESSOR(SymbolTable)
1114 CAST_ACCESSOR(CompilationCacheTable) 1119 CAST_ACCESSOR(CompilationCacheTable)
1120 CAST_ACCESSOR(MapCache)
1115 CAST_ACCESSOR(String) 1121 CAST_ACCESSOR(String)
1116 CAST_ACCESSOR(SeqString) 1122 CAST_ACCESSOR(SeqString)
1117 CAST_ACCESSOR(AsciiString) 1123 CAST_ACCESSOR(AsciiString)
1118 CAST_ACCESSOR(TwoByteString) 1124 CAST_ACCESSOR(TwoByteString)
1119 CAST_ACCESSOR(ConsString) 1125 CAST_ACCESSOR(ConsString)
1120 CAST_ACCESSOR(SlicedString) 1126 CAST_ACCESSOR(SlicedString)
1121 CAST_ACCESSOR(ExternalString) 1127 CAST_ACCESSOR(ExternalString)
1122 CAST_ACCESSOR(ExternalAsciiString) 1128 CAST_ACCESSOR(ExternalAsciiString)
1123 CAST_ACCESSOR(ExternalTwoByteString) 1129 CAST_ACCESSOR(ExternalTwoByteString)
1124 CAST_ACCESSOR(JSObject) 1130 CAST_ACCESSOR(JSObject)
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 #undef WRITE_INT_FIELD 2168 #undef WRITE_INT_FIELD
2163 #undef READ_SHORT_FIELD 2169 #undef READ_SHORT_FIELD
2164 #undef WRITE_SHORT_FIELD 2170 #undef WRITE_SHORT_FIELD
2165 #undef READ_BYTE_FIELD 2171 #undef READ_BYTE_FIELD
2166 #undef WRITE_BYTE_FIELD 2172 #undef WRITE_BYTE_FIELD
2167 2173
2168 2174
2169 } } // namespace v8::internal 2175 } } // namespace v8::internal
2170 2176
2171 #endif // V8_OBJECTS_INL_H_ 2177 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698