Ignore:
Timestamp:
Dec 21, 2019, 4:43:04 PM (5 years ago)
Author:
Darin Adler
Message:

Make JSString values from literals in a single consistent style
https://bugs.webkit.org/show_bug.cgi?id=205517

Reviewed by Saam Barati.

Some call sites did it like this:

jsNontrivialString(vm, "literal"_s)

Others did it one of these:

jsString(vm, "literal")
jsNontrivialString(vm, "literal")

Changed all the call sites to do it the first, *slightly* more efficient, way.

  • runtime/ArrayIteratorPrototype.cpp:

(JSC::ArrayIteratorPrototype::finishCreation):

  • runtime/AsyncFunctionPrototype.cpp:

(JSC::AsyncFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorFunctionPrototype.cpp:

(JSC::AsyncGeneratorFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorPrototype.cpp:

(JSC::AsyncGeneratorPrototype::finishCreation):

  • runtime/BigIntPrototype.cpp:

(JSC::BigIntPrototype::finishCreation):

  • runtime/GeneratorFunctionPrototype.cpp:

(JSC::GeneratorFunctionPrototype::finishCreation):

  • runtime/GeneratorPrototype.cpp:

(JSC::GeneratorPrototype::finishCreation):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototype::finishCreation):

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):

  • runtime/IntlPluralRulesPrototype.cpp:

(JSC::IntlPluralRulesPrototype::finishCreation):

  • runtime/JSDataViewPrototype.cpp:

(JSC::JSDataViewPrototype::finishCreation):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):

  • runtime/JSONObject.cpp:

(JSC::JSONObject::finishCreation):

  • runtime/JSPromisePrototype.cpp:

(JSC::JSPromisePrototype::finishCreation):

  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::typedArrayViewProtoGetterFuncToStringTag):

  • runtime/MapIteratorPrototype.cpp:

(JSC::MapIteratorPrototype::finishCreation):

  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::finishCreation):

  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoGetterSource):

  • runtime/RegExpStringIteratorPrototype.cpp:

(JSC::RegExpStringIteratorPrototype::finishCreation):

  • runtime/SetIteratorPrototype.cpp:

(JSC::SetIteratorPrototype::finishCreation):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):

  • runtime/StringIteratorPrototype.cpp:

(JSC::StringIteratorPrototype::finishCreation):

  • runtime/SymbolPrototype.cpp:

(JSC::SymbolPrototype::finishCreation):

  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):

  • runtime/WeakObjectRefPrototype.cpp:

(JSC::WeakObjectRefPrototype::finishCreation):

  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):
Call jsNontrivialString instead of jsString and use the _s suffix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp

    r253240 r253865  
    7171    }
    7272
    73     putDirect(vm, vm.propertyNames->toStringTagSymbol, jsString(vm, "Module"), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     73    putDirect(vm, vm.propertyNames->toStringTagSymbol, jsNontrivialString(vm, "Module"_s), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    7474
    7575    // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-getprototypeof
Note: See TracChangeset for help on using the changeset viewer.