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

Side by Side Diff: src/objects.h

Issue 2347933002: [modules] Introduce v8::Module to the API and return it from CompileModule (Closed)
Patch Set: Less maybe Created 4 years, 3 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
« no previous file with comments | « src/factory.cc ('k') | src/objects-debug.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 7853 matching lines...) Expand 10 before | Expand all | Expand 10 after
7864 }; 7864 };
7865 7865
7866 // A Module object is a mapping from export names to cells 7866 // A Module object is a mapping from export names to cells
7867 // This is still very much in flux. 7867 // This is still very much in flux.
7868 class Module : public Struct { 7868 class Module : public Struct {
7869 public: 7869 public:
7870 DECLARE_CAST(Module) 7870 DECLARE_CAST(Module)
7871 DECLARE_VERIFIER(Module) 7871 DECLARE_VERIFIER(Module)
7872 DECLARE_PRINTER(Module) 7872 DECLARE_PRINTER(Module)
7873 7873
7874 // The code representing this Module, either a
7875 // SharedFunctionInfo or a JSFunction depending
7876 // on whether it's been instantiated.
7877 DECL_ACCESSORS(code, Object)
7878
7874 DECL_ACCESSORS(exports, ObjectHashTable) 7879 DECL_ACCESSORS(exports, ObjectHashTable)
7875 7880
7876 static void CreateExport(Handle<Module> module, Handle<String> name); 7881 static void CreateExport(Handle<Module> module, Handle<String> name);
7877 static void StoreExport(Handle<Module> module, Handle<String> name, 7882 static void StoreExport(Handle<Module> module, Handle<String> name,
7878 Handle<Object> value); 7883 Handle<Object> value);
7879 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); 7884 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name);
7880 7885
7881 static const int kExportsOffset = HeapObject::kHeaderSize; 7886 static const int kCodeOffset = HeapObject::kHeaderSize;
7887 static const int kExportsOffset = kCodeOffset + kPointerSize;
7882 static const int kSize = kExportsOffset + kPointerSize; 7888 static const int kSize = kExportsOffset + kPointerSize;
7883 7889
7884 private: 7890 private:
7885 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); 7891 DISALLOW_IMPLICIT_CONSTRUCTORS(Module);
7886 }; 7892 };
7887 7893
7888 // JSBoundFunction describes a bound function exotic object. 7894 // JSBoundFunction describes a bound function exotic object.
7889 class JSBoundFunction : public JSObject { 7895 class JSBoundFunction : public JSObject {
7890 public: 7896 public:
7891 // [bound_target_function]: The wrapped function object. 7897 // [bound_target_function]: The wrapped function object.
(...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after
11296 } 11302 }
11297 return value; 11303 return value;
11298 } 11304 }
11299 }; 11305 };
11300 11306
11301 11307
11302 } // NOLINT, false-positive due to second-order macros. 11308 } // NOLINT, false-positive due to second-order macros.
11303 } // NOLINT, false-positive due to second-order macros. 11309 } // NOLINT, false-positive due to second-order macros.
11304 11310
11305 #endif // V8_OBJECTS_H_ 11311 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698