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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1698273003: [es6] [interpreter] Add tail calls support to Ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-turbo-2
Patch Set: Decreased number of iterations to fix timeouts Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 builder.CreateClosure(shared_info, NOT_TENURED); 94 builder.CreateClosure(shared_info, NOT_TENURED);
95 95
96 // Emit literal creation operations. 96 // Emit literal creation operations.
97 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) 97 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0)
98 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) 98 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
99 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0); 99 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0);
100 100
101 // Call operations. 101 // Call operations.
102 builder.Call(reg, other, 1, 0) 102 builder.Call(reg, other, 1, 0)
103 .Call(reg, wide, 1, 0) 103 .Call(reg, wide, 1, 0)
104 .TailCall(reg, other, 1, 0)
105 .TailCall(reg, wide, 1, 0)
104 .CallRuntime(Runtime::kIsArray, reg, 1) 106 .CallRuntime(Runtime::kIsArray, reg, 1)
105 .CallRuntime(Runtime::kIsArray, wide, 1) 107 .CallRuntime(Runtime::kIsArray, wide, 1)
106 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg, 1, other) 108 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg, 1, other)
107 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, wide, 1, other) 109 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, wide, 1, other)
108 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1) 110 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1)
109 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, wide, 1); 111 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, wide, 1);
110 112
111 // Emit binary operator invocations. 113 // Emit binary operator invocations.
112 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 114 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
113 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) 115 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK)
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 iterator.Advance(); 662 iterator.Advance();
661 } 663 }
662 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 664 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
663 iterator.Advance(); 665 iterator.Advance();
664 CHECK(iterator.done()); 666 CHECK(iterator.done());
665 } 667 }
666 668
667 } // namespace interpreter 669 } // namespace interpreter
668 } // namespace internal 670 } // namespace internal
669 } // namespace v8 671 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698