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

Side by Side Diff: src/objects.h

Issue 376233002: Introduce a PrototypeIterator class and use it for prototype access (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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/isolate.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 Isolate* isolate, 1507 Isolate* isolate,
1508 Handle<Object> object, 1508 Handle<Object> object,
1509 uint32_t index); 1509 uint32_t index);
1510 1510
1511 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithReceiver( 1511 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithReceiver(
1512 Isolate* isolate, 1512 Isolate* isolate,
1513 Handle<Object> object, 1513 Handle<Object> object,
1514 Handle<Object> receiver, 1514 Handle<Object> receiver,
1515 uint32_t index); 1515 uint32_t index);
1516 1516
1517 // Return the object's prototype (might be Heap::null_value()).
1518 Object* GetPrototype(Isolate* isolate);
1519 static Handle<Object> GetPrototype(Isolate* isolate, Handle<Object> object);
1520
1521 // Returns the permanent hash code associated with this object. May return 1517 // Returns the permanent hash code associated with this object. May return
1522 // undefined if not yet created. 1518 // undefined if not yet created.
1523 Object* GetHash(); 1519 Object* GetHash();
1524 1520
1525 // Returns the permanent hash code associated with this object depending on 1521 // Returns the permanent hash code associated with this object depending on
1526 // the actual object type. May create and store a hash code if needed and none 1522 // the actual object type. May create and store a hash code if needed and none
1527 // exists. 1523 // exists.
1528 static Handle<Smi> GetOrCreateHash(Isolate* isolate, Handle<Object> object); 1524 static Handle<Smi> GetOrCreateHash(Isolate* isolate, Handle<Object> object);
1529 1525
1530 // Checks whether this object has the same value as the given one. This 1526 // Checks whether this object has the same value as the given one. This
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1563
1568 #ifdef OBJECT_PRINT 1564 #ifdef OBJECT_PRINT
1569 // For our gdb macros, we should perhaps change these in the future. 1565 // For our gdb macros, we should perhaps change these in the future.
1570 void Print(); 1566 void Print();
1571 1567
1572 // Prints this object with details. 1568 // Prints this object with details.
1573 void Print(OStream& os); // NOLINT 1569 void Print(OStream& os); // NOLINT
1574 #endif 1570 #endif
1575 1571
1576 private: 1572 private:
1573 friend class PrototypeIterator;
1574
1575 // Return the map of the root of object's prototype chain.
1576 Map* GetRootMap(Isolate* isolate);
1577
1577 DISALLOW_IMPLICIT_CONSTRUCTORS(Object); 1578 DISALLOW_IMPLICIT_CONSTRUCTORS(Object);
1578 }; 1579 };
1579 1580
1580 1581
1581 struct Brief { 1582 struct Brief {
1582 explicit Brief(const Object* const v) : value(v) {} 1583 explicit Brief(const Object* const v) : value(v) {}
1583 const Object* value; 1584 const Object* value;
1584 }; 1585 };
1585 1586
1586 1587
(...skipping 9644 matching lines...) Expand 10 before | Expand all | Expand 10 after
11231 } else { 11232 } else {
11232 value &= ~(1 << bit_position); 11233 value &= ~(1 << bit_position);
11233 } 11234 }
11234 return value; 11235 return value;
11235 } 11236 }
11236 }; 11237 };
11237 11238
11238 } } // namespace v8::internal 11239 } } // namespace v8::internal
11239 11240
11240 #endif // V8_OBJECTS_H_ 11241 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698