From 9b18772c0b8de4b14a165d254551dbdbcfd0f1de Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 22 Aug 2019 19:31:49 +0200 Subject: [PATCH] vbscript: Rename OP_long expression to OP_int. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/vbscript/compile.c | 6 +++--- dlls/vbscript/interp.c | 2 +- dlls/vbscript/lex.c | 4 ++-- dlls/vbscript/parse.h | 2 +- dlls/vbscript/parser.y | 10 +++++----- dlls/vbscript/vbscript.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 6fe01abbf02..1f4a7d3aace 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -536,8 +536,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr) return push_instr_str(ctx, OP_string, ((string_expression_t*)expr)->value); case EXPR_SUB: return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_sub); - case EXPR_ULONG: - return push_instr_int(ctx, OP_long, ((int_expression_t*)expr)->value); + case EXPR_INT: + return push_instr_int(ctx, OP_int, ((int_expression_t*)expr)->value); case EXPR_XOR: return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_xor); default: @@ -779,7 +779,7 @@ static HRESULT compile_forto_statement(compile_ctx_t *ctx, forto_statement_t *st if(!push_instr(ctx, OP_val)) return E_OUTOFMEMORY; }else { - hres = push_instr_int(ctx, OP_long, 1); + hres = push_instr_int(ctx, OP_int, 1); if(FAILED(hres)) return hres; } diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index d9bf79ae57a..629e8335b41 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -1315,7 +1315,7 @@ static HRESULT interp_string(exec_ctx_t *ctx) return stack_push(ctx, &v); } -static HRESULT interp_long(exec_ctx_t *ctx) +static HRESULT interp_int(exec_ctx_t *ctx) { const LONG arg = ctx->instr->arg1.lng; VARIANT v; diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c index 5c7ed2552b7..c628934610b 100644 --- a/dlls/vbscript/lex.c +++ b/dlls/vbscript/lex.c @@ -335,7 +335,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret) if(use_int && (LONG)d == d) { *(LONG*)ret = d; - return tLong; + return tInt; } r = exp>=0 ? d*pow(10, exp) : d/pow(10, -exp); @@ -376,7 +376,7 @@ static int parse_hex_literal(parser_ctx_t *ctx, LONG *ret) ctx->ptr++; *ret = l; - return tLong; + return tInt; } static void skip_spaces(parser_ctx_t *ctx) diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index 39ebf3bd3e6..867d45f707a 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -32,6 +32,7 @@ typedef enum { EXPR_GTEQ, EXPR_IDIV, EXPR_IMP, + EXPR_INT, EXPR_IS, EXPR_LT, EXPR_LTEQ, @@ -49,7 +50,6 @@ typedef enum { EXPR_OR, EXPR_STRING, EXPR_SUB, - EXPR_ULONG, EXPR_XOR } expression_type_t; diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 8add9c91723..4c8c6e38eb8 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -97,7 +97,7 @@ static statement_t *link_statements(statement_t*,statement_t*); const_decl_t *const_decl; case_clausule_t *case_clausule; unsigned uint; - LONG lng; + LONG integer; BOOL boolean; double dbl; } @@ -119,7 +119,7 @@ static statement_t *link_statements(statement_t*,statement_t*); %token tNEXT tON tRESUME tGOTO %token tIdentifier tString %token tDEFAULT tERROR tEXPLICIT tPROPERTY tSTEP -%token tLong +%token tInt %token tDouble %type Statement SimpleStatement StatementNl StatementsNl StatementsNl_opt IfStatement Else_opt @@ -381,13 +381,13 @@ LiteralExpression | tNOTHING { $$ = new_expression(ctx, EXPR_NOTHING, 0); CHECK_ERROR; } NumericLiteralExpression - : '0' { $$ = new_long_expression(ctx, EXPR_ULONG, 0); CHECK_ERROR; } - | tLong { $$ = new_long_expression(ctx, EXPR_ULONG, $1); CHECK_ERROR; } + : '0' { $$ = new_long_expression(ctx, EXPR_INT, 0); CHECK_ERROR; } + | tInt { $$ = new_long_expression(ctx, EXPR_INT, $1); CHECK_ERROR; } | tDouble { $$ = new_double_expression(ctx, $1); CHECK_ERROR; } IntegerValue : '0' { $$ = 0; } - | tLong { $$ = $1; } + | tInt { $$ = $1; } PrimaryExpression : '(' Expression ')' { $$ = new_unary_expression(ctx, EXPR_BRACKETS, $2); } diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 0d8b0ede044..2d78d5a9892 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -248,11 +248,11 @@ typedef enum { X(idiv, 1, 0, 0) \ X(imp, 1, 0, 0) \ X(incc, 1, ARG_BSTR, 0) \ + X(int, 1, ARG_INT, 0) \ X(is, 1, 0, 0) \ X(jmp, 0, ARG_ADDR, 0) \ X(jmp_false, 0, ARG_ADDR, 0) \ X(jmp_true, 0, ARG_ADDR, 0) \ - X(long, 1, ARG_INT, 0) \ X(lt, 1, 0, 0) \ X(lteq, 1, 0, 0) \ X(mcall, 1, ARG_BSTR, ARG_UINT) \