| Index: test/cctest/compiler/test-run-native-calls.cc
|
| diff --git a/test/cctest/compiler/test-run-native-calls.cc b/test/cctest/compiler/test-run-native-calls.cc
|
| index 89114097d814db0f28f71f7c18cd4577110ab60a..bfdcc0e8cacd8da74c8da76584b4b83a2d806355 100644
|
| --- a/test/cctest/compiler/test-run-native-calls.cc
|
| +++ b/test/cctest/compiler/test-run-native-calls.cc
|
| @@ -270,7 +270,7 @@ Handle<Code> CompileGraph(const char* name, CallDescriptor* desc, Graph* graph,
|
|
|
|
|
| Handle<Code> WrapWithCFunction(Handle<Code> inner, CallDescriptor* desc) {
|
| - Zone zone;
|
| + Zone zone(inner->GetIsolate()->allocator());
|
| MachineSignature* msig =
|
| const_cast<MachineSignature*>(desc->GetMachineSignature());
|
| int param_count = static_cast<int>(msig->parameter_count());
|
| @@ -437,7 +437,7 @@ class Computer {
|
| Handle<Code> inner = Handle<Code>::null();
|
| {
|
| // Build the graph for the computation.
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| Graph graph(&zone);
|
| RawMachineAssembler raw(isolate, &graph, desc);
|
| build(desc, raw);
|
| @@ -452,7 +452,7 @@ class Computer {
|
| Handle<Code> wrapper = Handle<Code>::null();
|
| {
|
| // Wrap the above code with a callable function that passes constants.
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| Graph graph(&zone);
|
| CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
|
| RawMachineAssembler raw(isolate, &graph, cdesc);
|
| @@ -484,7 +484,7 @@ class Computer {
|
| Handle<Code> wrapper = Handle<Code>::null();
|
| {
|
| // Wrap the above code with a callable function that loads from {input}.
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| Graph graph(&zone);
|
| CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
|
| RawMachineAssembler raw(isolate, &graph, cdesc);
|
| @@ -522,7 +522,7 @@ class Computer {
|
| static void TestInt32Sub(CallDescriptor* desc) {
|
| Isolate* isolate = CcTest::InitIsolateOnce();
|
| HandleScope scope(isolate);
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| GraphAndBuilders inner(&zone);
|
| {
|
| // Build the add function.
|
| @@ -563,7 +563,7 @@ static void CopyTwentyInt32(CallDescriptor* desc) {
|
| Handle<Code> inner = Handle<Code>::null();
|
| {
|
| // Writes all parameters into the output buffer.
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| Graph graph(&zone);
|
| RawMachineAssembler raw(isolate, &graph, desc);
|
| Node* base = raw.PointerConstant(output);
|
| @@ -580,7 +580,7 @@ static void CopyTwentyInt32(CallDescriptor* desc) {
|
| Handle<Code> wrapper = Handle<Code>::null();
|
| {
|
| // Loads parameters from the input buffer and calls the above code.
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| Graph graph(&zone);
|
| CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
|
| RawMachineAssembler raw(isolate, &graph, cdesc);
|
| @@ -619,7 +619,8 @@ static void CopyTwentyInt32(CallDescriptor* desc) {
|
|
|
| static void Test_RunInt32SubWithRet(int retreg) {
|
| Int32Signature sig(2);
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| RegisterPairs pairs;
|
| while (pairs.More()) {
|
| int parray[2];
|
| @@ -670,7 +671,8 @@ TEST(Run_Int32Sub_all_allocatable_single) {
|
| Int32Signature sig(2);
|
| RegisterPairs pairs;
|
| while (pairs.More()) {
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| int parray[1];
|
| int rarray[1];
|
| pairs.Next(&rarray[0], &parray[0], true);
|
| @@ -687,7 +689,8 @@ TEST(Run_CopyTwentyInt32_all_allocatable_pairs) {
|
| Int32Signature sig(20);
|
| RegisterPairs pairs;
|
| while (pairs.More()) {
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| int parray[2];
|
| int rarray[] = {
|
| RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN)
|
| @@ -739,7 +742,8 @@ static void Test_Int32_WeightedSum_of_size(int count) {
|
| Int32Signature sig(count);
|
| for (int p0 = 0; p0 < Register::kNumRegisters; p0++) {
|
| if (Register::from_code(p0).IsAllocatable()) {
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
|
|
| int parray[] = {p0};
|
| int rarray[] = {
|
| @@ -807,7 +811,8 @@ void Test_Int32_Select() {
|
| Allocator rets(rarray, 1, nullptr, 0);
|
| RegisterConfig config(params, rets);
|
|
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
|
|
| for (int i = which + 1; i <= 64; i++) {
|
| Int32Signature sig(i);
|
| @@ -849,7 +854,8 @@ TEST(Int64Select_registers) {
|
| ArgsBuffer<int64_t>::Sig sig(2);
|
|
|
| RegisterPairs pairs;
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| while (pairs.More()) {
|
| int parray[2];
|
| pairs.Next(&parray[0], &parray[1], false);
|
| @@ -876,7 +882,8 @@ TEST(Float32Select_registers) {
|
| ArgsBuffer<float32>::Sig sig(2);
|
|
|
| Float32RegisterPairs pairs;
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| while (pairs.More()) {
|
| int parray[2];
|
| pairs.Next(&parray[0], &parray[1], false);
|
| @@ -904,7 +911,8 @@ TEST(Float64Select_registers) {
|
| ArgsBuffer<float64>::Sig sig(2);
|
|
|
| Float64RegisterPairs pairs;
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| while (pairs.More()) {
|
| int parray[2];
|
| pairs.Next(&parray[0], &parray[1], false);
|
| @@ -927,7 +935,8 @@ TEST(Float32Select_stack_params_return_reg) {
|
| Allocator rets(nullptr, 0, rarray, 1);
|
| RegisterConfig config(params, rets);
|
|
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| for (int count = 1; count < 6; count++) {
|
| ArgsBuffer<float32>::Sig sig(count);
|
| CallDescriptor* desc = config.Create(&zone, &sig);
|
| @@ -949,7 +958,8 @@ TEST(Float64Select_stack_params_return_reg) {
|
| Allocator rets(nullptr, 0, rarray, 1);
|
| RegisterConfig config(params, rets);
|
|
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| for (int count = 1; count < 6; count++) {
|
| ArgsBuffer<float64>::Sig sig(count);
|
| CallDescriptor* desc = config.Create(&zone, &sig);
|
| @@ -972,7 +982,7 @@ static void Build_Select_With_Call(CallDescriptor* desc,
|
| {
|
| Isolate* isolate = CcTest::InitIsolateOnce();
|
| // Build the actual select.
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| Graph graph(&zone);
|
| RawMachineAssembler raw(isolate, &graph, desc);
|
| raw.Return(raw.Parameter(which));
|
| @@ -1002,7 +1012,8 @@ TEST(Float64StackParamsToStackParams) {
|
| Allocator params(nullptr, 0, nullptr, 0);
|
| Allocator rets(nullptr, 0, rarray, 1);
|
|
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| ArgsBuffer<float64>::Sig sig(2);
|
| RegisterConfig config(params, rets);
|
| CallDescriptor* desc = config.Create(&zone, &sig);
|
| @@ -1068,7 +1079,8 @@ void MixedParamTest(int start) {
|
| RegisterConfig config(palloc, ralloc);
|
|
|
| for (int which = 0; which < num_params; which++) {
|
| - Zone zone;
|
| + base::AccountingAllocator allocator;
|
| + Zone zone(&allocator);
|
| HandleScope scope(isolate);
|
| MachineSignature::Builder builder(&zone, 1, num_params);
|
| builder.AddReturn(params[which]);
|
| @@ -1079,7 +1091,7 @@ void MixedParamTest(int start) {
|
| Handle<Code> select;
|
| {
|
| // build the select.
|
| - Zone zone;
|
| + Zone zone(&allocator);
|
| Graph graph(&zone);
|
| RawMachineAssembler raw(isolate, &graph, desc);
|
| raw.Return(raw.Parameter(which));
|
| @@ -1096,7 +1108,7 @@ void MixedParamTest(int start) {
|
| CSignature0<int32_t> csig;
|
| {
|
| // Wrap the select code with a callable function that passes constants.
|
| - Zone zone;
|
| + Zone zone(&allocator);
|
| Graph graph(&zone);
|
| CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
|
| RawMachineAssembler raw(isolate, &graph, cdesc);
|
| @@ -1189,7 +1201,7 @@ void TestStackSlot(MachineType slot_type, T expected) {
|
| Allocator ralloc(rarray_gp, 1, rarray_fp, 1);
|
| RegisterConfig config(palloc, ralloc);
|
|
|
| - Zone zone;
|
| + Zone zone(isolate->allocator());
|
| HandleScope scope(isolate);
|
| MachineSignature::Builder builder(&zone, 1, 12);
|
| builder.AddReturn(MachineType::Int32());
|
|
|