diff options
author | Myles Borins <mylesborins@google.com> | 2018-04-10 21:39:51 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-04-11 13:22:42 -0400 |
commit | 12a1b9b8049462e47181a298120243dc83e81c55 (patch) | |
tree | 8605276308c8b4e3597516961266bae1af57557a /deps/v8/src/objects/template-objects.h | |
parent | 78cd8263354705b767ef8c6a651740efe4931ba0 (diff) | |
download | node-new-12a1b9b8049462e47181a298120243dc83e81c55.tar.gz |
deps: update V8 to 6.6.346.23
PR-URL: https://github.com/nodejs/node/pull/19201
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/template-objects.h')
-rw-r--r-- | deps/v8/src/objects/template-objects.h | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/deps/v8/src/objects/template-objects.h b/deps/v8/src/objects/template-objects.h index cac29a3530..6c1a99831a 100644 --- a/deps/v8/src/objects/template-objects.h +++ b/deps/v8/src/objects/template-objects.h @@ -16,61 +16,25 @@ namespace internal { // TemplateObjectDescription is a triple of hash, raw strings and cooked // strings for tagged template literals. Used to communicate with the runtime -// for template object creation within the {Runtime_GetTemplateObject} method. -class TemplateObjectDescription final : public Tuple3 { +// for template object creation within the {Runtime_CreateTemplateObject} +// method. +class TemplateObjectDescription final : public Tuple2 { public: - DECL_INT_ACCESSORS(hash) DECL_ACCESSORS(raw_strings, FixedArray) DECL_ACCESSORS(cooked_strings, FixedArray) - bool Equals(TemplateObjectDescription const* that) const; - - static Handle<JSArray> GetTemplateObject( - Handle<TemplateObjectDescription> description, - Handle<Context> native_context); + static Handle<JSArray> CreateTemplateObject( + Handle<TemplateObjectDescription> description); DECL_CAST(TemplateObjectDescription) - static constexpr int kHashOffset = kValue1Offset; - static constexpr int kRawStringsOffset = kValue2Offset; - static constexpr int kCookedStringsOffset = kValue3Offset; + static constexpr int kRawStringsOffset = kValue1Offset; + static constexpr int kCookedStringsOffset = kValue2Offset; private: DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateObjectDescription); }; -class TemplateMapShape final : public BaseShape<TemplateObjectDescription*> { - public: - static bool IsMatch(TemplateObjectDescription* key, Object* value); - static uint32_t Hash(Isolate* isolate, TemplateObjectDescription* key); - static uint32_t HashForObject(Isolate* isolate, Object* object); - - static constexpr int kPrefixSize = 0; - static constexpr int kEntrySize = 2; -}; - -class TemplateMap final : public HashTable<TemplateMap, TemplateMapShape> { - public: - static Handle<TemplateMap> New(Isolate* isolate); - - // Tries to lookup the given {key} in the {template_map}. Returns the - // value if it's found, otherwise returns an empty MaybeHandle. - WARN_UNUSED_RESULT static MaybeHandle<JSArray> Lookup( - Handle<TemplateMap> template_map, Handle<TemplateObjectDescription> key); - - // Adds the {key} / {value} pair to the {template_map} and returns the - // new TemplateMap (we might need to re-allocate). This assumes that - // there's no entry for {key} in the {template_map} already. - static Handle<TemplateMap> Add(Handle<TemplateMap> template_map, - Handle<TemplateObjectDescription> key, - Handle<JSArray> value); - - DECL_CAST(TemplateMap) - - private: - DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateMap); -}; - } // namespace internal } // namespace v8 |