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

Side by Side Diff: src/objects.h

Issue 99923008: Merged r17459, r17462, r17474 into 3.20 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.20
Patch Set: 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/mips/stub-cache-mips.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 // 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 7141 matching lines...) Expand 10 before | Expand all | Expand 10 after
7152 7152
7153 // This is like GetProperty, but is used when you know the lookup won't fail 7153 // This is like GetProperty, but is used when you know the lookup won't fail
7154 // by throwing an exception. This is for the debug and builtins global 7154 // by throwing an exception. This is for the debug and builtins global
7155 // objects, where it is known which properties can be expected to be present 7155 // objects, where it is known which properties can be expected to be present
7156 // on the object. 7156 // on the object.
7157 Object* GetPropertyNoExceptionThrown(Name* key) { 7157 Object* GetPropertyNoExceptionThrown(Name* key) {
7158 Object* answer = GetProperty(key)->ToObjectUnchecked(); 7158 Object* answer = GetProperty(key)->ToObjectUnchecked();
7159 return answer; 7159 return answer;
7160 } 7160 }
7161 7161
7162 // Ensure that the global object has a cell for the given property name.
7163 static Handle<PropertyCell> EnsurePropertyCell(Handle<GlobalObject> global,
7164 Handle<Name> name);
7165
7166 // Casting. 7162 // Casting.
7167 static inline GlobalObject* cast(Object* obj); 7163 static inline GlobalObject* cast(Object* obj);
7168 7164
7169 // Layout description. 7165 // Layout description.
7170 static const int kBuiltinsOffset = JSObject::kHeaderSize; 7166 static const int kBuiltinsOffset = JSObject::kHeaderSize;
7171 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize; 7167 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize;
7172 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize; 7168 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize;
7173 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; 7169 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize;
7174 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; 7170 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize;
7175 7171
7176 private: 7172 private:
7177 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject); 7173 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject);
7178 }; 7174 };
7179 7175
7180 7176
7181 // JavaScript global object. 7177 // JavaScript global object.
7182 class JSGlobalObject: public GlobalObject { 7178 class JSGlobalObject: public GlobalObject {
7183 public: 7179 public:
7184 // Casting. 7180 // Casting.
7185 static inline JSGlobalObject* cast(Object* obj); 7181 static inline JSGlobalObject* cast(Object* obj);
7186 7182
7183 // Ensure that the global object has a cell for the given property name.
7184 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global,
7185 Handle<Name> name);
7186
7187 // Dispatched behavior. 7187 // Dispatched behavior.
7188 DECLARE_PRINTER(JSGlobalObject) 7188 DECLARE_PRINTER(JSGlobalObject)
7189 DECLARE_VERIFIER(JSGlobalObject) 7189 DECLARE_VERIFIER(JSGlobalObject)
7190 7190
7191 // Layout description. 7191 // Layout description.
7192 static const int kSize = GlobalObject::kHeaderSize; 7192 static const int kSize = GlobalObject::kHeaderSize;
7193 7193
7194 private: 7194 private:
7195 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); 7195 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject);
7196 }; 7196 };
(...skipping 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after
10175 } else { 10175 } else {
10176 value &= ~(1 << bit_position); 10176 value &= ~(1 << bit_position);
10177 } 10177 }
10178 return value; 10178 return value;
10179 } 10179 }
10180 }; 10180 };
10181 10181
10182 } } // namespace v8::internal 10182 } } // namespace v8::internal
10183 10183
10184 #endif // V8_OBJECTS_H_ 10184 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698