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

Side by Side Diff: src/objects.h

Issue 48923002: Provide private symbols through internal APIs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Mo comments Created 7 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
« no previous file with comments | « src/messages.js ('k') | src/objects-debug.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 // 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 V(CONS_INTERNALIZED_STRING_TYPE) \ 352 V(CONS_INTERNALIZED_STRING_TYPE) \
353 V(CONS_ASCII_INTERNALIZED_STRING_TYPE) \ 353 V(CONS_ASCII_INTERNALIZED_STRING_TYPE) \
354 V(EXTERNAL_INTERNALIZED_STRING_TYPE) \ 354 V(EXTERNAL_INTERNALIZED_STRING_TYPE) \
355 V(EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \ 355 V(EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \
356 V(EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \ 356 V(EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \
357 V(SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE) \ 357 V(SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE) \
358 V(SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \ 358 V(SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \
359 V(SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \ 359 V(SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \
360 \ 360 \
361 V(SYMBOL_TYPE) \ 361 V(SYMBOL_TYPE) \
362 \
362 V(MAP_TYPE) \ 363 V(MAP_TYPE) \
363 V(CODE_TYPE) \ 364 V(CODE_TYPE) \
364 V(ODDBALL_TYPE) \ 365 V(ODDBALL_TYPE) \
365 V(CELL_TYPE) \ 366 V(CELL_TYPE) \
366 V(PROPERTY_CELL_TYPE) \ 367 V(PROPERTY_CELL_TYPE) \
367 \ 368 \
368 V(HEAP_NUMBER_TYPE) \ 369 V(HEAP_NUMBER_TYPE) \
369 V(FOREIGN_TYPE) \ 370 V(FOREIGN_TYPE) \
370 V(BYTE_ARRAY_TYPE) \ 371 V(BYTE_ARRAY_TYPE) \
371 V(FREE_SPACE_TYPE) \ 372 V(FREE_SPACE_TYPE) \
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 | kNotInternalizedTag, 685 | kNotInternalizedTag,
685 SHORT_EXTERNAL_STRING_TYPE = 686 SHORT_EXTERNAL_STRING_TYPE =
686 SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE | kNotInternalizedTag, 687 SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
687 SHORT_EXTERNAL_ASCII_STRING_TYPE = 688 SHORT_EXTERNAL_ASCII_STRING_TYPE =
688 SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE | kNotInternalizedTag, 689 SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
689 SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE = 690 SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE =
690 SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE 691 SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE
691 | kNotInternalizedTag, 692 | kNotInternalizedTag,
692 693
693 // Non-string names 694 // Non-string names
694 SYMBOL_TYPE = kNotStringTag, // LAST_NAME_TYPE, FIRST_NONSTRING_TYPE 695 SYMBOL_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE, LAST_NAME_TYPE
695 696
696 // Objects allocated in their own spaces (never in new space). 697 // Objects allocated in their own spaces (never in new space).
697 MAP_TYPE, 698 MAP_TYPE,
698 CODE_TYPE, 699 CODE_TYPE,
699 ODDBALL_TYPE, 700 ODDBALL_TYPE,
700 CELL_TYPE, 701 CELL_TYPE,
701 PROPERTY_CELL_TYPE, 702 PROPERTY_CELL_TYPE,
702 703
703 // "Data", objects that cannot contain non-map-word pointers to heap 704 // "Data", objects that cannot contain non-map-word pointers to heap
704 // objects. 705 // objects.
(...skipping 7624 matching lines...) Expand 10 before | Expand all | Expand 10 after
8329 DISALLOW_IMPLICIT_CONSTRUCTORS(Name); 8330 DISALLOW_IMPLICIT_CONSTRUCTORS(Name);
8330 }; 8331 };
8331 8332
8332 8333
8333 // ES6 symbols. 8334 // ES6 symbols.
8334 class Symbol: public Name { 8335 class Symbol: public Name {
8335 public: 8336 public:
8336 // [name]: the print name of a symbol, or undefined if none. 8337 // [name]: the print name of a symbol, or undefined if none.
8337 DECL_ACCESSORS(name, Object) 8338 DECL_ACCESSORS(name, Object)
8338 8339
8340 DECL_ACCESSORS(flags, Smi)
8341
8342 // [is_private]: whether this is a private symbol.
8343 DECL_BOOLEAN_ACCESSORS(is_private)
8344
8339 // Casting. 8345 // Casting.
8340 static inline Symbol* cast(Object* obj); 8346 static inline Symbol* cast(Object* obj);
8341 8347
8342 // Dispatched behavior. 8348 // Dispatched behavior.
8343 DECLARE_PRINTER(Symbol) 8349 DECLARE_PRINTER(Symbol)
8344 DECLARE_VERIFIER(Symbol) 8350 DECLARE_VERIFIER(Symbol)
8345 8351
8346 // Layout description. 8352 // Layout description.
8347 static const int kNameOffset = Name::kSize; 8353 static const int kNameOffset = Name::kSize;
8348 static const int kSize = kNameOffset + kPointerSize; 8354 static const int kFlagsOffset = kNameOffset + kPointerSize;
8355 static const int kSize = kFlagsOffset + kPointerSize;
8349 8356
8350 typedef FixedBodyDescriptor<kNameOffset, kNameOffset + kPointerSize, kSize> 8357 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor;
8351 BodyDescriptor;
8352 8358
8353 private: 8359 private:
8360 static const int kPrivateBit = 0;
8361
8354 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); 8362 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol);
8355 }; 8363 };
8356 8364
8357 8365
8358 class ConsString; 8366 class ConsString;
8359 8367
8360 // The String abstract class captures JavaScript string values: 8368 // The String abstract class captures JavaScript string values:
8361 // 8369 //
8362 // Ecma-262: 8370 // Ecma-262:
8363 // 4.3.16 String Value 8371 // 4.3.16 String Value
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after
10437 } else { 10445 } else {
10438 value &= ~(1 << bit_position); 10446 value &= ~(1 << bit_position);
10439 } 10447 }
10440 return value; 10448 return value;
10441 } 10449 }
10442 }; 10450 };
10443 10451
10444 } } // namespace v8::internal 10452 } } // namespace v8::internal
10445 10453
10446 #endif // V8_OBJECTS_H_ 10454 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698