-
Notifications
You must be signed in to change notification settings - Fork 684
[ES2015 profile]add TypedArray intrinsic object #1507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
LaszloLango
merged 1 commit into
jerryscript-project:master
from
jiangzidong:typedarray1220
Jan 13, 2017
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
jerry-core/ecma/builtin-objects/ecma-builtin-int8array-prototype.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* Copyright JS Foundation and other contributors, http://js.foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #include "ecma-builtins.h" | ||
|
|
||
| #ifndef CONFIG_DISABLE_TYPEDARRAY_BUILTIN | ||
|
|
||
| #define ECMA_BUILTINS_INTERNAL | ||
| #include "ecma-builtins-internal.h" | ||
|
|
||
| #define BUILTIN_INC_HEADER_NAME "ecma-builtin-int8array-prototype.inc.h" | ||
| #define BUILTIN_UNDERSCORED_ID int8array_prototype | ||
| #include "ecma-builtin-internal-routines-template.inc.h" | ||
|
|
||
| /** \addtogroup ecma ECMA | ||
| * @{ | ||
| * | ||
| * \addtogroup ecmabuiltins | ||
| * @{ | ||
| * | ||
| * \addtogroup int8array prototype ECMA Int8Array.prototype object built-in | ||
| * @{ | ||
| */ | ||
|
|
||
| /** | ||
| * @} | ||
| * @} | ||
| * @} | ||
| */ | ||
|
|
||
| #endif /* !CONFIG_DISABLE_TYPEDARRAY_BUILTIN */ |
60 changes: 60 additions & 0 deletions
60
jerry-core/ecma/builtin-objects/ecma-builtin-int8array-prototype.inc.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /* Copyright JS Foundation and other contributors, http://js.foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /* | ||
| * Int8Array prototype description | ||
| */ | ||
|
|
||
| #ifndef OBJECT_ID | ||
| # define OBJECT_ID(builtin_object_id) | ||
| #endif /* !OBJECT_ID */ | ||
|
|
||
| #ifndef NUMBER_VALUE | ||
| # define NUMBER_VALUE(name, number_value, prop_attributes) | ||
| #endif /* !NUMBER_VALUE */ | ||
|
|
||
| #ifndef STRING_VALUE | ||
| # define STRING_VALUE(name, magic_string_id, prop_attributes) | ||
| #endif /* !STRING_VALUE */ | ||
|
|
||
| #ifndef OBJECT_VALUE | ||
| # define OBJECT_VALUE(name, obj_builtin_id, prop_attributes) | ||
| #endif /* !OBJECT_VALUE */ | ||
|
|
||
| #ifndef ROUTINE | ||
| # define ROUTINE(name, c_function_name, args_number, length_prop_value) | ||
| #endif /* !ROUTINE */ | ||
|
|
||
| /* Object identifier */ | ||
| OBJECT_ID (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE) | ||
|
|
||
| /* ES2015 22.2.3.4 */ | ||
| OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR, | ||
| ECMA_BUILTIN_ID_INT8ARRAY, | ||
| ECMA_PROPERTY_CONFIGURABLE_WRITABLE) | ||
|
|
||
| /* ES2015 22.2.6.1 */ | ||
| NUMBER_VALUE (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U, | ||
| 1, | ||
| ECMA_PROPERTY_FIXED) | ||
|
|
||
| #undef OBJECT_ID | ||
| #undef SIMPLE_VALUE | ||
| #undef NUMBER_VALUE | ||
| #undef STRING_VALUE | ||
| #undef OBJECT_VALUE | ||
| #undef ROUTINE | ||
| #undef ACCESSOR_READ_WRITE | ||
| #undef ACCESSOR_READ_ONLY |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we add breaks to unreachable cases as well.