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

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

Issue 7911: Various API changes (Closed)
Patch Set: "Various API changes 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime.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 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 double value = HeapNumber::cast(this)->value(); 468 double value = HeapNumber::cast(this)->value();
469 int int_value = FastD2I(value); 469 int int_value = FastD2I(value);
470 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) { 470 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
471 return Smi::FromInt(int_value); 471 return Smi::FromInt(int_value);
472 } 472 }
473 } 473 }
474 return Failure::Exception(); 474 return Failure::Exception();
475 } 475 }
476 476
477 477
478 bool Object::HasSpecificClassOf(String* name) {
479 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name);
480 }
481
482
478 Object* Object::GetElement(uint32_t index) { 483 Object* Object::GetElement(uint32_t index) {
479 return GetElementWithReceiver(this, index); 484 return GetElementWithReceiver(this, index);
480 } 485 }
481 486
482 487
483 Object* Object::GetProperty(String* key) { 488 Object* Object::GetProperty(String* key) {
484 PropertyAttributes attributes; 489 PropertyAttributes attributes;
485 return GetPropertyWithReceiver(this, key, &attributes); 490 return GetPropertyWithReceiver(this, key, &attributes);
486 } 491 }
487 492
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 #undef WRITE_INT_FIELD 2355 #undef WRITE_INT_FIELD
2351 #undef READ_SHORT_FIELD 2356 #undef READ_SHORT_FIELD
2352 #undef WRITE_SHORT_FIELD 2357 #undef WRITE_SHORT_FIELD
2353 #undef READ_BYTE_FIELD 2358 #undef READ_BYTE_FIELD
2354 #undef WRITE_BYTE_FIELD 2359 #undef WRITE_BYTE_FIELD
2355 2360
2356 2361
2357 } } // namespace v8::internal 2362 } } // namespace v8::internal
2358 2363
2359 #endif // V8_OBJECTS_INL_H_ 2364 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698