Skip to content

Commit

Permalink
[torque] allow templates without body
Browse files Browse the repository at this point in the history
Change-Id: Ie61c8fa51c7c13ab74c4c97ed6803be7f879a549
Reviewed-on: https://chromium-review.googlesource.com/1069088
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53293}
  • Loading branch information
tebbi authored and Commit Bot committed May 22, 2018
1 parent 6e91806 commit 6b2c305
Show file tree
Hide file tree
Showing 9 changed files with 677 additions and 620 deletions.
5 changes: 1 addition & 4 deletions src/builtins/base.tq
Expand Up @@ -296,10 +296,7 @@ extern macro ExtractFixedArray(

extern builtin ExtractFastJSArray(Context, JSArray, Smi, Smi): JSArray;

macro LoadElementNoHole<T : type>(a: JSArray, index: Smi): Object
labels IfHole {
unreachable;
}
macro LoadElementNoHole<T : type>(a: JSArray, index: Smi): Object labels IfHole;

LoadElementNoHole<FixedArray>(a: JSArray, index: Smi): Object
labels IfHole {
Expand Down
4 changes: 2 additions & 2 deletions src/torque/Torque.g4
Expand Up @@ -275,9 +275,9 @@ typeAliasDeclaration : 'type' IDENTIFIER '=' type ';';
externalBuiltin : EXTERN JAVASCRIPT? BUILTIN IDENTIFIER optionalGenericTypeList '(' typeList ')' optionalType ';';
externalMacro : EXTERN (IMPLICIT? 'operator' STRING_LITERAL)? MACRO IDENTIFIER optionalGenericTypeList typeListMaybeVarArgs optionalType optionalLabelList ';';
externalRuntime : EXTERN RUNTIME IDENTIFIER typeListMaybeVarArgs optionalType ';';
builtinDeclaration : JAVASCRIPT? BUILTIN IDENTIFIER optionalGenericTypeList parameterList optionalType helperBody;
builtinDeclaration : JAVASCRIPT? BUILTIN IDENTIFIER optionalGenericTypeList parameterList optionalType (helperBody | ';');
genericSpecialization: IDENTIFIER genericSpecializationTypeList parameterList optionalType optionalLabelList helperBody;
macroDeclaration : MACRO IDENTIFIER optionalGenericTypeList parameterList optionalType optionalLabelList helperBody;
macroDeclaration : MACRO IDENTIFIER optionalGenericTypeList parameterList optionalType optionalLabelList (helperBody | ';');
constDeclaration : 'const' IDENTIFIER ':' type '=' STRING_LITERAL ';';

declaration
Expand Down

0 comments on commit 6b2c305

Please sign in to comment.