Index: test/cctest/compiler/test-run-machops.cc |
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc |
index c7dbfb85a9866452b9302ba5063ec4f5c0fd6c2e..cdad21b2a2f704d9a4b183ba1c4378ce9cdef36f 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -1,6 +1,6 @@ |
-// Copyright 2014 the V8 project authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
+// Copyright 2014 the V8 project authors. All rights reserved. Use of this |
+// source code is governed by a BSD-style license that can be found in the |
+// LICENSE file. |
#include <cmath> |
#include <functional> |
@@ -11,6 +11,7 @@ |
#include "src/codegen.h" |
#include "test/cctest/cctest.h" |
#include "test/cctest/compiler/codegen-tester.h" |
+#include "test/cctest/compiler/graph-builder-tester.h" |
#include "test/cctest/compiler/value-helper.h" |
using namespace v8::base; |
@@ -5506,13 +5507,15 @@ TEST(RunBitcastInt32ToFloat32) { |
TEST(RunComputedCodeObject) { |
- RawMachineAssemblerTester<int32_t> a; |
+ GraphBuilderTester<int32_t> a; |
a.Return(a.Int32Constant(33)); |
- CHECK_EQ(33, a.Call()); |
+ a.End(); |
+ Handle<Code> code_a = a.GetCode(); |
- RawMachineAssemblerTester<int32_t> b; |
+ GraphBuilderTester<int32_t> b; |
b.Return(b.Int32Constant(44)); |
- CHECK_EQ(44, b.Call()); |
+ b.End(); |
+ Handle<Code> code_b = b.GetCode(); |
RawMachineAssemblerTester<int32_t> r(kMachInt32); |
RawMachineAssembler::Label tlabel; |
@@ -5520,10 +5523,10 @@ TEST(RunComputedCodeObject) { |
RawMachineAssembler::Label merge; |
r.Branch(r.Parameter(0), &tlabel, &flabel); |
r.Bind(&tlabel); |
- Node* fa = r.HeapConstant(a.GetCode()); |
+ Node* fa = r.HeapConstant(code_a); |
r.Goto(&merge); |
r.Bind(&flabel); |
- Node* fb = r.HeapConstant(b.GetCode()); |
+ Node* fb = r.HeapConstant(code_b); |
r.Goto(&merge); |
r.Bind(&merge); |
Node* phi = r.Phi(kMachInt32, fa, fb); |