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/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
10 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 10 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 size_t entry = GetConstantPoolEntry(scope_info); | 343 size_t entry = GetConstantPoolEntry(scope_info); |
344 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); | 344 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); |
345 return *this; | 345 return *this; |
346 } | 346 } |
347 | 347 |
348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { | 348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { |
349 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); | 349 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); |
350 return *this; | 350 return *this; |
351 } | 351 } |
352 | 352 |
| 353 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(Register object) { |
| 354 Output(Bytecode::kCreateWithContext, RegisterOperand(object)); |
| 355 return *this; |
| 356 } |
| 357 |
353 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( | 358 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( |
354 CreateArgumentsType type) { | 359 CreateArgumentsType type) { |
355 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather | 360 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather |
356 // than having two different bytecodes once we have better support for | 361 // than having two different bytecodes once we have better support for |
357 // branches in the InterpreterAssembler. | 362 // branches in the InterpreterAssembler. |
358 Bytecode bytecode = BytecodeForCreateArguments(type); | 363 Bytecode bytecode = BytecodeForCreateArguments(type); |
359 Output(bytecode); | 364 Output(bytecode); |
360 return *this; | 365 return *this; |
361 } | 366 } |
362 | 367 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 return Bytecode::kTailCall; | 976 return Bytecode::kTailCall; |
972 default: | 977 default: |
973 UNREACHABLE(); | 978 UNREACHABLE(); |
974 } | 979 } |
975 return Bytecode::kIllegal; | 980 return Bytecode::kIllegal; |
976 } | 981 } |
977 | 982 |
978 } // namespace interpreter | 983 } // namespace interpreter |
979 } // namespace internal | 984 } // namespace internal |
980 } // namespace v8 | 985 } // namespace v8 |
OLD | NEW |