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

Unified Diff: test/unittests/compiler/interpreter-assembler-unittest.cc

Issue 1333843002: [runtime] Move binary operator fallbacks into the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: No need for frame states in bytecode handlers. Add test case. Created 5 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: test/unittests/compiler/interpreter-assembler-unittest.cc
diff --git a/test/unittests/compiler/interpreter-assembler-unittest.cc b/test/unittests/compiler/interpreter-assembler-unittest.cc
index 9e6eff36da58dfc7311ec146b20affed628733de..1dfaf58ba0a630bc5d143f12cac73e7fbbb0f570 100644
--- a/test/unittests/compiler/interpreter-assembler-unittest.cc
+++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
@@ -328,33 +328,15 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadObjectField) {
}
-TARGET_TEST_F(InterpreterAssemblerTest, CallJSBuiltin) {
+TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime) {
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);
- Node* receiver = m.IntPtrConstant(1234);
- Node* call_js_builtin_0 =
- m.CallJSBuiltin(Context::SUB_BUILTIN_INDEX, receiver);
-
- Matcher<Node*> load_globals_matcher = m.IsLoad(
- kMachAnyTagged, IsParameter(Linkage::kInterpreterContextParameter),
- IsIntPtrConstant(Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- Matcher<Node*> load_native_context_matcher = m.IsLoad(
- kMachAnyTagged, load_globals_matcher,
- IsIntPtrConstant(GlobalObject::kNativeContextOffset - kHeapObjectTag));
- Matcher<Node*> function_matcher = m.IsLoad(
- kMachAnyTagged, load_native_context_matcher,
- IsIntPtrConstant(Context::SlotOffset(Context::SUB_BUILTIN_INDEX)));
- Matcher<Node*> context_matcher =
- m.IsLoad(kMachAnyTagged, function_matcher,
- IsIntPtrConstant(JSFunction::kContextOffset - kHeapObjectTag));
- EXPECT_THAT(call_js_builtin_0,
- m.IsCall(_, function_matcher, receiver, context_matcher));
-
- Node* arg1 = m.Int32Constant(0xabcd);
- Node* call_js_builtin_1 =
- m.CallJSBuiltin(Context::SUB_BUILTIN_INDEX, receiver, arg1);
- EXPECT_THAT(call_js_builtin_1,
- m.IsCall(_, function_matcher, receiver, arg1, context_matcher));
+ Node* arg1 = m.Int32Constant(2);
+ Node* arg2 = m.Int32Constant(3);
+ Node* call_runtime = m.CallRuntime(Runtime::kAdd, arg1, arg2);
+ EXPECT_THAT(call_runtime,
+ m.IsCall(_, _, arg1, arg2, _, IsInt32Constant(2),
+ IsParameter(Linkage::kInterpreterContextParameter)));
}
}

Powered by Google App Engine
This is Rietveld 408576698