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

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

Issue 1922523002: [Interpreter] Use FastCloneShallowObjectStub in CreateObjectLiteral bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add todo Created 4 years, 7 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/code-stub-assembler.cc ('k') | src/code-stubs.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/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 // Maximum number of properties in copied object. 1127 // Maximum number of properties in copied object.
1128 static const int kMaximumClonedProperties = 6; 1128 static const int kMaximumClonedProperties = 6;
1129 1129
1130 FastCloneShallowObjectStub(Isolate* isolate, int length) 1130 FastCloneShallowObjectStub(Isolate* isolate, int length)
1131 : TurboFanCodeStub(isolate) { 1131 : TurboFanCodeStub(isolate) {
1132 DCHECK_GE(length, 0); 1132 DCHECK_GE(length, 0);
1133 DCHECK_LE(length, kMaximumClonedProperties); 1133 DCHECK_LE(length, kMaximumClonedProperties);
1134 minor_key_ = LengthBits::encode(LengthBits::encode(length)); 1134 minor_key_ = LengthBits::encode(LengthBits::encode(length));
1135 } 1135 }
1136 1136
1137 static compiler::Node* GenerateFastPath(
1138 CodeStubAssembler* assembler,
1139 compiler::CodeAssembler::Label* call_runtime, compiler::Node* closure,
1140 compiler::Node* literals_index, compiler::Node* properties_count);
1141
1142 static bool IsSupported(ObjectLiteral* expr);
1143 static int PropertiesCount(int literal_length);
1144
1137 int length() const { return LengthBits::decode(minor_key_); } 1145 int length() const { return LengthBits::decode(minor_key_); }
1138 1146
1139 private: 1147 private:
1140 class LengthBits : public BitField<int, 0, 4> {}; 1148 class LengthBits : public BitField<int, 0, 4> {};
1141 1149
1142 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowObject); 1150 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowObject);
1143 DEFINE_TURBOFAN_CODE_STUB(FastCloneShallowObject, TurboFanCodeStub); 1151 DEFINE_TURBOFAN_CODE_STUB(FastCloneShallowObject, TurboFanCodeStub);
1144 }; 1152 };
1145 1153
1146 1154
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 #undef DEFINE_HYDROGEN_CODE_STUB 3202 #undef DEFINE_HYDROGEN_CODE_STUB
3195 #undef DEFINE_CODE_STUB 3203 #undef DEFINE_CODE_STUB
3196 #undef DEFINE_CODE_STUB_BASE 3204 #undef DEFINE_CODE_STUB_BASE
3197 3205
3198 extern Representation RepresentationFromType(Type* type); 3206 extern Representation RepresentationFromType(Type* type);
3199 3207
3200 } // namespace internal 3208 } // namespace internal
3201 } // namespace v8 3209 } // namespace v8
3202 3210
3203 #endif // V8_CODE_STUBS_H_ 3211 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698