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

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

Issue 8539011: ARM: Implement runtime function for array literal transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 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/objects.cc ('k') | src/x64/code-stubs-x64.cc » ('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 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 #define BOOL_ACCESSORS(holder, field, name, offset) \ 113 #define BOOL_ACCESSORS(holder, field, name, offset) \
114 bool holder::name() { \ 114 bool holder::name() { \
115 return BooleanBit::get(field(), offset); \ 115 return BooleanBit::get(field(), offset); \
116 } \ 116 } \
117 void holder::set_##name(bool value) { \ 117 void holder::set_##name(bool value) { \
118 set_##field(BooleanBit::set(field(), offset, value)); \ 118 set_##field(BooleanBit::set(field(), offset, value)); \
119 } 119 }
120 120
121 121
122 bool IsMoreGeneralElementsKindTransition(ElementsKind from_kind,
123 ElementsKind to_kind) {
124 if (to_kind == FAST_ELEMENTS) {
125 return from_kind == FAST_SMI_ONLY_ELEMENTS ||
126 from_kind == FAST_DOUBLE_ELEMENTS;
127 } else {
128 return to_kind == FAST_DOUBLE_ELEMENTS &&
129 from_kind == FAST_SMI_ONLY_ELEMENTS;
130 }
131 }
132
133
122 bool Object::IsFixedArrayBase() { 134 bool Object::IsFixedArrayBase() {
123 return IsFixedArray() || IsFixedDoubleArray(); 135 return IsFixedArray() || IsFixedDoubleArray();
124 } 136 }
125 137
126 138
127 bool Object::IsInstanceOf(FunctionTemplateInfo* expected) { 139 bool Object::IsInstanceOf(FunctionTemplateInfo* expected) {
128 // There is a constraint on the object; check. 140 // There is a constraint on the object; check.
129 if (!this->IsJSObject()) return false; 141 if (!this->IsJSObject()) return false;
130 // Fetch the constructor function of the object. 142 // Fetch the constructor function of the object.
131 Object* cons_obj = JSObject::cast(this)->map()->constructor(); 143 Object* cons_obj = JSObject::cast(this)->map()->constructor();
(...skipping 4473 matching lines...) Expand 10 before | Expand all | Expand 10 after
4605 #undef WRITE_INT_FIELD 4617 #undef WRITE_INT_FIELD
4606 #undef READ_SHORT_FIELD 4618 #undef READ_SHORT_FIELD
4607 #undef WRITE_SHORT_FIELD 4619 #undef WRITE_SHORT_FIELD
4608 #undef READ_BYTE_FIELD 4620 #undef READ_BYTE_FIELD
4609 #undef WRITE_BYTE_FIELD 4621 #undef WRITE_BYTE_FIELD
4610 4622
4611 4623
4612 } } // namespace v8::internal 4624 } } // namespace v8::internal
4613 4625
4614 #endif // V8_OBJECTS_INL_H_ 4626 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698