Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 1412953007: [Interpreter] Fill out function prologue support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 Node* shared = __ GetAccumulator(); 1021 Node* shared = __ GetAccumulator();
1022 Node* tenured_raw = __ BytecodeOperandImm8(0); 1022 Node* tenured_raw = __ BytecodeOperandImm8(0);
1023 Node* tenured = __ SmiTag(tenured_raw); 1023 Node* tenured = __ SmiTag(tenured_raw);
1024 Node* result = 1024 Node* result =
1025 __ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured); 1025 __ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured);
1026 __ SetAccumulator(result); 1026 __ SetAccumulator(result);
1027 __ Dispatch(); 1027 __ Dispatch();
1028 } 1028 }
1029 1029
1030 1030
1031 // CreateMappedArguments
1032 //
1033 // Creates a new mapped arguments object.
1034 void Interpreter::DoCreateMappedArguments(
1035 compiler::InterpreterAssembler* assembler) {
1036 Node* closure = __ LoadRegister(Register::function_closure());
1037 Node* result = __ CallRuntime(Runtime::kNewSloppyArguments_Generic, closure);
1038 __ SetAccumulator(result);
1039 __ Dispatch();
1040 }
1041
1042
1043 // CreateUnmappedArguments
1044 //
1045 // Creates a new unmapped arguments object.
1046 void Interpreter::DoCreateUnmappedArguments(
1047 compiler::InterpreterAssembler* assembler) {
1048 Node* closure = __ LoadRegister(Register::function_closure());
1049 Node* result = __ CallRuntime(Runtime::kNewStrictArguments_Generic, closure);
1050 __ SetAccumulator(result);
1051 __ Dispatch();
1052 }
1053
1054
1031 // Throw 1055 // Throw
1032 // 1056 //
1033 // Throws the exception in the accumulator. 1057 // Throws the exception in the accumulator.
1034 void Interpreter::DoThrow(compiler::InterpreterAssembler* assembler) { 1058 void Interpreter::DoThrow(compiler::InterpreterAssembler* assembler) {
1035 Node* exception = __ GetAccumulator(); 1059 Node* exception = __ GetAccumulator();
1036 __ CallRuntime(Runtime::kThrow, exception); 1060 __ CallRuntime(Runtime::kThrow, exception);
1037 // We shouldn't ever return from a throw. 1061 // We shouldn't ever return from a throw.
1038 __ Abort(kUnexpectedReturnFromThrow); 1062 __ Abort(kUnexpectedReturnFromThrow);
1039 } 1063 }
1040 1064
1041 1065
1042 // Return 1066 // Return
1043 // 1067 //
1044 // Return the value in the accumulator. 1068 // Return the value in the accumulator.
1045 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 1069 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
1046 __ Return(); 1070 __ Return();
1047 } 1071 }
1048 1072
1049 1073
1050 } // namespace interpreter 1074 } // namespace interpreter
1051 } // namespace internal 1075 } // namespace internal
1052 } // namespace v8 1076 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698