| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 330 } |
| 331 | 331 |
| 332 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( | 332 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( |
| 333 Handle<SharedFunctionInfo> shared_info, int flags) { | 333 Handle<SharedFunctionInfo> shared_info, int flags) { |
| 334 size_t entry = GetConstantPoolEntry(shared_info); | 334 size_t entry = GetConstantPoolEntry(shared_info); |
| 335 Output(Bytecode::kCreateClosure, UnsignedOperand(entry), | 335 Output(Bytecode::kCreateClosure, UnsignedOperand(entry), |
| 336 UnsignedOperand(flags)); | 336 UnsignedOperand(flags)); |
| 337 return *this; | 337 return *this; |
| 338 } | 338 } |
| 339 | 339 |
| 340 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { |
| 341 Output(Bytecode::kCreateFunctionContext, SignedOperand(slots)); |
| 342 return *this; |
| 343 } |
| 344 |
| 340 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( | 345 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( |
| 341 CreateArgumentsType type) { | 346 CreateArgumentsType type) { |
| 342 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather | 347 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather |
| 343 // than having two different bytecodes once we have better support for | 348 // than having two different bytecodes once we have better support for |
| 344 // branches in the InterpreterAssembler. | 349 // branches in the InterpreterAssembler. |
| 345 Bytecode bytecode = BytecodeForCreateArguments(type); | 350 Bytecode bytecode = BytecodeForCreateArguments(type); |
| 346 Output(bytecode); | 351 Output(bytecode); |
| 347 return *this; | 352 return *this; |
| 348 } | 353 } |
| 349 | 354 |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 return Bytecode::kTailCall; | 961 return Bytecode::kTailCall; |
| 957 default: | 962 default: |
| 958 UNREACHABLE(); | 963 UNREACHABLE(); |
| 959 } | 964 } |
| 960 return Bytecode::kIllegal; | 965 return Bytecode::kIllegal; |
| 961 } | 966 } |
| 962 | 967 |
| 963 } // namespace interpreter | 968 } // namespace interpreter |
| 964 } // namespace internal | 969 } // namespace internal |
| 965 } // namespace v8 | 970 } // namespace v8 |
| OLD | NEW |