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

Side by Side Diff: src/objects.h

Issue 63513004: Merged r17459, r17462, r17474 into 3.22 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.22
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 7371 matching lines...) Expand 10 before | Expand all | Expand 10 after
7382 7382
7383 // This is like GetProperty, but is used when you know the lookup won't fail 7383 // This is like GetProperty, but is used when you know the lookup won't fail
7384 // by throwing an exception. This is for the debug and builtins global 7384 // by throwing an exception. This is for the debug and builtins global
7385 // objects, where it is known which properties can be expected to be present 7385 // objects, where it is known which properties can be expected to be present
7386 // on the object. 7386 // on the object.
7387 Object* GetPropertyNoExceptionThrown(Name* key) { 7387 Object* GetPropertyNoExceptionThrown(Name* key) {
7388 Object* answer = GetProperty(key)->ToObjectUnchecked(); 7388 Object* answer = GetProperty(key)->ToObjectUnchecked();
7389 return answer; 7389 return answer;
7390 } 7390 }
7391 7391
7392 // Ensure that the global object has a cell for the given property name.
7393 static Handle<PropertyCell> EnsurePropertyCell(Handle<GlobalObject> global,
7394 Handle<Name> name);
7395
7396 // Casting. 7392 // Casting.
7397 static inline GlobalObject* cast(Object* obj); 7393 static inline GlobalObject* cast(Object* obj);
7398 7394
7399 // Layout description. 7395 // Layout description.
7400 static const int kBuiltinsOffset = JSObject::kHeaderSize; 7396 static const int kBuiltinsOffset = JSObject::kHeaderSize;
7401 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize; 7397 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize;
7402 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize; 7398 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize;
7403 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; 7399 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize;
7404 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; 7400 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize;
7405 7401
7406 private: 7402 private:
7407 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject); 7403 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject);
7408 }; 7404 };
7409 7405
7410 7406
7411 // JavaScript global object. 7407 // JavaScript global object.
7412 class JSGlobalObject: public GlobalObject { 7408 class JSGlobalObject: public GlobalObject {
7413 public: 7409 public:
7414 // Casting. 7410 // Casting.
7415 static inline JSGlobalObject* cast(Object* obj); 7411 static inline JSGlobalObject* cast(Object* obj);
7416 7412
7413 // Ensure that the global object has a cell for the given property name.
7414 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global,
7415 Handle<Name> name);
7416
7417 // Dispatched behavior. 7417 // Dispatched behavior.
7418 DECLARE_PRINTER(JSGlobalObject) 7418 DECLARE_PRINTER(JSGlobalObject)
7419 DECLARE_VERIFIER(JSGlobalObject) 7419 DECLARE_VERIFIER(JSGlobalObject)
7420 7420
7421 // Layout description. 7421 // Layout description.
7422 static const int kSize = GlobalObject::kHeaderSize; 7422 static const int kSize = GlobalObject::kHeaderSize;
7423 7423
7424 private: 7424 private:
7425 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); 7425 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject);
7426 }; 7426 };
(...skipping 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after
10440 } else { 10440 } else {
10441 value &= ~(1 << bit_position); 10441 value &= ~(1 << bit_position);
10442 } 10442 }
10443 return value; 10443 return value;
10444 } 10444 }
10445 }; 10445 };
10446 10446
10447 } } // namespace v8::internal 10447 } } // namespace v8::internal
10448 10448
10449 #endif // V8_OBJECTS_H_ 10449 #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