Improve performance (#337)

* Optmize String.protype.split function.
  when separator comes to RegExpObject split function, we have to call @@split function when there is a @@split function.
  old one is correct implementation but performance is bad...
  but we already have optmized split function with RegExp in builtinStringSplit.
  I make to use old one when if user didn't defined own @@split function.
  RegExp test score is changed from 57 to 280 in my computer.

* Make Value::isCallable inline-able.
* Make to use shared data among {Get,Set}GlobalVariable. this may reduce usage & improve performance

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
Patrick Kim 2019-07-30 18:07:13 +09:00 committed by Hyukwoo Park
commit 876fd29b34
20 changed files with 184 additions and 133 deletions

View file

@ -26,7 +26,6 @@ const char* errorMessage_NotImplemented = "Not implemented";
const char* errorMessage_IsNotDefined = "%s is not defined";
const char* errorMessage_IsNotInitialized = "Cannot access '%s' before initialization";
const char* errorMessage_DuplicatedIdentifier = "Identifier '%s' has already been declared";
const char* errorMessage_TooManyGlobalLexicalVariables = "There are too many global lexical variables in script";
const char* errorMessage_AssignmentToConstantVariable = "Assignment to constant variable '%s'";
const char* errorMessage_DefineProperty_Default = "Cannot define property '%s'";
const char* errorMessage_DefineProperty_LengthNotWritable = "Cannot modify property '%s': 'length' is not writable";