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

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

Issue 18044: Fix issue 186:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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') | test/mjsunit/bugs/bug-186.js » ('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 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return this == Failure::Exception(); 321 return this == Failure::Exception();
322 } 322 }
323 323
324 324
325 bool Object::IsJSObject() { 325 bool Object::IsJSObject() {
326 return IsHeapObject() 326 return IsHeapObject()
327 && HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_OBJECT_TYPE; 327 && HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_OBJECT_TYPE;
328 } 328 }
329 329
330 330
331 bool Object::IsJSContextExtensionObject() {
332 return IsHeapObject()
333 && (HeapObject::cast(this)->map()->instance_type() ==
334 JS_CONTEXT_EXTENSION_OBJECT_TYPE);
335 }
336
337
331 bool Object::IsMap() { 338 bool Object::IsMap() {
332 return Object::IsHeapObject() 339 return Object::IsHeapObject()
333 && HeapObject::cast(this)->map()->instance_type() == MAP_TYPE; 340 && HeapObject::cast(this)->map()->instance_type() == MAP_TYPE;
334 } 341 }
335 342
336 343
337 bool Object::IsFixedArray() { 344 bool Object::IsFixedArray() {
338 return Object::IsHeapObject() 345 return Object::IsHeapObject()
339 && HeapObject::cast(this)->map()->instance_type() == FIXED_ARRAY_TYPE; 346 && HeapObject::cast(this)->map()->instance_type() == FIXED_ARRAY_TYPE;
340 } 347 }
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 return JSBuiltinsObject::kSize; 1018 return JSBuiltinsObject::kSize;
1012 case JS_FUNCTION_TYPE: 1019 case JS_FUNCTION_TYPE:
1013 return JSFunction::kSize; 1020 return JSFunction::kSize;
1014 case JS_VALUE_TYPE: 1021 case JS_VALUE_TYPE:
1015 return JSValue::kSize; 1022 return JSValue::kSize;
1016 case JS_ARRAY_TYPE: 1023 case JS_ARRAY_TYPE:
1017 return JSValue::kSize; 1024 return JSValue::kSize;
1018 case JS_REGEXP_TYPE: 1025 case JS_REGEXP_TYPE:
1019 return JSValue::kSize; 1026 return JSValue::kSize;
1020 case JS_OBJECT_TYPE: 1027 case JS_OBJECT_TYPE:
1028 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
1021 return JSObject::kHeaderSize; 1029 return JSObject::kHeaderSize;
1022 default: 1030 default:
1023 UNREACHABLE(); 1031 UNREACHABLE();
1024 return 0; 1032 return 0;
1025 } 1033 }
1026 } 1034 }
1027 1035
1028 1036
1029 int JSObject::GetInternalFieldCount() { 1037 int JSObject::GetInternalFieldCount() {
1030 ASSERT(1 << kPointerSizeLog2 == kPointerSize); 1038 ASSERT(1 << kPointerSizeLog2 == kPointerSize);
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 #undef WRITE_INT_FIELD 2494 #undef WRITE_INT_FIELD
2487 #undef READ_SHORT_FIELD 2495 #undef READ_SHORT_FIELD
2488 #undef WRITE_SHORT_FIELD 2496 #undef WRITE_SHORT_FIELD
2489 #undef READ_BYTE_FIELD 2497 #undef READ_BYTE_FIELD
2490 #undef WRITE_BYTE_FIELD 2498 #undef WRITE_BYTE_FIELD
2491 2499
2492 2500
2493 } } // namespace v8::internal 2501 } } // namespace v8::internal
2494 2502
2495 #endif // V8_OBJECTS_INL_H_ 2503 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | test/mjsunit/bugs/bug-186.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698