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

Side by Side Diff: test/cctest/wasm/test-run-wasm-64.cc

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 years, 2 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 | « test/cctest/wasm/test-run-wasm.cc ('k') | test/cctest/wasm/test-run-wasm-module.cc » ('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 <stdint.h> 5 #include <stdint.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/wasm/wasm-macro-gen.h" 10 #include "src/wasm/wasm-macro-gen.h"
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 byte __buf[] = {__VA_ARGS__}; \ 1460 byte __buf[] = {__VA_ARGS__}; \
1461 for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \ 1461 for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
1462 } while (false) 1462 } while (false)
1463 1463
1464 static void CompileCallIndirectMany(LocalType param) { 1464 static void CompileCallIndirectMany(LocalType param) {
1465 // Make sure we don't run out of registers when compiling indirect calls 1465 // Make sure we don't run out of registers when compiling indirect calls
1466 // with many many parameters. 1466 // with many many parameters.
1467 TestSignatures sigs; 1467 TestSignatures sigs;
1468 for (byte num_params = 0; num_params < 40; num_params++) { 1468 for (byte num_params = 0; num_params < 40; num_params++) {
1469 v8::internal::AccountingAllocator allocator; 1469 v8::internal::AccountingAllocator allocator;
1470 Zone zone(&allocator); 1470 Zone zone(&allocator, ZONE_NAME);
1471 HandleScope scope(CcTest::InitIsolateOnce()); 1471 HandleScope scope(CcTest::InitIsolateOnce());
1472 TestingModule module(kExecuteCompiled); 1472 TestingModule module(kExecuteCompiled);
1473 FunctionSig* sig = sigs.many(&zone, kAstStmt, param, num_params); 1473 FunctionSig* sig = sigs.many(&zone, kAstStmt, param, num_params);
1474 1474
1475 module.AddSignature(sig); 1475 module.AddSignature(sig);
1476 module.AddSignature(sig); 1476 module.AddSignature(sig);
1477 module.AddIndirectFunctionTable(nullptr, 0); 1477 module.AddIndirectFunctionTable(nullptr, 0);
1478 1478
1479 WasmFunctionCompiler t(sig, &module); 1479 WasmFunctionCompiler t(sig, &module);
1480 1480
(...skipping 19 matching lines...) Expand all
1500 static MachineType mixed[] = { 1500 static MachineType mixed[] = {
1501 MachineType::Int32(), MachineType::Float32(), MachineType::Int64(), 1501 MachineType::Int32(), MachineType::Float32(), MachineType::Int64(),
1502 MachineType::Float64(), MachineType::Float32(), MachineType::Int64(), 1502 MachineType::Float64(), MachineType::Float32(), MachineType::Int64(),
1503 MachineType::Int32(), MachineType::Float64(), MachineType::Float32(), 1503 MachineType::Int32(), MachineType::Float64(), MachineType::Float32(),
1504 MachineType::Float64(), MachineType::Int32(), MachineType::Int64(), 1504 MachineType::Float64(), MachineType::Int32(), MachineType::Int64(),
1505 MachineType::Int32(), MachineType::Int32()}; 1505 MachineType::Int32(), MachineType::Int32()};
1506 1506
1507 int num_params = static_cast<int>(arraysize(mixed)) - start; 1507 int num_params = static_cast<int>(arraysize(mixed)) - start;
1508 for (int which = 0; which < num_params; which++) { 1508 for (int which = 0; which < num_params; which++) {
1509 v8::internal::AccountingAllocator allocator; 1509 v8::internal::AccountingAllocator allocator;
1510 Zone zone(&allocator); 1510 Zone zone(&allocator, ZONE_NAME);
1511 TestingModule module(execution_mode); 1511 TestingModule module(execution_mode);
1512 module.AddMemory(1024); 1512 module.AddMemory(1024);
1513 MachineType* memtypes = &mixed[start]; 1513 MachineType* memtypes = &mixed[start];
1514 MachineType result = memtypes[which]; 1514 MachineType result = memtypes[which];
1515 1515
1516 // ========================================================================= 1516 // =========================================================================
1517 // Build the selector function. 1517 // Build the selector function.
1518 // ========================================================================= 1518 // =========================================================================
1519 uint32_t index; 1519 uint32_t index;
1520 FunctionSig::Builder b(&zone, 1, num_params); 1520 FunctionSig::Builder b(&zone, 1, num_params);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 CHECK_EQ(expected, result); 1567 CHECK_EQ(expected, result);
1568 } 1568 }
1569 } 1569 }
1570 } 1570 }
1571 } 1571 }
1572 1572
1573 WASM_EXEC_TEST(MixedCall_i64_0) { Run_WasmMixedCall_N(execution_mode, 0); } 1573 WASM_EXEC_TEST(MixedCall_i64_0) { Run_WasmMixedCall_N(execution_mode, 0); }
1574 WASM_EXEC_TEST(MixedCall_i64_1) { Run_WasmMixedCall_N(execution_mode, 1); } 1574 WASM_EXEC_TEST(MixedCall_i64_1) { Run_WasmMixedCall_N(execution_mode, 1); }
1575 WASM_EXEC_TEST(MixedCall_i64_2) { Run_WasmMixedCall_N(execution_mode, 2); } 1575 WASM_EXEC_TEST(MixedCall_i64_2) { Run_WasmMixedCall_N(execution_mode, 2); }
1576 WASM_EXEC_TEST(MixedCall_i64_3) { Run_WasmMixedCall_N(execution_mode, 3); } 1576 WASM_EXEC_TEST(MixedCall_i64_3) { Run_WasmMixedCall_N(execution_mode, 3); }
OLDNEW
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698