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/ia32/lithium-ia32.h

Issue 279743002: Improve Array.shift() performance for small arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cosmetic fix Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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_IA32_LITHIUM_IA32_H_ 5 #ifndef V8_IA32_LITHIUM_IA32_H_
6 #define V8_IA32_LITHIUM_IA32_H_ 6 #define V8_IA32_LITHIUM_IA32_H_
7 7
8 #include "hydrogen.h" 8 #include "hydrogen.h"
9 #include "lithium-allocator.h" 9 #include "lithium-allocator.h"
10 #include "lithium.h" 10 #include "lithium.h"
11 #include "safepoint-table.h" 11 #include "safepoint-table.h"
12 #include "utils.h" 12 #include "utils.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 // Forward declarations. 17 // Forward declarations.
18 class LCodeGen; 18 class LCodeGen;
19 19
20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
21 V(AccessArgumentsAt) \ 21 V(AccessArgumentsAt) \
22 V(AddI) \ 22 V(AddI) \
23 V(Allocate) \ 23 V(Allocate) \
24 V(ApplyArguments) \ 24 V(ApplyArguments) \
25 V(ArgumentsElements) \ 25 V(ArgumentsElements) \
26 V(ArgumentsLength) \ 26 V(ArgumentsLength) \
27 V(ArithmeticD) \ 27 V(ArithmeticD) \
28 V(ArithmeticT) \ 28 V(ArithmeticT) \
29 V(ArrayShift) \
29 V(BitI) \ 30 V(BitI) \
30 V(BoundsCheck) \ 31 V(BoundsCheck) \
31 V(Branch) \ 32 V(Branch) \
32 V(CallJSFunction) \ 33 V(CallJSFunction) \
33 V(CallWithDescriptor) \ 34 V(CallWithDescriptor) \
34 V(CallFunction) \ 35 V(CallFunction) \
35 V(CallNew) \ 36 V(CallNew) \
36 V(CallNewArray) \ 37 V(CallNewArray) \
37 V(CallRuntime) \ 38 V(CallRuntime) \
38 V(CallStub) \ 39 V(CallStub) \
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 2298
2298 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } 2299 Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
2299 Handle<Map> transitioned_map() { 2300 Handle<Map> transitioned_map() {
2300 return hydrogen()->transitioned_map().handle(); 2301 return hydrogen()->transitioned_map().handle();
2301 } 2302 }
2302 ElementsKind from_kind() { return hydrogen()->from_kind(); } 2303 ElementsKind from_kind() { return hydrogen()->from_kind(); }
2303 ElementsKind to_kind() { return hydrogen()->to_kind(); } 2304 ElementsKind to_kind() { return hydrogen()->to_kind(); }
2304 }; 2305 };
2305 2306
2306 2307
2308 class LArrayShift V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2309 public:
2310 LArrayShift(LOperand* context, LOperand* object) {
2311 inputs_[0] = context;
2312 inputs_[1] = object;
2313 }
2314
2315 LOperand* context() const { return inputs_[0]; }
2316 LOperand* object() const { return inputs_[1]; }
2317
2318 DECLARE_CONCRETE_INSTRUCTION(ArrayShift, "array-shift")
2319 DECLARE_HYDROGEN_ACCESSOR(ArrayShift)
2320 };
2321
2322
2307 class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> { 2323 class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> {
2308 public: 2324 public:
2309 LTrapAllocationMemento(LOperand* object, 2325 LTrapAllocationMemento(LOperand* object,
2310 LOperand* temp) { 2326 LOperand* temp) {
2311 inputs_[0] = object; 2327 inputs_[0] = object;
2312 temps_[0] = temp; 2328 temps_[0] = temp;
2313 } 2329 }
2314 2330
2315 LOperand* object() { return inputs_[0]; } 2331 LOperand* object() { return inputs_[0]; }
2316 LOperand* temp() { return temps_[0]; } 2332 LOperand* temp() { return temps_[0]; }
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 2898
2883 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2899 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2884 }; 2900 };
2885 2901
2886 #undef DECLARE_HYDROGEN_ACCESSOR 2902 #undef DECLARE_HYDROGEN_ACCESSOR
2887 #undef DECLARE_CONCRETE_INSTRUCTION 2903 #undef DECLARE_CONCRETE_INSTRUCTION
2888 2904
2889 } } // namespace v8::internal 2905 } } // namespace v8::internal
2890 2906
2891 #endif // V8_IA32_LITHIUM_IA32_H_ 2907 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698