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

Side by Side Diff: src/objects.h

Issue 66723020: Merged r17459, r17462, r17474 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: 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/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 7183 matching lines...) Expand 10 before | Expand all | Expand 10 after
7194 7194
7195 // This is like GetProperty, but is used when you know the lookup won't fail 7195 // This is like GetProperty, but is used when you know the lookup won't fail
7196 // by throwing an exception. This is for the debug and builtins global 7196 // by throwing an exception. This is for the debug and builtins global
7197 // objects, where it is known which properties can be expected to be present 7197 // objects, where it is known which properties can be expected to be present
7198 // on the object. 7198 // on the object.
7199 Object* GetPropertyNoExceptionThrown(Name* key) { 7199 Object* GetPropertyNoExceptionThrown(Name* key) {
7200 Object* answer = GetProperty(key)->ToObjectUnchecked(); 7200 Object* answer = GetProperty(key)->ToObjectUnchecked();
7201 return answer; 7201 return answer;
7202 } 7202 }
7203 7203
7204 // Ensure that the global object has a cell for the given property name.
7205 static Handle<PropertyCell> EnsurePropertyCell(Handle<GlobalObject> global,
7206 Handle<Name> name);
7207
7208 // Casting. 7204 // Casting.
7209 static inline GlobalObject* cast(Object* obj); 7205 static inline GlobalObject* cast(Object* obj);
7210 7206
7211 // Layout description. 7207 // Layout description.
7212 static const int kBuiltinsOffset = JSObject::kHeaderSize; 7208 static const int kBuiltinsOffset = JSObject::kHeaderSize;
7213 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize; 7209 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize;
7214 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize; 7210 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize;
7215 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; 7211 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize;
7216 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; 7212 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize;
7217 7213
7218 private: 7214 private:
7219 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject); 7215 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject);
7220 }; 7216 };
7221 7217
7222 7218
7223 // JavaScript global object. 7219 // JavaScript global object.
7224 class JSGlobalObject: public GlobalObject { 7220 class JSGlobalObject: public GlobalObject {
7225 public: 7221 public:
7226 // Casting. 7222 // Casting.
7227 static inline JSGlobalObject* cast(Object* obj); 7223 static inline JSGlobalObject* cast(Object* obj);
7228 7224
7225 // Ensure that the global object has a cell for the given property name.
7226 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global,
7227 Handle<Name> name);
7228
7229 // Dispatched behavior. 7229 // Dispatched behavior.
7230 DECLARE_PRINTER(JSGlobalObject) 7230 DECLARE_PRINTER(JSGlobalObject)
7231 DECLARE_VERIFIER(JSGlobalObject) 7231 DECLARE_VERIFIER(JSGlobalObject)
7232 7232
7233 // Layout description. 7233 // Layout description.
7234 static const int kSize = GlobalObject::kHeaderSize; 7234 static const int kSize = GlobalObject::kHeaderSize;
7235 7235
7236 private: 7236 private:
7237 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); 7237 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject);
7238 }; 7238 };
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after
10243 } else { 10243 } else {
10244 value &= ~(1 << bit_position); 10244 value &= ~(1 << bit_position);
10245 } 10245 }
10246 return value; 10246 return value;
10247 } 10247 }
10248 }; 10248 };
10249 10249
10250 } } // namespace v8::internal 10250 } } // namespace v8::internal
10251 10251
10252 #endif // V8_OBJECTS_H_ 10252 #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