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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/interpreter-assembler.h" | 9 #include "src/compiler/interpreter-assembler.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 Node* shared = __ GetAccumulator(); | 880 Node* shared = __ GetAccumulator(); |
881 Node* tenured_raw = __ BytecodeOperandImm8(0); | 881 Node* tenured_raw = __ BytecodeOperandImm8(0); |
882 Node* tenured = __ SmiTag(tenured_raw); | 882 Node* tenured = __ SmiTag(tenured_raw); |
883 Node* result = | 883 Node* result = |
884 __ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured); | 884 __ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured); |
885 __ SetAccumulator(result); | 885 __ SetAccumulator(result); |
886 __ Dispatch(); | 886 __ Dispatch(); |
887 } | 887 } |
888 | 888 |
889 | 889 |
| 890 // Throw |
| 891 // |
| 892 // Throws the exception in the accumulator. |
| 893 void Interpreter::DoThrow(compiler::InterpreterAssembler* assembler) { |
| 894 Node* exception = __ GetAccumulator(); |
| 895 __ CallRuntime(Runtime::kThrow, exception); |
| 896 // We shouldn't ever return from a throw. |
| 897 __ Abort(kUnexpectedReturnFromThrow); |
| 898 } |
| 899 |
| 900 |
890 // Return | 901 // Return |
891 // | 902 // |
892 // Return the value in the accumulator. | 903 // Return the value in the accumulator. |
893 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 904 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
894 __ Return(); | 905 __ Return(); |
895 } | 906 } |
896 | 907 |
897 | 908 |
898 } // namespace interpreter | 909 } // namespace interpreter |
899 } // namespace internal | 910 } // namespace internal |
900 } // namespace v8 | 911 } // namespace v8 |
OLD | NEW |