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

Side by Side Diff: src/objects.h

Issue 9844002: Implement rudimentary module linking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 8 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
« no previous file with comments | « src/interface.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // - Smi (immediate small integer) 52 // - Smi (immediate small integer)
53 // - HeapObject (superclass for everything allocated in the heap) 53 // - HeapObject (superclass for everything allocated in the heap)
54 // - JSReceiver (suitable for property access) 54 // - JSReceiver (suitable for property access)
55 // - JSObject 55 // - JSObject
56 // - JSArray 56 // - JSArray
57 // - JSSet 57 // - JSSet
58 // - JSMap 58 // - JSMap
59 // - JSWeakMap 59 // - JSWeakMap
60 // - JSRegExp 60 // - JSRegExp
61 // - JSFunction 61 // - JSFunction
62 // - JSModule
62 // - GlobalObject 63 // - GlobalObject
63 // - JSGlobalObject 64 // - JSGlobalObject
64 // - JSBuiltinsObject 65 // - JSBuiltinsObject
65 // - JSGlobalProxy 66 // - JSGlobalProxy
66 // - JSValue 67 // - JSValue
67 // - JSDate 68 // - JSDate
68 // - JSMessageObject 69 // - JSMessageObject
69 // - JSProxy 70 // - JSProxy
70 // - JSFunctionProxy 71 // - JSFunctionProxy
71 // - FixedArrayBase 72 // - FixedArrayBase
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 V(FIXED_ARRAY_TYPE) \ 300 V(FIXED_ARRAY_TYPE) \
300 V(FIXED_DOUBLE_ARRAY_TYPE) \ 301 V(FIXED_DOUBLE_ARRAY_TYPE) \
301 V(SHARED_FUNCTION_INFO_TYPE) \ 302 V(SHARED_FUNCTION_INFO_TYPE) \
302 \ 303 \
303 V(JS_MESSAGE_OBJECT_TYPE) \ 304 V(JS_MESSAGE_OBJECT_TYPE) \
304 \ 305 \
305 V(JS_VALUE_TYPE) \ 306 V(JS_VALUE_TYPE) \
306 V(JS_DATE_TYPE) \ 307 V(JS_DATE_TYPE) \
307 V(JS_OBJECT_TYPE) \ 308 V(JS_OBJECT_TYPE) \
308 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ 309 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
310 V(JS_MODULE_TYPE) \
309 V(JS_GLOBAL_OBJECT_TYPE) \ 311 V(JS_GLOBAL_OBJECT_TYPE) \
310 V(JS_BUILTINS_OBJECT_TYPE) \ 312 V(JS_BUILTINS_OBJECT_TYPE) \
311 V(JS_GLOBAL_PROXY_TYPE) \ 313 V(JS_GLOBAL_PROXY_TYPE) \
312 V(JS_ARRAY_TYPE) \ 314 V(JS_ARRAY_TYPE) \
313 V(JS_PROXY_TYPE) \ 315 V(JS_PROXY_TYPE) \
314 V(JS_WEAK_MAP_TYPE) \ 316 V(JS_WEAK_MAP_TYPE) \
315 V(JS_REGEXP_TYPE) \ 317 V(JS_REGEXP_TYPE) \
316 \ 318 \
317 V(JS_FUNCTION_TYPE) \ 319 V(JS_FUNCTION_TYPE) \
318 V(JS_FUNCTION_PROXY_TYPE) \ 320 V(JS_FUNCTION_PROXY_TYPE) \
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 // the two forms of function. This organization enables using the same 621 // the two forms of function. This organization enables using the same
620 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the 622 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the
621 // NONCALLABLE_JS_OBJECT range. 623 // NONCALLABLE_JS_OBJECT range.
622 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE 624 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE
623 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE 625 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE
624 626
625 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE 627 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE
626 JS_DATE_TYPE, 628 JS_DATE_TYPE,
627 JS_OBJECT_TYPE, 629 JS_OBJECT_TYPE,
628 JS_CONTEXT_EXTENSION_OBJECT_TYPE, 630 JS_CONTEXT_EXTENSION_OBJECT_TYPE,
631 JS_MODULE_TYPE,
629 JS_GLOBAL_OBJECT_TYPE, 632 JS_GLOBAL_OBJECT_TYPE,
630 JS_BUILTINS_OBJECT_TYPE, 633 JS_BUILTINS_OBJECT_TYPE,
631 JS_GLOBAL_PROXY_TYPE, 634 JS_GLOBAL_PROXY_TYPE,
632 JS_ARRAY_TYPE, 635 JS_ARRAY_TYPE,
633 JS_SET_TYPE, 636 JS_SET_TYPE,
634 JS_MAP_TYPE, 637 JS_MAP_TYPE,
635 JS_WEAK_MAP_TYPE, 638 JS_WEAK_MAP_TYPE,
636 639
637 JS_REGEXP_TYPE, 640 JS_REGEXP_TYPE,
638 641
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 V(ExternalIntArray) \ 799 V(ExternalIntArray) \
797 V(ExternalUnsignedIntArray) \ 800 V(ExternalUnsignedIntArray) \
798 V(ExternalFloatArray) \ 801 V(ExternalFloatArray) \
799 V(ExternalDoubleArray) \ 802 V(ExternalDoubleArray) \
800 V(ExternalPixelArray) \ 803 V(ExternalPixelArray) \
801 V(ByteArray) \ 804 V(ByteArray) \
802 V(FreeSpace) \ 805 V(FreeSpace) \
803 V(JSReceiver) \ 806 V(JSReceiver) \
804 V(JSObject) \ 807 V(JSObject) \
805 V(JSContextExtensionObject) \ 808 V(JSContextExtensionObject) \
809 V(JSModule) \
806 V(Map) \ 810 V(Map) \
807 V(DescriptorArray) \ 811 V(DescriptorArray) \
808 V(DeoptimizationInputData) \ 812 V(DeoptimizationInputData) \
809 V(DeoptimizationOutputData) \ 813 V(DeoptimizationOutputData) \
810 V(TypeFeedbackCells) \ 814 V(TypeFeedbackCells) \
811 V(FixedArray) \ 815 V(FixedArray) \
812 V(FixedDoubleArray) \ 816 V(FixedDoubleArray) \
813 V(Context) \ 817 V(Context) \
814 V(GlobalContext) \ 818 V(GlobalContext) \
819 V(ModuleContext) \
815 V(ScopeInfo) \ 820 V(ScopeInfo) \
816 V(JSFunction) \ 821 V(JSFunction) \
817 V(Code) \ 822 V(Code) \
818 V(Oddball) \ 823 V(Oddball) \
819 V(SharedFunctionInfo) \ 824 V(SharedFunctionInfo) \
820 V(JSValue) \ 825 V(JSValue) \
821 V(JSDate) \ 826 V(JSDate) \
822 V(JSMessageObject) \ 827 V(JSMessageObject) \
823 V(StringWrapper) \ 828 V(StringWrapper) \
824 V(Foreign) \ 829 V(Foreign) \
(...skipping 4859 matching lines...) Expand 10 before | Expand all | Expand 10 after
5684 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); 5689 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte);
5685 #else 5690 #else
5686 #error Unknown byte ordering 5691 #error Unknown byte ordering
5687 #endif 5692 #endif
5688 5693
5689 private: 5694 private:
5690 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); 5695 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
5691 }; 5696 };
5692 5697
5693 5698
5699 // Representation for module instance objects.
5700 class JSModule: public JSObject {
5701 public:
5702 // [context]: the context holding the module's locals, or undefined if none.
5703 DECL_ACCESSORS(context, Object)
5704
5705 // Casting.
5706 static inline JSModule* cast(Object* obj);
5707
5708 // Dispatched behavior.
5709 #ifdef OBJECT_PRINT
5710 inline void JSModulePrint() {
5711 JSModulePrint(stdout);
5712 }
5713 void JSModulePrint(FILE* out);
5714 #endif
5715 #ifdef DEBUG
5716 void JSModuleVerify();
5717 #endif
5718
5719 // Layout description.
5720 static const int kContextOffset = JSObject::kHeaderSize;
5721 static const int kSize = kContextOffset + kPointerSize;
5722
5723 private:
5724 DISALLOW_IMPLICIT_CONSTRUCTORS(JSModule);
5725 };
5726
5727
5694 // JSFunction describes JavaScript functions. 5728 // JSFunction describes JavaScript functions.
5695 class JSFunction: public JSObject { 5729 class JSFunction: public JSObject {
5696 public: 5730 public:
5697 // [prototype_or_initial_map]: 5731 // [prototype_or_initial_map]:
5698 DECL_ACCESSORS(prototype_or_initial_map, Object) 5732 DECL_ACCESSORS(prototype_or_initial_map, Object)
5699 5733
5700 // [shared]: The information about the function that 5734 // [shared]: The information about the function that
5701 // can be shared by instances. 5735 // can be shared by instances.
5702 DECL_ACCESSORS(shared, SharedFunctionInfo) 5736 DECL_ACCESSORS(shared, SharedFunctionInfo)
5703 5737
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
8595 } else { 8629 } else {
8596 value &= ~(1 << bit_position); 8630 value &= ~(1 << bit_position);
8597 } 8631 }
8598 return value; 8632 return value;
8599 } 8633 }
8600 }; 8634 };
8601 8635
8602 } } // namespace v8::internal 8636 } } // namespace v8::internal
8603 8637
8604 #endif // V8_OBJECTS_H_ 8638 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/interface.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698