| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 return *this; | 331 return *this; |
| 332 } | 332 } |
| 333 | 333 |
| 334 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(size_t entry, | 334 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(size_t entry, |
| 335 int flags) { | 335 int flags) { |
| 336 Output(Bytecode::kCreateClosure, UnsignedOperand(entry), | 336 Output(Bytecode::kCreateClosure, UnsignedOperand(entry), |
| 337 UnsignedOperand(flags)); | 337 UnsignedOperand(flags)); |
| 338 return *this; | 338 return *this; |
| 339 } | 339 } |
| 340 | 340 |
| 341 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext(size_t entry) { |
| 342 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); |
| 343 return *this; |
| 344 } |
| 345 |
| 341 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { | 346 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { |
| 342 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); | 347 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); |
| 343 return *this; | 348 return *this; |
| 344 } | 349 } |
| 345 | 350 |
| 346 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( | 351 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( |
| 347 CreateArgumentsType type) { | 352 CreateArgumentsType type) { |
| 348 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather | 353 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather |
| 349 // than having two different bytecodes once we have better support for | 354 // than having two different bytecodes once we have better support for |
| 350 // branches in the InterpreterAssembler. | 355 // branches in the InterpreterAssembler. |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 return Bytecode::kTailCall; | 969 return Bytecode::kTailCall; |
| 965 default: | 970 default: |
| 966 UNREACHABLE(); | 971 UNREACHABLE(); |
| 967 } | 972 } |
| 968 return Bytecode::kIllegal; | 973 return Bytecode::kIllegal; |
| 969 } | 974 } |
| 970 | 975 |
| 971 } // namespace interpreter | 976 } // namespace interpreter |
| 972 } // namespace internal | 977 } // namespace internal |
| 973 } // namespace v8 | 978 } // namespace v8 |
| OLD | NEW |