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

Side by Side Diff: src/objects.h

Issue 16925008: Generate StoreGlobal stubs with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix numeric constant compares Created 7 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
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 8567 matching lines...) Expand 10 before | Expand all | Expand 10 after
8578 class PropertyCell: public Cell { 8578 class PropertyCell: public Cell {
8579 public: 8579 public:
8580 // [type]: type of the global property. 8580 // [type]: type of the global property.
8581 Type* type(); 8581 Type* type();
8582 void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 8582 void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
8583 8583
8584 // [dependent_code]: dependent code that depends on the type of the global 8584 // [dependent_code]: dependent code that depends on the type of the global
8585 // property. 8585 // property.
8586 DECL_ACCESSORS(dependent_code, DependentCode) 8586 DECL_ACCESSORS(dependent_code, DependentCode)
8587 8587
8588 // Sets the value of the cell and updates the type field to be the union
8589 // of the cell's current type and the value's type. If the change causes
8590 // a change of the type of the cell's contents, code dependent on the cell
8591 // will be deoptimized.
8592 void SetValueInferType(Object* value,
8593 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
8594
8588 // Casting. 8595 // Casting.
8589 static inline PropertyCell* cast(Object* obj); 8596 static inline PropertyCell* cast(Object* obj);
8590 8597
8591 inline Address TypeAddress() { 8598 inline Address TypeAddress() {
8592 return address() + kTypeOffset; 8599 return address() + kTypeOffset;
8593 } 8600 }
8594 8601
8595 // Dispatched behavior. 8602 // Dispatched behavior.
8596 DECLARE_PRINTER(PropertyCell) 8603 DECLARE_PRINTER(PropertyCell)
8597 DECLARE_VERIFIER(PropertyCell) 8604 DECLARE_VERIFIER(PropertyCell)
8598 8605
8599 // Layout description. 8606 // Layout description.
8600 static const int kTypeOffset = kValueOffset + kPointerSize; 8607 static const int kTypeOffset = kValueOffset + kPointerSize;
8601 static const int kDependentCodeOffset = kTypeOffset + kPointerSize; 8608 static const int kDependentCodeOffset = kTypeOffset + kPointerSize;
8602 static const int kSize = kDependentCodeOffset + kPointerSize; 8609 static const int kSize = kDependentCodeOffset + kPointerSize;
8603 8610
8604 static const int kPointerFieldsBeginOffset = kValueOffset; 8611 static const int kPointerFieldsBeginOffset = kValueOffset;
8605 static const int kPointerFieldsEndOffset = kDependentCodeOffset; 8612 static const int kPointerFieldsEndOffset = kDependentCodeOffset;
8606 8613
8607 typedef FixedBodyDescriptor<kValueOffset, 8614 typedef FixedBodyDescriptor<kValueOffset,
8608 kSize, 8615 kSize,
8609 kSize> BodyDescriptor; 8616 kSize> BodyDescriptor;
8610 8617
8611 void AddDependentCompilationInfo(CompilationInfo* info); 8618 void AddDependentCompilationInfo(CompilationInfo* info);
8612 8619
8613 void AddDependentCode(Handle<Code> code); 8620 void AddDependentCode(Handle<Code> code);
8614 8621
8622 Type* UpdateType(Object* value);
8623
8615 private: 8624 private:
8616 DECL_ACCESSORS(type_raw, Object) 8625 DECL_ACCESSORS(type_raw, Object)
8617 DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell); 8626 DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell);
8618 }; 8627 };
8619 8628
8620 8629
8621 // The JSProxy describes EcmaScript Harmony proxies 8630 // The JSProxy describes EcmaScript Harmony proxies
8622 class JSProxy: public JSReceiver { 8631 class JSProxy: public JSReceiver {
8623 public: 8632 public:
8624 // [handler]: The handler property. 8633 // [handler]: The handler property.
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
9745 } else { 9754 } else {
9746 value &= ~(1 << bit_position); 9755 value &= ~(1 << bit_position);
9747 } 9756 }
9748 return value; 9757 return value;
9749 } 9758 }
9750 }; 9759 };
9751 9760
9752 } } // namespace v8::internal 9761 } } // namespace v8::internal
9753 9762
9754 #endif // V8_OBJECTS_H_ 9763 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698