| 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/globals.h" | 7 #include "src/globals.h" |
| 8 #include "src/interpreter/bytecode-array-writer.h" | 8 #include "src/interpreter/bytecode-array-writer.h" |
| 9 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 9 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
| 10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 } | 343 } |
| 344 | 344 |
| 345 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext( | 345 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext( |
| 346 Handle<ScopeInfo> scope_info) { | 346 Handle<ScopeInfo> scope_info) { |
| 347 size_t entry = GetConstantPoolEntry(scope_info); | 347 size_t entry = GetConstantPoolEntry(scope_info); |
| 348 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); | 348 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); |
| 349 return *this; | 349 return *this; |
| 350 } | 350 } |
| 351 | 351 |
| 352 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateCatchContext( | 352 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateCatchContext( |
| 353 Register exception, Handle<String> name) { | 353 Register exception, Handle<String> name, Handle<ScopeInfo> scope_info) { |
| 354 size_t name_index = GetConstantPoolEntry(name); | 354 size_t name_index = GetConstantPoolEntry(name); |
| 355 size_t scope_info_index = GetConstantPoolEntry(scope_info); |
| 355 Output(Bytecode::kCreateCatchContext, RegisterOperand(exception), | 356 Output(Bytecode::kCreateCatchContext, RegisterOperand(exception), |
| 356 UnsignedOperand(name_index)); | 357 UnsignedOperand(name_index), UnsignedOperand(scope_info_index)); |
| 357 return *this; | 358 return *this; |
| 358 } | 359 } |
| 359 | 360 |
| 360 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { | 361 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { |
| 361 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); | 362 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); |
| 362 return *this; | 363 return *this; |
| 363 } | 364 } |
| 364 | 365 |
| 365 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(Register object) { | 366 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(Register object) { |
| 366 Output(Bytecode::kCreateWithContext, RegisterOperand(object)); | 367 Output(Bytecode::kCreateWithContext, RegisterOperand(object)); |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 return Bytecode::kTailCall; | 991 return Bytecode::kTailCall; |
| 991 default: | 992 default: |
| 992 UNREACHABLE(); | 993 UNREACHABLE(); |
| 993 } | 994 } |
| 994 return Bytecode::kIllegal; | 995 return Bytecode::kIllegal; |
| 995 } | 996 } |
| 996 | 997 |
| 997 } // namespace interpreter | 998 } // namespace interpreter |
| 998 } // namespace internal | 999 } // namespace internal |
| 999 } // namespace v8 | 1000 } // namespace v8 |
| OLD | NEW |