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

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

Issue 1688283003: [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
« src/x64/code-stubs-x64.cc ('K') | « 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 factory->NewStringFromStaticChars("function_a"), MaybeHandle<Code>(), 92 factory->NewStringFromStaticChars("function_a"), MaybeHandle<Code>(),
93 false); 93 false);
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.CallIC(reg, other, 1, 0)
103 .Call(reg, wide, 1, 0) 103 .CallIC(reg, wide, 1, 0)
104 .Call(reg, other, 1)
105 .Call(reg, wide, 1)
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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 iterator.Advance(); 660 iterator.Advance();
659 } 661 }
660 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 662 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
661 iterator.Advance(); 663 iterator.Advance();
662 CHECK(iterator.done()); 664 CHECK(iterator.done());
663 } 665 }
664 666
665 } // namespace interpreter 667 } // namespace interpreter
666 } // namespace internal 668 } // namespace internal
667 } // namespace v8 669 } // namespace v8
OLDNEW
« src/x64/code-stubs-x64.cc ('K') | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698