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

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

Issue 1693513002: [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips and mips64. Created 4 years, 10 months 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/interface-descriptors.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/ast/prettyprinter.h" 7 #include "src/ast/prettyprinter.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 __ CallRuntime(Runtime::kNewSloppyArguments_Generic, context, closure); 1711 __ CallRuntime(Runtime::kNewSloppyArguments_Generic, context, closure);
1712 __ SetAccumulator(result); 1712 __ SetAccumulator(result);
1713 __ Dispatch(); 1713 __ Dispatch();
1714 } 1714 }
1715 1715
1716 1716
1717 // CreateUnmappedArguments 1717 // CreateUnmappedArguments
1718 // 1718 //
1719 // Creates a new unmapped arguments object. 1719 // Creates a new unmapped arguments object.
1720 void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) { 1720 void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
1721 Callable callable = CodeFactory::FastNewStrictArguments(isolate_);
1722 Node* target = __ HeapConstant(callable.code());
1723 Node* context = __ GetContext();
1721 Node* closure = __ LoadRegister(Register::function_closure()); 1724 Node* closure = __ LoadRegister(Register::function_closure());
1722 Node* context = __ GetContext(); 1725 Node* result = __ CallStub(callable.descriptor(), target, context, closure);
1723 Node* result =
1724 __ CallRuntime(Runtime::kNewStrictArguments_Generic, context, closure);
1725 __ SetAccumulator(result); 1726 __ SetAccumulator(result);
1726 __ Dispatch(); 1727 __ Dispatch();
1727 } 1728 }
1728 1729
1729 // CreateRestParameter 1730 // CreateRestParameter
1730 // 1731 //
1731 // Creates a new rest parameter array. 1732 // Creates a new rest parameter array.
1732 void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) { 1733 void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) {
1733 // TODO(ignition): Use FastNewRestParameterStub here. 1734 Callable callable = CodeFactory::FastNewRestParameter(isolate_);
1735 Node* target = __ HeapConstant(callable.code());
1734 Node* closure = __ LoadRegister(Register::function_closure()); 1736 Node* closure = __ LoadRegister(Register::function_closure());
1735 Node* context = __ GetContext(); 1737 Node* context = __ GetContext();
1736 Node* result = __ CallRuntime(Runtime::kNewRestParameter, context, closure); 1738 Node* result = __ CallStub(callable.descriptor(), target, context, closure);
1737 __ SetAccumulator(result); 1739 __ SetAccumulator(result);
1738 __ Dispatch(); 1740 __ Dispatch();
1739 } 1741 }
1740 1742
1741 // StackCheck 1743 // StackCheck
1742 // 1744 //
1743 // Performs a stack guard check. 1745 // Performs a stack guard check.
1744 void Interpreter::DoStackCheck(InterpreterAssembler* assembler) { 1746 void Interpreter::DoStackCheck(InterpreterAssembler* assembler) {
1745 __ StackCheck(); 1747 __ StackCheck();
1746 __ Dispatch(); 1748 __ Dispatch();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 Node* index = __ LoadRegister(index_reg); 1877 Node* index = __ LoadRegister(index_reg);
1876 Node* context = __ GetContext(); 1878 Node* context = __ GetContext();
1877 Node* result = __ CallRuntime(Runtime::kForInStep, context, index); 1879 Node* result = __ CallRuntime(Runtime::kForInStep, context, index);
1878 __ SetAccumulator(result); 1880 __ SetAccumulator(result);
1879 __ Dispatch(); 1881 __ Dispatch();
1880 } 1882 }
1881 1883
1882 } // namespace interpreter 1884 } // namespace interpreter
1883 } // namespace internal 1885 } // namespace internal
1884 } // namespace v8 1886 } // namespace v8
OLDNEW
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698