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

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

Issue 46030: Implementing __defineSetter__ and __defineGetter__ with an array index as arg... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 1320
1321 uint32_t Dictionary::max_number_key() { 1321 uint32_t Dictionary::max_number_key() {
1322 ASSERT(!requires_slow_elements()); 1322 ASSERT(!requires_slow_elements());
1323 Object* max_index_object = get(kMaxNumberKeyIndex); 1323 Object* max_index_object = get(kMaxNumberKeyIndex);
1324 if (!max_index_object->IsSmi()) return 0; 1324 if (!max_index_object->IsSmi()) return 0;
1325 uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value()); 1325 uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value());
1326 return value >> kRequiresSlowElementsTagSize; 1326 return value >> kRequiresSlowElementsTagSize;
1327 } 1327 }
1328 1328
1329 1329
1330 void Dictionary::set_requires_slow_elements() {
1331 set(kMaxNumberKeyIndex,
1332 Smi::FromInt(kRequiresSlowElementsMask),
1333 SKIP_WRITE_BARRIER);
1334 }
1335
1336
1330 // ------------------------------------ 1337 // ------------------------------------
1331 // Cast operations 1338 // Cast operations
1332 1339
1333 1340
1334 CAST_ACCESSOR(FixedArray) 1341 CAST_ACCESSOR(FixedArray)
1335 CAST_ACCESSOR(DescriptorArray) 1342 CAST_ACCESSOR(DescriptorArray)
1336 CAST_ACCESSOR(Dictionary) 1343 CAST_ACCESSOR(Dictionary)
1337 CAST_ACCESSOR(SymbolTable) 1344 CAST_ACCESSOR(SymbolTable)
1338 CAST_ACCESSOR(CompilationCacheTable) 1345 CAST_ACCESSOR(CompilationCacheTable)
1339 CAST_ACCESSOR(MapCache) 1346 CAST_ACCESSOR(MapCache)
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 #undef WRITE_INT_FIELD 2567 #undef WRITE_INT_FIELD
2561 #undef READ_SHORT_FIELD 2568 #undef READ_SHORT_FIELD
2562 #undef WRITE_SHORT_FIELD 2569 #undef WRITE_SHORT_FIELD
2563 #undef READ_BYTE_FIELD 2570 #undef READ_BYTE_FIELD
2564 #undef WRITE_BYTE_FIELD 2571 #undef WRITE_BYTE_FIELD
2565 2572
2566 2573
2567 } } // namespace v8::internal 2574 } } // namespace v8::internal
2568 2575
2569 #endif // V8_OBJECTS_INL_H_ 2576 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698