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

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

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Merge branch 'master' into zonefolder Created 4 years, 3 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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 do { \ 1457 do { \
1458 byte __buf[] = {__VA_ARGS__}; \ 1458 byte __buf[] = {__VA_ARGS__}; \
1459 for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \ 1459 for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
1460 } while (false) 1460 } while (false)
1461 1461
1462 static void CompileCallIndirectMany(LocalType param) { 1462 static void CompileCallIndirectMany(LocalType param) {
1463 // Make sure we don't run out of registers when compiling indirect calls 1463 // Make sure we don't run out of registers when compiling indirect calls
1464 // with many many parameters. 1464 // with many many parameters.
1465 TestSignatures sigs; 1465 TestSignatures sigs;
1466 for (byte num_params = 0; num_params < 40; num_params++) { 1466 for (byte num_params = 0; num_params < 40; num_params++) {
1467 v8::base::AccountingAllocator allocator; 1467 v8::internal::AccountingAllocator allocator;
1468 Zone zone(&allocator); 1468 Zone zone(&allocator);
1469 HandleScope scope(CcTest::InitIsolateOnce()); 1469 HandleScope scope(CcTest::InitIsolateOnce());
1470 TestingModule module(kExecuteCompiled); 1470 TestingModule module(kExecuteCompiled);
1471 FunctionSig* sig = sigs.many(&zone, kAstStmt, param, num_params); 1471 FunctionSig* sig = sigs.many(&zone, kAstStmt, param, num_params);
1472 1472
1473 module.AddSignature(sig); 1473 module.AddSignature(sig);
1474 module.AddSignature(sig); 1474 module.AddSignature(sig);
1475 module.AddIndirectFunctionTable(nullptr, 0); 1475 module.AddIndirectFunctionTable(nullptr, 0);
1476 1476
1477 WasmFunctionCompiler t(sig, &module); 1477 WasmFunctionCompiler t(sig, &module);
(...skipping 19 matching lines...) Expand all
1497 1497
1498 static MachineType mixed[] = { 1498 static MachineType mixed[] = {
1499 MachineType::Int32(), MachineType::Float32(), MachineType::Int64(), 1499 MachineType::Int32(), MachineType::Float32(), MachineType::Int64(),
1500 MachineType::Float64(), MachineType::Float32(), MachineType::Int64(), 1500 MachineType::Float64(), MachineType::Float32(), MachineType::Int64(),
1501 MachineType::Int32(), MachineType::Float64(), MachineType::Float32(), 1501 MachineType::Int32(), MachineType::Float64(), MachineType::Float32(),
1502 MachineType::Float64(), MachineType::Int32(), MachineType::Int64(), 1502 MachineType::Float64(), MachineType::Int32(), MachineType::Int64(),
1503 MachineType::Int32(), MachineType::Int32()}; 1503 MachineType::Int32(), MachineType::Int32()};
1504 1504
1505 int num_params = static_cast<int>(arraysize(mixed)) - start; 1505 int num_params = static_cast<int>(arraysize(mixed)) - start;
1506 for (int which = 0; which < num_params; which++) { 1506 for (int which = 0; which < num_params; which++) {
1507 v8::base::AccountingAllocator allocator; 1507 v8::internal::AccountingAllocator allocator;
1508 Zone zone(&allocator); 1508 Zone zone(&allocator);
1509 TestingModule module(execution_mode); 1509 TestingModule module(execution_mode);
1510 module.AddMemory(1024); 1510 module.AddMemory(1024);
1511 MachineType* memtypes = &mixed[start]; 1511 MachineType* memtypes = &mixed[start];
1512 MachineType result = memtypes[which]; 1512 MachineType result = memtypes[which];
1513 1513
1514 // ========================================================================= 1514 // =========================================================================
1515 // Build the selector function. 1515 // Build the selector function.
1516 // ========================================================================= 1516 // =========================================================================
1517 uint32_t index; 1517 uint32_t index;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 CHECK_EQ(expected, result); 1566 CHECK_EQ(expected, result);
1567 } 1567 }
1568 } 1568 }
1569 } 1569 }
1570 } 1570 }
1571 1571
1572 WASM_EXEC_TEST(MixedCall_i64_0) { Run_WasmMixedCall_N(execution_mode, 0); } 1572 WASM_EXEC_TEST(MixedCall_i64_0) { Run_WasmMixedCall_N(execution_mode, 0); }
1573 WASM_EXEC_TEST(MixedCall_i64_1) { Run_WasmMixedCall_N(execution_mode, 1); } 1573 WASM_EXEC_TEST(MixedCall_i64_1) { Run_WasmMixedCall_N(execution_mode, 1); }
1574 WASM_EXEC_TEST(MixedCall_i64_2) { Run_WasmMixedCall_N(execution_mode, 2); } 1574 WASM_EXEC_TEST(MixedCall_i64_2) { Run_WasmMixedCall_N(execution_mode, 2); }
1575 WASM_EXEC_TEST(MixedCall_i64_3) { Run_WasmMixedCall_N(execution_mode, 3); } 1575 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