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

Side by Side Diff: src/code-stubs.h

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Crankshaft backends and scope deserialization Created 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 static compiler::Node* Generate(CodeStubAssembler* assembler, 854 static compiler::Node* Generate(CodeStubAssembler* assembler,
855 compiler::Node* shared_info, 855 compiler::Node* shared_info,
856 compiler::Node* context); 856 compiler::Node* context);
857 857
858 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); 858 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure);
859 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); 859 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub);
860 }; 860 };
861 861
862 class FastNewFunctionContextStub final : public TurboFanCodeStub { 862 class FastNewFunctionContextStub final : public TurboFanCodeStub {
863 public: 863 public:
864 explicit FastNewFunctionContextStub(Isolate* isolate) 864 explicit FastNewFunctionContextStub(Isolate* isolate, bool for_eval)
865 : TurboFanCodeStub(isolate) {} 865 : TurboFanCodeStub(isolate) {
866 minor_key_ = ForEvalBits::encode(for_eval);
867 }
866 868
867 static compiler::Node* Generate(CodeStubAssembler* assembler, 869 static compiler::Node* Generate(CodeStubAssembler* assembler,
868 compiler::Node* function, 870 compiler::Node* function,
869 compiler::Node* slots, 871 compiler::Node* slots,
870 compiler::Node* context); 872 compiler::Node* context, bool for_eval);
871 873
872 private: 874 private:
873 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); 875 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext);
874 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); 876 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub);
877
878 int for_eval() const { return ForEvalBits::decode(minor_key_); }
879 class ForEvalBits : public BitField<bool, 0, 1> {};
875 }; 880 };
876 881
877 882
878 class FastNewObjectStub final : public PlatformCodeStub { 883 class FastNewObjectStub final : public PlatformCodeStub {
879 public: 884 public:
880 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 885 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
881 886
882 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); 887 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject);
883 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub); 888 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub);
884 }; 889 };
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
2748 #undef DEFINE_HYDROGEN_CODE_STUB 2753 #undef DEFINE_HYDROGEN_CODE_STUB
2749 #undef DEFINE_CODE_STUB 2754 #undef DEFINE_CODE_STUB
2750 #undef DEFINE_CODE_STUB_BASE 2755 #undef DEFINE_CODE_STUB_BASE
2751 2756
2752 extern Representation RepresentationFromMachineType(MachineType type); 2757 extern Representation RepresentationFromMachineType(MachineType type);
2753 2758
2754 } // namespace internal 2759 } // namespace internal
2755 } // namespace v8 2760 } // namespace v8
2756 2761
2757 #endif // V8_CODE_STUBS_H_ 2762 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698