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

Side by Side Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1289863003: [interpreter]: Changes to interpreter builtins for accumulator and register file registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix_interpreter_initialization
Patch Set: Rename incoming_accumulator Created 5 years, 4 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 | « src/x64/macro-assembler-x64.h ('k') | test/unittests/compiler/interpreter-assembler-unittest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/execution.h" 7 #include "src/execution.h"
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/interpreter.h" 10 #include "src/interpreter/interpreter.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 using namespace v8::internal; 66 using namespace v8::internal;
67 using namespace v8::internal::interpreter; 67 using namespace v8::internal::interpreter;
68 68
69 TEST(TestInterpreterReturn) { 69 TEST(TestInterpreterReturn) {
70 InitializedHandleScope handles; 70 InitializedHandleScope handles;
71 Handle<Object> undefined_value = 71 Handle<Object> undefined_value =
72 handles.main_isolate()->factory()->undefined_value(); 72 handles.main_isolate()->factory()->undefined_value();
73 73
74 BytecodeArrayBuilder builder(handles.main_isolate()); 74 BytecodeArrayBuilder builder(handles.main_isolate());
75 // TODO(rmcilroy) set to 0 once BytecodeArray update to allow zero size 75 builder.set_locals_count(0);
76 // register file.
77 builder.set_locals_count(1);
78 builder.Return(); 76 builder.Return();
79 Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(); 77 Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
80 78
81 InterpreterTester tester(handles.main_isolate(), bytecode_array); 79 InterpreterTester tester(handles.main_isolate(), bytecode_array);
82 InterpreterCallable callable(tester.GetCallable()); 80 InterpreterCallable callable(tester.GetCallable());
83 Handle<Object> return_val = callable().ToHandleChecked(); 81 Handle<Object> return_val = callable().ToHandleChecked();
84 CHECK(return_val.is_identical_to(undefined_value)); 82 CHECK(return_val.is_identical_to(undefined_value));
85 } 83 }
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/unittests/compiler/interpreter-assembler-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698