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

Side by Side Diff: src/compiler/js-operator.cc

Issue 1380113002: [turbofan] Call FastNewContextStub for function context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years, 2 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/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/js-operator.h" 5 #include "src/compiler/js-operator.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/lazy-instance.h" 9 #include "src/base/lazy-instance.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 V(Yield, Operator::kNoProperties, 1, 1) \ 465 V(Yield, Operator::kNoProperties, 1, 1) \
466 V(Create, Operator::kEliminatable, 0, 1) \ 466 V(Create, Operator::kEliminatable, 0, 1) \
467 V(HasProperty, Operator::kNoProperties, 2, 1) \ 467 V(HasProperty, Operator::kNoProperties, 2, 1) \
468 V(TypeOf, Operator::kEliminatable, 1, 1) \ 468 V(TypeOf, Operator::kEliminatable, 1, 1) \
469 V(InstanceOf, Operator::kNoProperties, 2, 1) \ 469 V(InstanceOf, Operator::kNoProperties, 2, 1) \
470 V(ForInDone, Operator::kPure, 2, 1) \ 470 V(ForInDone, Operator::kPure, 2, 1) \
471 V(ForInNext, Operator::kNoProperties, 4, 1) \ 471 V(ForInNext, Operator::kNoProperties, 4, 1) \
472 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ 472 V(ForInPrepare, Operator::kNoProperties, 1, 3) \
473 V(ForInStep, Operator::kPure, 1, 1) \ 473 V(ForInStep, Operator::kPure, 1, 1) \
474 V(StackCheck, Operator::kNoProperties, 0, 0) \ 474 V(StackCheck, Operator::kNoProperties, 0, 0) \
475 V(CreateFunctionContext, Operator::kNoProperties, 1, 1) \
476 V(CreateWithContext, Operator::kNoProperties, 2, 1) \ 475 V(CreateWithContext, Operator::kNoProperties, 2, 1) \
477 V(CreateModuleContext, Operator::kNoProperties, 2, 1) 476 V(CreateModuleContext, Operator::kNoProperties, 2, 1)
478 477
479 478
480 #define CACHED_OP_LIST_WITH_LANGUAGE_MODE(V) \ 479 #define CACHED_OP_LIST_WITH_LANGUAGE_MODE(V) \
481 V(LessThan, Operator::kNoProperties, 2, 1) \ 480 V(LessThan, Operator::kNoProperties, 2, 1) \
482 V(GreaterThan, Operator::kNoProperties, 2, 1) \ 481 V(GreaterThan, Operator::kNoProperties, 2, 1) \
483 V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \ 482 V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \
484 V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1) \ 483 V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1) \
485 V(BitwiseOr, Operator::kNoProperties, 2, 1) \ 484 V(BitwiseOr, Operator::kNoProperties, 2, 1) \
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 765
767 const Operator* JSOperatorBuilder::CreateLiteralObject(int literal_flags) { 766 const Operator* JSOperatorBuilder::CreateLiteralObject(int literal_flags) {
768 return new (zone()) Operator1<int>( // -- 767 return new (zone()) Operator1<int>( // --
769 IrOpcode::kJSCreateLiteralObject, Operator::kNoProperties, // opcode 768 IrOpcode::kJSCreateLiteralObject, Operator::kNoProperties, // opcode
770 "JSCreateLiteralObject", // name 769 "JSCreateLiteralObject", // name
771 3, 1, 1, 1, 1, 2, // counts 770 3, 1, 1, 1, 1, 2, // counts
772 literal_flags); // parameter 771 literal_flags); // parameter
773 } 772 }
774 773
775 774
775 const Operator* JSOperatorBuilder::CreateFunctionContext(int slot_count) {
776 return new (zone()) Operator1<int>( // --
777 IrOpcode::kJSCreateFunctionContext, Operator::kNoProperties, // opcode
778 "JSCreateFunctionContext", // name
779 1, 1, 1, 1, 1, 2, // counts
780 slot_count); // parameter
781 }
782
783
776 const Operator* JSOperatorBuilder::CreateCatchContext( 784 const Operator* JSOperatorBuilder::CreateCatchContext(
777 const Handle<String>& name) { 785 const Handle<String>& name) {
778 return new (zone()) Operator1<Handle<String>, Handle<String>::equal_to, 786 return new (zone()) Operator1<Handle<String>, Handle<String>::equal_to,
779 Handle<String>::hash>( // -- 787 Handle<String>::hash>( // --
780 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode 788 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode
781 "JSCreateCatchContext", // name 789 "JSCreateCatchContext", // name
782 2, 1, 1, 1, 1, 2, // counts 790 2, 1, 1, 1, 1, 2, // counts
783 name); // parameter 791 name); // parameter
784 } 792 }
785 793
(...skipping 15 matching lines...) Expand all
801 Handle<ScopeInfo>::hash>( // -- 809 Handle<ScopeInfo>::hash>( // --
802 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 810 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
803 "JSCreateScriptContext", // name 811 "JSCreateScriptContext", // name
804 1, 1, 1, 1, 1, 2, // counts 812 1, 1, 1, 1, 1, 2, // counts
805 scpope_info); // parameter 813 scpope_info); // parameter
806 } 814 }
807 815
808 } // namespace compiler 816 } // namespace compiler
809 } // namespace internal 817 } // namespace internal
810 } // namespace v8 818 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698