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

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

Issue 2314483002: Store the ScopeInfo in WithContexts (Closed)
Patch Set: updates Created 4 years, 3 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/contexts.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 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 V(Create, Operator::kEliminatable, 2, 1) \ 444 V(Create, Operator::kEliminatable, 2, 1) \
445 V(CreateIterResultObject, Operator::kEliminatable, 2, 1) \ 445 V(CreateIterResultObject, Operator::kEliminatable, 2, 1) \
446 V(HasProperty, Operator::kNoProperties, 2, 1) \ 446 V(HasProperty, Operator::kNoProperties, 2, 1) \
447 V(TypeOf, Operator::kPure, 1, 1) \ 447 V(TypeOf, Operator::kPure, 1, 1) \
448 V(InstanceOf, Operator::kNoProperties, 2, 1) \ 448 V(InstanceOf, Operator::kNoProperties, 2, 1) \
449 V(ForInNext, Operator::kNoProperties, 4, 1) \ 449 V(ForInNext, Operator::kNoProperties, 4, 1) \
450 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ 450 V(ForInPrepare, Operator::kNoProperties, 1, 3) \
451 V(LoadMessage, Operator::kNoThrow, 0, 1) \ 451 V(LoadMessage, Operator::kNoThrow, 0, 1) \
452 V(StoreMessage, Operator::kNoThrow, 1, 0) \ 452 V(StoreMessage, Operator::kNoThrow, 1, 0) \
453 V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \ 453 V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \
454 V(StackCheck, Operator::kNoWrite, 0, 0) \ 454 V(StackCheck, Operator::kNoWrite, 0, 0)
455 V(CreateWithContext, Operator::kNoProperties, 2, 1)
456 455
457 #define BINARY_OP_LIST(V) \ 456 #define BINARY_OP_LIST(V) \
458 V(BitwiseOr) \ 457 V(BitwiseOr) \
459 V(BitwiseXor) \ 458 V(BitwiseXor) \
460 V(BitwiseAnd) \ 459 V(BitwiseAnd) \
461 V(ShiftLeft) \ 460 V(ShiftLeft) \
462 V(ShiftRight) \ 461 V(ShiftRight) \
463 V(ShiftRightLogical) \ 462 V(ShiftRightLogical) \
464 V(Add) \ 463 V(Add) \
465 V(Subtract) \ 464 V(Subtract) \
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 const Operator* JSOperatorBuilder::CreateCatchContext( 842 const Operator* JSOperatorBuilder::CreateCatchContext(
844 const Handle<String>& name, const Handle<ScopeInfo>& scope_info) { 843 const Handle<String>& name, const Handle<ScopeInfo>& scope_info) {
845 CreateCatchContextParameters parameters(name, scope_info); 844 CreateCatchContextParameters parameters(name, scope_info);
846 return new (zone()) Operator1<CreateCatchContextParameters>( 845 return new (zone()) Operator1<CreateCatchContextParameters>(
847 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode 846 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode
848 "JSCreateCatchContext", // name 847 "JSCreateCatchContext", // name
849 2, 1, 1, 1, 1, 2, // counts 848 2, 1, 1, 1, 1, 2, // counts
850 parameters); // parameter 849 parameters); // parameter
851 } 850 }
852 851
852 const Operator* JSOperatorBuilder::CreateWithContext(
853 const Handle<ScopeInfo>& scope_info) {
854 return new (zone()) Operator1<Handle<ScopeInfo>>(
855 IrOpcode::kJSCreateWithContext, Operator::kNoProperties, // opcode
856 "JSCreateWithContext", // name
857 2, 1, 1, 1, 1, 2, // counts
858 scope_info); // parameter
859 }
853 860
854 const Operator* JSOperatorBuilder::CreateBlockContext( 861 const Operator* JSOperatorBuilder::CreateBlockContext(
855 const Handle<ScopeInfo>& scpope_info) { 862 const Handle<ScopeInfo>& scpope_info) {
856 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 863 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
857 IrOpcode::kJSCreateBlockContext, Operator::kNoProperties, // opcode 864 IrOpcode::kJSCreateBlockContext, Operator::kNoProperties, // opcode
858 "JSCreateBlockContext", // name 865 "JSCreateBlockContext", // name
859 1, 1, 1, 1, 1, 2, // counts 866 1, 1, 1, 1, 1, 2, // counts
860 scpope_info); // parameter 867 scpope_info); // parameter
861 } 868 }
862 869
863 870
864 const Operator* JSOperatorBuilder::CreateScriptContext( 871 const Operator* JSOperatorBuilder::CreateScriptContext(
865 const Handle<ScopeInfo>& scpope_info) { 872 const Handle<ScopeInfo>& scpope_info) {
866 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 873 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
867 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 874 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
868 "JSCreateScriptContext", // name 875 "JSCreateScriptContext", // name
869 1, 1, 1, 1, 1, 2, // counts 876 1, 1, 1, 1, 1, 2, // counts
870 scpope_info); // parameter 877 scpope_info); // parameter
871 } 878 }
872 879
873 } // namespace compiler 880 } // namespace compiler
874 } // namespace internal 881 } // namespace internal
875 } // namespace v8 882 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698