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

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

Issue 1146063006: Fix arrow functions requiring context without slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup test case. Created 5 years, 6 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/arm64/full-codegen-arm64.cc ('k') | src/compiler/ast-graph-builder.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 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/codegen.h" 10 #include "src/codegen.h"
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); 725 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure);
726 DEFINE_HYDROGEN_CODE_STUB(FastNewClosure, HydrogenCodeStub); 726 DEFINE_HYDROGEN_CODE_STUB(FastNewClosure, HydrogenCodeStub);
727 }; 727 };
728 728
729 729
730 class FastNewContextStub final : public HydrogenCodeStub { 730 class FastNewContextStub final : public HydrogenCodeStub {
731 public: 731 public:
732 static const int kMaximumSlots = 64; 732 static const int kMaximumSlots = 64;
733 733
734 FastNewContextStub(Isolate* isolate, int slots) : HydrogenCodeStub(isolate) { 734 FastNewContextStub(Isolate* isolate, int slots) : HydrogenCodeStub(isolate) {
735 DCHECK(slots > 0 && slots <= kMaximumSlots); 735 DCHECK(slots >= 0 && slots <= kMaximumSlots);
736 set_sub_minor_key(SlotsBits::encode(slots)); 736 set_sub_minor_key(SlotsBits::encode(slots));
737 } 737 }
738 738
739 int slots() const { return SlotsBits::decode(sub_minor_key()); } 739 int slots() const { return SlotsBits::decode(sub_minor_key()); }
740 740
741 // Parameters accessed via CodeStubGraphBuilder::GetParameter() 741 // Parameters accessed via CodeStubGraphBuilder::GetParameter()
742 static const int kFunction = 0; 742 static const int kFunction = 0;
743 743
744 private: 744 private:
745 class SlotsBits : public BitField<int, 0, 8> {}; 745 class SlotsBits : public BitField<int, 0, 8> {};
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 2966
2967 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2967 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2968 #undef DEFINE_PLATFORM_CODE_STUB 2968 #undef DEFINE_PLATFORM_CODE_STUB
2969 #undef DEFINE_HANDLER_CODE_STUB 2969 #undef DEFINE_HANDLER_CODE_STUB
2970 #undef DEFINE_HYDROGEN_CODE_STUB 2970 #undef DEFINE_HYDROGEN_CODE_STUB
2971 #undef DEFINE_CODE_STUB 2971 #undef DEFINE_CODE_STUB
2972 #undef DEFINE_CODE_STUB_BASE 2972 #undef DEFINE_CODE_STUB_BASE
2973 } } // namespace v8::internal 2973 } } // namespace v8::internal
2974 2974
2975 #endif // V8_CODE_STUBS_H_ 2975 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698