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

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

Issue 7029030: Use page header information to test for InNewSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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 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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 initialize_elements(); 1221 initialize_elements();
1222 return this; 1222 return this;
1223 } 1223 }
1224 1224
1225 1225
1226 ACCESSORS(Oddball, to_string, String, kToStringOffset) 1226 ACCESSORS(Oddball, to_string, String, kToStringOffset)
1227 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) 1227 ACCESSORS(Oddball, to_number, Object, kToNumberOffset)
1228 1228
1229 1229
1230 byte Oddball::kind() { 1230 byte Oddball::kind() {
1231 return READ_BYTE_FIELD(this, kKindOffset); 1231 return Smi::cast(READ_FIELD(this, kKindOffset))->value();
1232 } 1232 }
1233 1233
1234 1234
1235 void Oddball::set_kind(byte value) { 1235 void Oddball::set_kind(byte value) {
1236 WRITE_BYTE_FIELD(this, kKindOffset, value); 1236 WRITE_FIELD(this, kKindOffset, Smi::FromInt(value));
1237 } 1237 }
1238 1238
1239 1239
1240 Object* JSGlobalPropertyCell::value() { 1240 Object* JSGlobalPropertyCell::value() {
1241 return READ_FIELD(this, kValueOffset); 1241 return READ_FIELD(this, kValueOffset);
1242 } 1242 }
1243 1243
1244 1244
1245 void JSGlobalPropertyCell::set_value(Object* val, WriteBarrierMode ignored) { 1245 void JSGlobalPropertyCell::set_value(Object* val, WriteBarrierMode ignored) {
1246 // The write barrier is not used for global property cells. 1246 // The write barrier is not used for global property cells.
(...skipping 2817 matching lines...) Expand 10 before | Expand all | Expand 10 after
4064 #undef WRITE_INT_FIELD 4064 #undef WRITE_INT_FIELD
4065 #undef READ_SHORT_FIELD 4065 #undef READ_SHORT_FIELD
4066 #undef WRITE_SHORT_FIELD 4066 #undef WRITE_SHORT_FIELD
4067 #undef READ_BYTE_FIELD 4067 #undef READ_BYTE_FIELD
4068 #undef WRITE_BYTE_FIELD 4068 #undef WRITE_BYTE_FIELD
4069 4069
4070 4070
4071 } } // namespace v8::internal 4071 } } // namespace v8::internal
4072 4072
4073 #endif // V8_OBJECTS_INL_H_ 4073 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698