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

Unified Diff: src/compiler/js-builtin-reducer-unittest.cc

Issue 613683002: [turbofan] Some javascript operators are globally shared singletons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/js-builtin-reducer-unittest.cc
diff --git a/src/compiler/js-builtin-reducer-unittest.cc b/src/compiler/js-builtin-reducer-unittest.cc
index 5177d8d3eb65ff60b63b6beaef28c9fd2c87503c..36a4eeae3a47850af1fbd60a6783643b81cd5153 100644
--- a/src/compiler/js-builtin-reducer-unittest.cc
+++ b/src/compiler/js-builtin-reducer-unittest.cc
@@ -69,8 +69,10 @@ TEST_F(JSBuiltinReducerTest, MathAbs) {
TRACED_FOREACH(Type*, t0, kNumberTypes) {
Node* p0 = Parameter(t0, 0);
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
- Node* call = graph()->NewNode(javascript()->Call(3, NO_CALL_FUNCTION_FLAGS),
- fun, UndefinedConstant(), p0);
+ Node* call =
+ graph()->NewNode(javascript()->CallFunction(
+ CallFunctionParameters(3, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant(), p0);
Reduction r = Reduce(call);
if (t0->Is(Type::Unsigned32())) {
@@ -102,8 +104,10 @@ TEST_F(JSBuiltinReducerTest, MathSqrt) {
TRACED_FOREACH(Type*, t0, kNumberTypes) {
Node* p0 = Parameter(t0, 0);
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
- Node* call = graph()->NewNode(javascript()->Call(3, NO_CALL_FUNCTION_FLAGS),
- fun, UndefinedConstant(), p0);
+ Node* call =
+ graph()->NewNode(javascript()->CallFunction(
+ CallFunctionParameters(3, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant(), p0);
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());
@@ -120,8 +124,10 @@ TEST_F(JSBuiltinReducerTest, MathMax0) {
Handle<JSFunction> f(isolate()->context()->math_max_fun());
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
- Node* call = graph()->NewNode(javascript()->Call(2, NO_CALL_FUNCTION_FLAGS),
- fun, UndefinedConstant());
+ Node* call =
+ graph()->NewNode(javascript()->CallFunction(
+ CallFunctionParameters(2, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant());
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());
@@ -135,8 +141,10 @@ TEST_F(JSBuiltinReducerTest, MathMax1) {
TRACED_FOREACH(Type*, t0, kNumberTypes) {
Node* p0 = Parameter(t0, 0);
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
- Node* call = graph()->NewNode(javascript()->Call(3, NO_CALL_FUNCTION_FLAGS),
- fun, UndefinedConstant(), p0);
+ Node* call =
+ graph()->NewNode(javascript()->CallFunction(
+ CallFunctionParameters(3, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant(), p0);
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());
@@ -154,8 +162,9 @@ TEST_F(JSBuiltinReducerTest, MathMax2) {
Node* p1 = Parameter(t1, 1);
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
Node* call =
- graph()->NewNode(javascript()->Call(4, NO_CALL_FUNCTION_FLAGS), fun,
- UndefinedConstant(), p0, p1);
+ graph()->NewNode(javascript()->CallFunction(CallFunctionParameters(
+ 4, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant(), p0, p1);
Reduction r = Reduce(call);
if (t0->Is(Type::Integral32()) && t1->Is(Type::Integral32())) {
@@ -190,8 +199,9 @@ TEST_F(JSBuiltinReducerTest, MathImul) {
Node* p1 = Parameter(t1, 1);
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
Node* call =
- graph()->NewNode(javascript()->Call(4, NO_CALL_FUNCTION_FLAGS), fun,
- UndefinedConstant(), p0, p1);
+ graph()->NewNode(javascript()->CallFunction(CallFunctionParameters(
+ 4, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant(), p0, p1);
Reduction r = Reduce(call);
if (t0->Is(Type::Integral32()) && t1->Is(Type::Integral32())) {
@@ -222,8 +232,10 @@ TEST_F(JSBuiltinReducerTest, MathFround) {
TRACED_FOREACH(Type*, t0, kNumberTypes) {
Node* p0 = Parameter(t0, 0);
Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
- Node* call = graph()->NewNode(javascript()->Call(3, NO_CALL_FUNCTION_FLAGS),
- fun, UndefinedConstant(), p0);
+ Node* call =
+ graph()->NewNode(javascript()->CallFunction(
+ CallFunctionParameters(3, NO_CALL_FUNCTION_FLAGS)),
+ fun, UndefinedConstant(), p0);
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());

Powered by Google App Engine
This is Rietveld 408576698