Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: test/cctest/test-asm-validator.cc

Issue 1749233002: Convert float64 to float32 when coerced with a heapf32 assignment. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-expression-visitor.h" 8 #include "src/ast/ast-expression-visitor.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser.h" 10 #include "src/parsing/parser.h"
(...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 } 2341 }
2342 // return { testFunc1: test1, testFunc2: test2 }; 2342 // return { testFunc1: test1, testFunc2: test2 };
2343 CHECK_EXPR(ObjectLiteral, Bounds::Unbounded()) { 2343 CHECK_EXPR(ObjectLiteral, Bounds::Unbounded()) {
2344 CHECK_VAR(test1, FUNC_I_TYPE); 2344 CHECK_VAR(test1, FUNC_I_TYPE);
2345 CHECK_VAR(test2, FUNC_D_TYPE); 2345 CHECK_VAR(test2, FUNC_D_TYPE);
2346 } 2346 }
2347 } 2347 }
2348 } 2348 }
2349 CHECK_TYPES_END 2349 CHECK_TYPES_END
2350 } 2350 }
2351
2352 TEST(StoreFloatFromDouble) {
2353 CHECK_FUNC_TYPES_BEGIN(
2354 "function bar() { f32[0] = 0.0; }\n"
2355 "function foo() { bar(); }") {
2356 CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
2357 CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) {
2358 CHECK_EXPR(Property, Bounds::Unbounded()) {
2359 CHECK_VAR(f32, Bounds(cache.kFloat32Array));
2360 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
2361 }
2362 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble));
2363 }
2364 }
2365 CHECK_SKIP();
2366 }
2367 CHECK_FUNC_TYPES_END
2368 }
OLDNEW
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698