OLD | NEW |
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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/interpreter-assembler.h" | 8 #include "src/compiler/interpreter-assembler.h" |
9 #include "src/factory.h" | 9 #include "src/factory.h" |
10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #undef GENERATE_CODE | 46 #undef GENERATE_CODE |
47 } | 47 } |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 // LdaZero | 51 // LdaZero |
52 // | 52 // |
53 // Load literal '0' into the accumulator. | 53 // Load literal '0' into the accumulator. |
54 void Interpreter::DoLdaZero(compiler::InterpreterAssembler* assembler) { | 54 void Interpreter::DoLdaZero(compiler::InterpreterAssembler* assembler) { |
55 // TODO(rmcilroy) Implement. | 55 // TODO(rmcilroy) Implement. |
| 56 __ Dispatch(); |
56 } | 57 } |
57 | 58 |
58 | 59 |
59 // LdaSmi8 <imm8> | 60 // LdaSmi8 <imm8> |
60 // | 61 // |
61 // Load an 8-bit integer literal into the accumulator as a Smi. | 62 // Load an 8-bit integer literal into the accumulator as a Smi. |
62 void Interpreter::DoLdaSmi8(compiler::InterpreterAssembler* assembler) { | 63 void Interpreter::DoLdaSmi8(compiler::InterpreterAssembler* assembler) { |
63 // TODO(rmcilroy) Implement 8-bit integer to SMI promotion. | 64 // TODO(rmcilroy) Implement 8-bit integer to SMI promotion. |
| 65 __ Dispatch(); |
64 } | 66 } |
65 | 67 |
66 | 68 |
67 // LdaUndefined | 69 // LdaUndefined |
68 // | 70 // |
69 // Load Undefined into the accumulator. | 71 // Load Undefined into the accumulator. |
70 void Interpreter::DoLdaUndefined(compiler::InterpreterAssembler* assembler) { | 72 void Interpreter::DoLdaUndefined(compiler::InterpreterAssembler* assembler) { |
71 // TODO(rmcilroy) Implement. | 73 // TODO(rmcilroy) Implement. |
| 74 __ Dispatch(); |
72 } | 75 } |
73 | 76 |
74 | 77 |
75 // LdaNull | 78 // LdaNull |
76 // | 79 // |
77 // Load Null into the accumulator. | 80 // Load Null into the accumulator. |
78 void Interpreter::DoLdaNull(compiler::InterpreterAssembler* assembler) { | 81 void Interpreter::DoLdaNull(compiler::InterpreterAssembler* assembler) { |
79 // TODO(rmcilroy) Implement. | 82 // TODO(rmcilroy) Implement. |
| 83 __ Dispatch(); |
80 } | 84 } |
81 | 85 |
82 | 86 |
83 // LdaTheHole | 87 // LdaTheHole |
84 // | 88 // |
85 // Load TheHole into the accumulator. | 89 // Load TheHole into the accumulator. |
86 void Interpreter::DoLdaTheHole(compiler::InterpreterAssembler* assembler) { | 90 void Interpreter::DoLdaTheHole(compiler::InterpreterAssembler* assembler) { |
87 // TODO(rmcilroy) Implement. | 91 // TODO(rmcilroy) Implement. |
| 92 __ Dispatch(); |
88 } | 93 } |
89 | 94 |
90 | 95 |
91 // LdaTrue | 96 // LdaTrue |
92 // | 97 // |
93 // Load True into the accumulator. | 98 // Load True into the accumulator. |
94 void Interpreter::DoLdaTrue(compiler::InterpreterAssembler* assembler) { | 99 void Interpreter::DoLdaTrue(compiler::InterpreterAssembler* assembler) { |
95 // TODO(rmcilroy) Implement. | 100 // TODO(rmcilroy) Implement. |
| 101 __ Dispatch(); |
96 } | 102 } |
97 | 103 |
98 | 104 |
99 // LdaFalse | 105 // LdaFalse |
100 // | 106 // |
101 // Load False into the accumulator. | 107 // Load False into the accumulator. |
102 void Interpreter::DoLdaFalse(compiler::InterpreterAssembler* assembler) { | 108 void Interpreter::DoLdaFalse(compiler::InterpreterAssembler* assembler) { |
103 // TODO(rmcilroy) Implement. | 109 // TODO(rmcilroy) Implement. |
| 110 __ Dispatch(); |
104 } | 111 } |
105 | 112 |
106 | 113 |
107 // Ldar <src> | 114 // Ldar <src> |
108 // | 115 // |
109 // Load accumulator with value from register <src>. | 116 // Load accumulator with value from register <src>. |
110 void Interpreter::DoLdar(compiler::InterpreterAssembler* assembler) { | 117 void Interpreter::DoLdar(compiler::InterpreterAssembler* assembler) { |
111 // TODO(rmcilroy) Implement. | 118 // TODO(rmcilroy) Implement. |
| 119 __ Dispatch(); |
112 } | 120 } |
113 | 121 |
114 | 122 |
115 // Star <dst> | 123 // Star <dst> |
116 // | 124 // |
117 // Store accumulator to register <dst>. | 125 // Store accumulator to register <dst>. |
118 void Interpreter::DoStar(compiler::InterpreterAssembler* assembler) { | 126 void Interpreter::DoStar(compiler::InterpreterAssembler* assembler) { |
119 // TODO(rmcilroy) Implement. | 127 // TODO(rmcilroy) Implement. |
| 128 __ Dispatch(); |
120 } | 129 } |
121 | 130 |
122 | 131 |
123 // Add <src> | 132 // Add <src> |
124 // | 133 // |
125 // Add register <src> to accumulator. | 134 // Add register <src> to accumulator. |
126 void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) { | 135 void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) { |
127 // TODO(rmcilroy) Implement. | 136 // TODO(rmcilroy) Implement. |
| 137 __ Dispatch(); |
128 } | 138 } |
129 | 139 |
130 | 140 |
131 // Sub <src> | 141 // Sub <src> |
132 // | 142 // |
133 // Subtract register <src> from accumulator. | 143 // Subtract register <src> from accumulator. |
134 void Interpreter::DoSub(compiler::InterpreterAssembler* assembler) { | 144 void Interpreter::DoSub(compiler::InterpreterAssembler* assembler) { |
135 // TODO(rmcilroy) Implement. | 145 // TODO(rmcilroy) Implement. |
| 146 __ Dispatch(); |
136 } | 147 } |
137 | 148 |
138 | 149 |
139 // Mul <src> | 150 // Mul <src> |
140 // | 151 // |
141 // Multiply accumulator by register <src>. | 152 // Multiply accumulator by register <src>. |
142 void Interpreter::DoMul(compiler::InterpreterAssembler* assembler) { | 153 void Interpreter::DoMul(compiler::InterpreterAssembler* assembler) { |
143 // TODO(rmcilroy) Implement add register to accumulator. | 154 // TODO(rmcilroy) Implement add register to accumulator. |
| 155 __ Dispatch(); |
144 } | 156 } |
145 | 157 |
146 | 158 |
147 // Div <src> | 159 // Div <src> |
148 // | 160 // |
149 // Divide register <src> by accumulator. | 161 // Divide register <src> by accumulator. |
150 void Interpreter::DoDiv(compiler::InterpreterAssembler* assembler) { | 162 void Interpreter::DoDiv(compiler::InterpreterAssembler* assembler) { |
151 // TODO(rmcilroy) Implement. | 163 // TODO(rmcilroy) Implement. |
| 164 __ Dispatch(); |
152 } | 165 } |
153 | 166 |
154 | 167 |
155 // Return | 168 // Return |
156 // | 169 // |
157 // Return the value in register 0. | 170 // Return the value in register 0. |
158 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 171 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
159 __ Return(); | 172 __ Return(); |
160 } | 173 } |
161 | 174 |
162 | 175 |
163 } // namespace interpreter | 176 } // namespace interpreter |
164 } // namespace internal | 177 } // namespace internal |
165 } // namespace v8 | 178 } // namespace v8 |
OLD | NEW |