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

Side by Side Diff: src/objects.h

Issue 7391001: Implement sealing, freezing, and related functions for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Oops, forgot to rebase branch. Created 9 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 6475 matching lines...) Expand 10 before | Expand all | Expand 10 after
6486 6486
6487 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( 6487 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler(
6488 String* name, 6488 String* name,
6489 DeleteMode mode); 6489 DeleteMode mode);
6490 6490
6491 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( 6491 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler(
6492 JSReceiver* receiver, 6492 JSReceiver* receiver,
6493 String* name, 6493 String* name,
6494 bool* has_exception); 6494 bool* has_exception);
6495 6495
6496 // Turn this into an (empty) JSObject.
6497 void Fix();
6498
6496 // Dispatched behavior. 6499 // Dispatched behavior.
6497 #ifdef OBJECT_PRINT 6500 #ifdef OBJECT_PRINT
6498 inline void JSProxyPrint() { 6501 inline void JSProxyPrint() {
6499 JSProxyPrint(stdout); 6502 JSProxyPrint(stdout);
6500 } 6503 }
6501 void JSProxyPrint(FILE* out); 6504 void JSProxyPrint(FILE* out);
6502 #endif 6505 #endif
6503 #ifdef DEBUG 6506 #ifdef DEBUG
6504 void JSProxyVerify(); 6507 void JSProxyVerify();
6505 #endif 6508 #endif
6506 6509
6507 // Layout description. 6510 // Layout description. We add padding so that a proxy has the same
6511 // size as a virgin JSObject. This is essential for becoming a JSObject
6512 // upon freeze.
6508 static const int kHandlerOffset = HeapObject::kHeaderSize; 6513 static const int kHandlerOffset = HeapObject::kHeaderSize;
6509 static const int kSize = kHandlerOffset + kPointerSize; 6514 static const int kPaddingOffset = kHandlerOffset + kPointerSize;
6515 static const int kSize = kPaddingOffset + kPointerSize;
6516
6517 STATIC_CHECK(kSize == JSObject::kHeaderSize);
6510 6518
6511 typedef FixedBodyDescriptor<kHandlerOffset, 6519 typedef FixedBodyDescriptor<kHandlerOffset,
6512 kHandlerOffset + kPointerSize, 6520 kHandlerOffset + kPointerSize,
6513 kSize> BodyDescriptor; 6521 kSize> BodyDescriptor;
6514 6522
6515 private: 6523 private:
6516 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); 6524 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy);
6517 }; 6525 };
6518 6526
6519 6527
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
7164 } else { 7172 } else {
7165 value &= ~(1 << bit_position); 7173 value &= ~(1 << bit_position);
7166 } 7174 }
7167 return value; 7175 return value;
7168 } 7176 }
7169 }; 7177 };
7170 7178
7171 } } // namespace v8::internal 7179 } } // namespace v8::internal
7172 7180
7173 #endif // V8_OBJECTS_H_ 7181 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698