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

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

Issue 1259193004: [Interpreter] Consistency fixes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove redundant argument to Bytecodes::Decode(). 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/objects-inl.h ('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 "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 9
10 using namespace v8::internal; 10 using namespace v8::internal;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 #define CHECK_BYTECODE_PRESENT(Name, ...) \ 61 #define CHECK_BYTECODE_PRESENT(Name, ...) \
62 /* Check Bytecode is marked in scorecard */ \ 62 /* Check Bytecode is marked in scorecard */ \
63 CHECK_GE(scorecard[Bytecodes::ToByte(Bytecode::k##Name)], 1); 63 CHECK_GE(scorecard[Bytecodes::ToByte(Bytecode::k##Name)], 1);
64 BYTECODE_LIST(CHECK_BYTECODE_PRESENT) 64 BYTECODE_LIST(CHECK_BYTECODE_PRESENT)
65 #undef CHECK_BYTECODE_PRESENT 65 #undef CHECK_BYTECODE_PRESENT
66 } 66 }
67 67
68 68
69 TEST(FrameSizesLookGood) { 69 TEST(FrameSizesLookGood) {
70 for (int locals = 1; locals < 5; locals++) { 70 for (int locals = 0; locals < 5; locals++) {
71 for (int temps = 0; temps < 3; temps++) { 71 for (int temps = 0; temps < 3; temps++) {
72 InitializedHandleScope handle_scope; 72 InitializedHandleScope handle_scope;
73 BytecodeArrayBuilder builder(handle_scope.main_isolate()); 73 BytecodeArrayBuilder builder(handle_scope.main_isolate());
74 builder.set_locals_count(locals); 74 builder.set_locals_count(locals);
75 builder.Return(); 75 builder.Return();
76 76
77 TemporaryRegisterScope temporaries(&builder); 77 TemporaryRegisterScope temporaries(&builder);
78 for (int i = 0; i < temps; i++) { 78 for (int i = 0; i < temps; i++) {
79 temporaries.NewRegister(); 79 temporaries.NewRegister();
80 } 80 }
(...skipping 22 matching lines...) Expand all
103 } 103 }
104 104
105 int second; 105 int second;
106 { 106 {
107 TemporaryRegisterScope temporaries(&builder); 107 TemporaryRegisterScope temporaries(&builder);
108 second = temporaries.NewRegister(); 108 second = temporaries.NewRegister();
109 } 109 }
110 110
111 CHECK_EQ(first, second); 111 CHECK_EQ(first, second);
112 } 112 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698