Implement DataView(ES6) object, and fix bugs on TypedArray object

- bug fixes
  * Change types of some errors from TypeError to RangeError
  * Get rid of divide-by-zero case
  * Fix unsigned-signed comparison code

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
This commit is contained in:
Saebom Kim 2017-04-21 15:51:10 +09:00
commit d9e72cf760
9 changed files with 490 additions and 71 deletions

View file

@ -76,6 +76,7 @@ const char* errorMessage_GlobalObject_NotExistNewInArrayBufferConstructor = "%s:
const char* errorMessage_GlobalObject_NotExistNewInTypedArrayConstructor = "%s: Constructor TypedArray requires \'new\'";
const char* errorMessage_GlobalObject_NotExistNewInDataViewConstructor = "%s: Constructor DataView requires \'new\'";
const char* errorMessage_GlobalObject_InvalidArrayLength = "Invalid array length";
const char* errorMessage_GlobalObject_DetachedBuffer = "%s: Detached buffer cannot be used here";
const char* errorMessage_String_InvalidStringLength = "Invalid string length";
void ErrorObject::throwBuiltinError(ExecutionState& state, Code code, String* objectName, bool prototoype, String* functionName, const char* templateString)