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

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

Issue 8336021: Fix ASSERT by reordering the initialization of the arguments boilerplate. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « src/objects-debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4070 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 } 4081 }
4082 4082
4083 4083
4084 ElementsKind JSObject::GetElementsKind() { 4084 ElementsKind JSObject::GetElementsKind() {
4085 ElementsKind kind = map()->elements_kind(); 4085 ElementsKind kind = map()->elements_kind();
4086 #if DEBUG 4086 #if DEBUG
4087 FixedArrayBase* fixed_array = 4087 FixedArrayBase* fixed_array =
4088 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); 4088 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset));
4089 Map* map = fixed_array->map(); 4089 Map* map = fixed_array->map();
4090 ASSERT(((kind == FAST_ELEMENTS || kind == FAST_SMI_ONLY_ELEMENTS) && 4090 ASSERT(((kind == FAST_ELEMENTS || kind == FAST_SMI_ONLY_ELEMENTS) &&
4091 (map == GetHeap()->fixed_array_map() || 4091 (map == GetHeap()->fixed_array_map() ||
4092 map == GetHeap()->fixed_cow_array_map())) || 4092 map == GetHeap()->fixed_cow_array_map())) ||
4093 (kind == FAST_DOUBLE_ELEMENTS && 4093 (kind == FAST_DOUBLE_ELEMENTS &&
4094 fixed_array->IsFixedDoubleArray()) || 4094 fixed_array->IsFixedDoubleArray()) ||
4095 (kind == DICTIONARY_ELEMENTS && 4095 (kind == DICTIONARY_ELEMENTS &&
4096 fixed_array->IsFixedArray() && 4096 fixed_array->IsFixedArray() &&
4097 fixed_array->IsDictionary()) || 4097 fixed_array->IsDictionary()) ||
4098 (kind > DICTIONARY_ELEMENTS)); 4098 (kind > DICTIONARY_ELEMENTS));
4099 ASSERT((kind != NON_STRICT_ARGUMENTS_ELEMENTS) ||
4100 (elements()->IsFixedArray() && elements()->length() >= 2));
4099 #endif 4101 #endif
4100 return kind; 4102 return kind;
4101 } 4103 }
4102 4104
4103 4105
4104 ElementsAccessor* JSObject::GetElementsAccessor() { 4106 ElementsAccessor* JSObject::GetElementsAccessor() {
4105 return ElementsAccessor::ForKind(GetElementsKind()); 4107 return ElementsAccessor::ForKind(GetElementsKind());
4106 } 4108 }
4107 4109
4108 4110
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
4666 #undef WRITE_INT_FIELD 4668 #undef WRITE_INT_FIELD
4667 #undef READ_SHORT_FIELD 4669 #undef READ_SHORT_FIELD
4668 #undef WRITE_SHORT_FIELD 4670 #undef WRITE_SHORT_FIELD
4669 #undef READ_BYTE_FIELD 4671 #undef READ_BYTE_FIELD
4670 #undef WRITE_BYTE_FIELD 4672 #undef WRITE_BYTE_FIELD
4671 4673
4672 4674
4673 } } // namespace v8::internal 4675 } } // namespace v8::internal
4674 4676
4675 #endif // V8_OBJECTS_INL_H_ 4677 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698