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

Side by Side Diff: src/objects.h

Issue 102563004: Zonify types in compiler frontend (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years 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/list.h ('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 // 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 class AllocationSite; 874 class AllocationSite;
875 class AllocationSiteCreationContext; 875 class AllocationSiteCreationContext;
876 class AllocationSiteUsageContext; 876 class AllocationSiteUsageContext;
877 class DictionaryElementsAccessor; 877 class DictionaryElementsAccessor;
878 class ElementsAccessor; 878 class ElementsAccessor;
879 class Failure; 879 class Failure;
880 class FixedArrayBase; 880 class FixedArrayBase;
881 class GlobalObject; 881 class GlobalObject;
882 class ObjectVisitor; 882 class ObjectVisitor;
883 class StringStream; 883 class StringStream;
884 // We cannot just say "class Type;" if it is created from a template... =8-? 884 // We cannot just say "class HeapType;" if it is created from a template... =8-?
885 template<class> class TypeImpl; 885 template<class> class TypeImpl;
886 class HeapTypeConfig; 886 class HeapTypeConfig;
887 typedef TypeImpl<HeapTypeConfig> Type; 887 typedef TypeImpl<HeapTypeConfig> HeapType;
888 888
889 889
890 // A template-ized version of the IsXXX functions. 890 // A template-ized version of the IsXXX functions.
891 template <class C> inline bool Is(Object* obj); 891 template <class C> inline bool Is(Object* obj);
892 892
893 #ifdef VERIFY_HEAP 893 #ifdef VERIFY_HEAP
894 #define DECLARE_VERIFIER(Name) void Name##Verify(); 894 #define DECLARE_VERIFIER(Name) void Name##Verify();
895 #else 895 #else
896 #define DECLARE_VERIFIER(Name) 896 #define DECLARE_VERIFIER(Name)
897 #endif 897 #endif
(...skipping 8474 matching lines...) Expand 10 before | Expand all | Expand 10 after
9372 kSize> BodyDescriptor; 9372 kSize> BodyDescriptor;
9373 9373
9374 private: 9374 private:
9375 DISALLOW_IMPLICIT_CONSTRUCTORS(Cell); 9375 DISALLOW_IMPLICIT_CONSTRUCTORS(Cell);
9376 }; 9376 };
9377 9377
9378 9378
9379 class PropertyCell: public Cell { 9379 class PropertyCell: public Cell {
9380 public: 9380 public:
9381 // [type]: type of the global property. 9381 // [type]: type of the global property.
9382 Type* type(); 9382 HeapType* type();
9383 void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 9383 void set_type(HeapType* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
9384 9384
9385 // [dependent_code]: dependent code that depends on the type of the global 9385 // [dependent_code]: dependent code that depends on the type of the global
9386 // property. 9386 // property.
9387 DECL_ACCESSORS(dependent_code, DependentCode) 9387 DECL_ACCESSORS(dependent_code, DependentCode)
9388 9388
9389 // Sets the value of the cell and updates the type field to be the union 9389 // Sets the value of the cell and updates the type field to be the union
9390 // of the cell's current type and the value's type. If the change causes 9390 // of the cell's current type and the value's type. If the change causes
9391 // a change of the type of the cell's contents, code dependent on the cell 9391 // a change of the type of the cell's contents, code dependent on the cell
9392 // will be deoptimized. 9392 // will be deoptimized.
9393 static void SetValueInferType(Handle<PropertyCell> cell, 9393 static void SetValueInferType(Handle<PropertyCell> cell,
9394 Handle<Object> value); 9394 Handle<Object> value);
9395 9395
9396 // Computes the new type of the cell's contents for the given value, but 9396 // Computes the new type of the cell's contents for the given value, but
9397 // without actually modifying the 'type' field. 9397 // without actually modifying the 'type' field.
9398 static Handle<Type> UpdatedType(Handle<PropertyCell> cell, 9398 static Handle<HeapType> UpdatedType(Handle<PropertyCell> cell,
9399 Handle<Object> value); 9399 Handle<Object> value);
9400 9400
9401 void AddDependentCompilationInfo(CompilationInfo* info); 9401 void AddDependentCompilationInfo(CompilationInfo* info);
9402 9402
9403 void AddDependentCode(Handle<Code> code); 9403 void AddDependentCode(Handle<Code> code);
9404 9404
9405 // Casting. 9405 // Casting.
9406 static inline PropertyCell* cast(Object* obj); 9406 static inline PropertyCell* cast(Object* obj);
9407 9407
9408 inline Address TypeAddress() { 9408 inline Address TypeAddress() {
9409 return address() + kTypeOffset; 9409 return address() + kTypeOffset;
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
10623 } else { 10623 } else {
10624 value &= ~(1 << bit_position); 10624 value &= ~(1 << bit_position);
10625 } 10625 }
10626 return value; 10626 return value;
10627 } 10627 }
10628 }; 10628 };
10629 10629
10630 } } // namespace v8::internal 10630 } } // namespace v8::internal
10631 10631
10632 #endif // V8_OBJECTS_H_ 10632 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/list.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698