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

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 1423923003: Removed the dependency of the test RunComputedCodeObject from RawMachineAssemblerTester. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: GraphBuilderTester is used now instead of copying the code from RawMachineAssemblerTester Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698