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

Side by Side Diff: src/objects.h

Issue 2625093005: [modules] Define @@toStringTag on namespace object as a field. (Closed)
Patch Set: Created 3 years, 11 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-inl.h » ('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 7954 matching lines...) Expand 10 before | Expand all | Expand 10 after
7965 DECLARE_VERIFIER(JSModuleNamespace) 7965 DECLARE_VERIFIER(JSModuleNamespace)
7966 7966
7967 // The actual module whose namespace is being represented. 7967 // The actual module whose namespace is being represented.
7968 DECL_ACCESSORS(module, Module) 7968 DECL_ACCESSORS(module, Module)
7969 7969
7970 // Retrieve the value exported by [module] under the given [name]. If there is 7970 // Retrieve the value exported by [module] under the given [name]. If there is
7971 // no such export, return Just(undefined). If the export is uninitialized, 7971 // no such export, return Just(undefined). If the export is uninitialized,
7972 // schedule an exception and return Nothing. 7972 // schedule an exception and return Nothing.
7973 MUST_USE_RESULT MaybeHandle<Object> GetExport(Handle<String> name); 7973 MUST_USE_RESULT MaybeHandle<Object> GetExport(Handle<String> name);
7974 7974
7975 // In-object fields.
7976 enum {
7977 kToStringTagFieldIndex,
7978 kInObjectFieldCount,
7979 };
7980
7975 static const int kModuleOffset = JSObject::kHeaderSize; 7981 static const int kModuleOffset = JSObject::kHeaderSize;
7976 static const int kSize = kModuleOffset + kPointerSize; 7982 static const int kHeaderSize = kModuleOffset + kPointerSize;
7983
7984 static const int kSize = kHeaderSize + kPointerSize * kInObjectFieldCount;
7977 7985
7978 private: 7986 private:
7979 DISALLOW_IMPLICIT_CONSTRUCTORS(JSModuleNamespace); 7987 DISALLOW_IMPLICIT_CONSTRUCTORS(JSModuleNamespace);
7980 }; 7988 };
7981 7989
7982 // A Module object is a mapping from export names to cells 7990 // A Module object is a mapping from export names to cells
7983 // This is still very much in flux. 7991 // This is still very much in flux.
7984 class Module : public Struct { 7992 class Module : public Struct {
7985 public: 7993 public:
7986 DECLARE_CAST(Module) 7994 DECLARE_CAST(Module)
(...skipping 3747 matching lines...) Expand 10 before | Expand all | Expand 10 after
11734 } 11742 }
11735 }; 11743 };
11736 11744
11737 11745
11738 } // NOLINT, false-positive due to second-order macros. 11746 } // NOLINT, false-positive due to second-order macros.
11739 } // NOLINT, false-positive due to second-order macros. 11747 } // NOLINT, false-positive due to second-order macros.
11740 11748
11741 #include "src/objects/object-macros-undef.h" 11749 #include "src/objects/object-macros-undef.h"
11742 11750
11743 #endif // V8_OBJECTS_H_ 11751 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698