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

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

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/code-stubs-hydrogen.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 V(ArgumentsAccess) \ 70 V(ArgumentsAccess) \
71 V(RegExpConstructResult) \ 71 V(RegExpConstructResult) \
72 V(NumberToString) \ 72 V(NumberToString) \
73 V(CEntry) \ 73 V(CEntry) \
74 V(JSEntry) \ 74 V(JSEntry) \
75 V(KeyedLoadElement) \ 75 V(KeyedLoadElement) \
76 V(KeyedStoreElement) \ 76 V(KeyedStoreElement) \
77 V(DebuggerStatement) \ 77 V(DebuggerStatement) \
78 V(StringDictionaryLookup) \ 78 V(StringDictionaryLookup) \
79 V(ElementsTransitionAndStore) \ 79 V(ElementsTransitionAndStore) \
80 V(TransitionElementsKind) \
80 V(StoreArrayLiteralElement) \ 81 V(StoreArrayLiteralElement) \
81 V(StubFailureTrampoline) \ 82 V(StubFailureTrampoline) \
82 V(ProfileEntryHook) 83 V(ProfileEntryHook)
83 84
84 // List of code stubs only used on ARM platforms. 85 // List of code stubs only used on ARM platforms.
85 #ifdef V8_TARGET_ARCH_ARM 86 #ifdef V8_TARGET_ARCH_ARM
86 #define CODE_STUB_LIST_ARM(V) \ 87 #define CODE_STUB_LIST_ARM(V) \
87 V(GetProperty) \ 88 V(GetProperty) \
88 V(SetProperty) \ 89 V(SetProperty) \
89 V(InvokeBuiltin) \ 90 V(InvokeBuiltin) \
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 1212
1212 private: 1213 private:
1213 class IsJSArrayBits: public BitField<bool, 8, 1> {}; 1214 class IsJSArrayBits: public BitField<bool, 8, 1> {};
1214 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {}; 1215 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
1215 uint32_t bit_field_; 1216 uint32_t bit_field_;
1216 1217
1217 DISALLOW_COPY_AND_ASSIGN(KeyedLoadFastElementStub); 1218 DISALLOW_COPY_AND_ASSIGN(KeyedLoadFastElementStub);
1218 }; 1219 };
1219 1220
1220 1221
1222 class TransitionElementsKindStub : public HydrogenCodeStub {
1223 public:
1224 TransitionElementsKindStub(ElementsKind from_kind,
1225 ElementsKind to_kind) {
1226 bit_field_ = FromKindBits::encode(from_kind) |
1227 ToKindBits::encode(to_kind);
1228 }
1229
1230 Major MajorKey() { return TransitionElementsKind; }
1231 int MinorKey() { return bit_field_; }
1232
1233 ElementsKind from_kind() const {
1234 return FromKindBits::decode(bit_field_);
1235 }
1236
1237 ElementsKind to_kind() const {
1238 return ToKindBits::decode(bit_field_);
1239 }
1240
1241 virtual Handle<Code> GenerateCode();
1242
1243 virtual void InitializeInterfaceDescriptor(
1244 Isolate* isolate,
1245 CodeStubInterfaceDescriptor* descriptor);
1246
1247 private:
1248 class FromKindBits: public BitField<ElementsKind, 8, 8> {};
1249 class ToKindBits: public BitField<ElementsKind, 0, 8> {};
1250 uint32_t bit_field_;
1251
1252 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub);
1253 };
1254
1255
1221 class KeyedStoreElementStub : public PlatformCodeStub { 1256 class KeyedStoreElementStub : public PlatformCodeStub {
1222 public: 1257 public:
1223 KeyedStoreElementStub(bool is_js_array, 1258 KeyedStoreElementStub(bool is_js_array,
1224 ElementsKind elements_kind, 1259 ElementsKind elements_kind,
1225 KeyedAccessGrowMode grow_mode) 1260 KeyedAccessGrowMode grow_mode)
1226 : is_js_array_(is_js_array), 1261 : is_js_array_(is_js_array),
1227 elements_kind_(elements_kind), 1262 elements_kind_(elements_kind),
1228 grow_mode_(grow_mode), 1263 grow_mode_(grow_mode),
1229 fp_registers_(CanUseFPRegisters()) { } 1264 fp_registers_(CanUseFPRegisters()) { }
1230 1265
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 1460
1426 // The current function entry hook. 1461 // The current function entry hook.
1427 static FunctionEntryHook entry_hook_; 1462 static FunctionEntryHook entry_hook_;
1428 1463
1429 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 1464 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1430 }; 1465 };
1431 1466
1432 } } // namespace v8::internal 1467 } } // namespace v8::internal
1433 1468
1434 #endif // V8_CODE_STUBS_H_ 1469 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698