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

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

Issue 1731253003: Revert of [Interpreter] Implements calls through CallICStub in the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 factory->NewStringFromStaticChars("function_a"), MaybeHandle<Code>(), 87 factory->NewStringFromStaticChars("function_a"), MaybeHandle<Code>(),
88 false); 88 false);
89 builder.CreateClosure(shared_info, NOT_TENURED); 89 builder.CreateClosure(shared_info, NOT_TENURED);
90 90
91 // Emit literal creation operations. 91 // Emit literal creation operations.
92 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) 92 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0)
93 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) 93 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
94 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0); 94 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0);
95 95
96 // Call operations. 96 // Call operations.
97 builder.Call(reg, other, 1) 97 builder.Call(reg, other, 1, 0)
98 .Call(reg, wide, 1) 98 .Call(reg, wide, 1, 0)
99 .TailCall(reg, other, 1) 99 .TailCall(reg, other, 1, 0)
100 .TailCall(reg, wide, 1) 100 .TailCall(reg, wide, 1, 0)
101 .CallIC(reg, other, 1, 0, TailCallMode::kDisallow)
102 .CallIC(reg, other, 1, 0, TailCallMode::kAllow)
103 .CallIC(reg, wide, 1, 0, TailCallMode::kDisallow)
104 .CallIC(reg, wide, 1, 0, TailCallMode::kAllow)
105 .CallRuntime(Runtime::kIsArray, reg, 1) 101 .CallRuntime(Runtime::kIsArray, reg, 1)
106 .CallRuntime(Runtime::kIsArray, wide, 1) 102 .CallRuntime(Runtime::kIsArray, wide, 1)
107 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg, 1, other) 103 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg, 1, other)
108 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, wide, 1, other) 104 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, wide, 1, other)
109 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1) 105 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1)
110 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, wide, 1); 106 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, wide, 1);
111 107
112 // Emit binary operator invocations. 108 // Emit binary operator invocations.
113 builder.BinaryOperation(Token::Value::ADD, reg) 109 builder.BinaryOperation(Token::Value::ADD, reg)
114 .BinaryOperation(Token::Value::SUB, reg) 110 .BinaryOperation(Token::Value::SUB, reg)
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 iterator.Advance(); 646 iterator.Advance();
651 } 647 }
652 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 648 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
653 iterator.Advance(); 649 iterator.Advance();
654 CHECK(iterator.done()); 650 CHECK(iterator.done());
655 } 651 }
656 652
657 } // namespace interpreter 653 } // namespace interpreter
658 } // namespace internal 654 } // namespace internal
659 } // namespace v8 655 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698