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

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

Issue 8620: Allow inline caching for getting the length of string wrapper objects. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 SHARED_FUNCTION_INFO_TYPE); 294 SHARED_FUNCTION_INFO_TYPE);
295 } 295 }
296 296
297 297
298 bool Object::IsJSValue() { 298 bool Object::IsJSValue() {
299 return Object::IsHeapObject() 299 return Object::IsHeapObject()
300 && HeapObject::cast(this)->map()->instance_type() == JS_VALUE_TYPE; 300 && HeapObject::cast(this)->map()->instance_type() == JS_VALUE_TYPE;
301 } 301 }
302 302
303 303
304 bool Object::IsStringWrapper() {
305 return IsJSValue() && JSValue::cast(this)->value()->IsString();
306 }
307
308
304 bool Object::IsProxy() { 309 bool Object::IsProxy() {
305 return Object::IsHeapObject() 310 return Object::IsHeapObject()
306 && HeapObject::cast(this)->map()->instance_type() == PROXY_TYPE; 311 && HeapObject::cast(this)->map()->instance_type() == PROXY_TYPE;
307 } 312 }
308 313
309 314
310 bool Object::IsBoolean() { 315 bool Object::IsBoolean() {
311 return IsTrue() || IsFalse(); 316 return IsTrue() || IsFalse();
312 } 317 }
313 318
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 #undef WRITE_INT_FIELD 2360 #undef WRITE_INT_FIELD
2356 #undef READ_SHORT_FIELD 2361 #undef READ_SHORT_FIELD
2357 #undef WRITE_SHORT_FIELD 2362 #undef WRITE_SHORT_FIELD
2358 #undef READ_BYTE_FIELD 2363 #undef READ_BYTE_FIELD
2359 #undef WRITE_BYTE_FIELD 2364 #undef WRITE_BYTE_FIELD
2360 2365
2361 2366
2362 } } // namespace v8::internal 2367 } } // namespace v8::internal
2363 2368
2364 #endif // V8_OBJECTS_INL_H_ 2369 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/ic-arm.cc ('K') | « src/objects.h ('k') | src/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698