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

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

Issue 2216023003: [interpreter] Add register output to ObjectLiteral (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 4 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
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 <vector> 5 #include <vector>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/interpreter/bytecode-decoder.h" 9 #include "src/interpreter/bytecode-decoder.h"
10 #include "test/unittests/interpreter/bytecode-utils.h" 10 #include "test/unittests/interpreter/bytecode-utils.h"
(...skipping 28 matching lines...) Expand all
39 {{B(Wide), B(Star), R16(136)}, 4, 0, " Star.Wide r136"}, 39 {{B(Wide), B(Star), R16(136)}, 4, 0, " Star.Wide r136"},
40 {{B(Wide), B(Call), R16(134), R16(135), U16(2), U16(177)}, 40 {{B(Wide), B(Call), R16(134), R16(135), U16(2), U16(177)},
41 10, 41 10,
42 0, 42 0,
43 "Call.Wide r134, r135, #2, [177]"}, 43 "Call.Wide r134, r135, #2, [177]"},
44 {{B(Ldar), 44 {{B(Ldar),
45 static_cast<uint8_t>(Register::FromParameterIndex(2, 3).ToOperand())}, 45 static_cast<uint8_t>(Register::FromParameterIndex(2, 3).ToOperand())},
46 2, 46 2,
47 3, 47 3,
48 " Ldar a1"}, 48 " Ldar a1"},
49 {{B(Wide), B(CreateObjectLiteral), U16(513), U16(1027), U8(165)}, 49 {{B(Wide), B(CreateObjectLiteral), U16(513), U16(1027), U8(165),
50 7, 50 R16(137)},
51 9,
51 0, 52 0,
52 "CreateObjectLiteral.Wide [513], [1027], #165"}, 53 "CreateObjectLiteral.Wide [513], [1027], #165, r137"},
53 {{B(ExtraWide), B(JumpIfNull), U32(123456789)}, 54 {{B(ExtraWide), B(JumpIfNull), U32(123456789)},
54 6, 55 6,
55 0, 56 0,
56 "JumpIfNull.ExtraWide [123456789]"}, 57 "JumpIfNull.ExtraWide [123456789]"},
57 }; 58 };
58 59
59 for (size_t i = 0; i < arraysize(cases); ++i) { 60 for (size_t i = 0; i < arraysize(cases); ++i) {
60 // Generate reference string by prepending formatted bytes. 61 // Generate reference string by prepending formatted bytes.
61 std::stringstream expected_ss; 62 std::stringstream expected_ss;
62 std::ios default_format(nullptr); 63 std::ios default_format(nullptr);
(...skipping 14 matching lines...) Expand all
77 cases[i].parameter_count); 78 cases[i].parameter_count);
78 79
79 // Compare. 80 // Compare.
80 CHECK_EQ(actual_ss.str(), expected_ss.str()); 81 CHECK_EQ(actual_ss.str(), expected_ss.str());
81 } 82 }
82 } 83 }
83 84
84 } // namespace interpreter 85 } // namespace interpreter
85 } // namespace internal 86 } // namespace internal
86 } // namespace v8 87 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/interpreter/bytecode-array-builder-unittest.cc ('k') | test/unittests/interpreter/bytecodes-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698