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

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

Issue 703473004: [turbofan] Add AllocateHeapNumberStub to avoid runtime call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 V(ProfileEntryHook) \ 44 V(ProfileEntryHook) \
45 V(RecordWrite) \ 45 V(RecordWrite) \
46 V(RegExpExec) \ 46 V(RegExpExec) \
47 V(StoreArrayLiteralElement) \ 47 V(StoreArrayLiteralElement) \
48 V(StoreBufferOverflow) \ 48 V(StoreBufferOverflow) \
49 V(StoreElement) \ 49 V(StoreElement) \
50 V(StringCompare) \ 50 V(StringCompare) \
51 V(StubFailureTrampoline) \ 51 V(StubFailureTrampoline) \
52 V(SubString) \ 52 V(SubString) \
53 /* HydrogenCodeStubs */ \ 53 /* HydrogenCodeStubs */ \
54 V(AllocateHeapNumber) \
54 V(ArrayNArgumentsConstructor) \ 55 V(ArrayNArgumentsConstructor) \
55 V(ArrayNoArgumentConstructor) \ 56 V(ArrayNoArgumentConstructor) \
56 V(ArraySingleArgumentConstructor) \ 57 V(ArraySingleArgumentConstructor) \
57 V(BinaryOpIC) \ 58 V(BinaryOpIC) \
58 V(BinaryOpWithAllocationSite) \ 59 V(BinaryOpWithAllocationSite) \
59 V(CompareNilIC) \ 60 V(CompareNilIC) \
60 V(CreateAllocationSite) \ 61 V(CreateAllocationSite) \
61 V(ElementsTransitionAndStore) \ 62 V(ElementsTransitionAndStore) \
62 V(FastCloneShallowArray) \ 63 V(FastCloneShallowArray) \
63 V(FastCloneShallowObject) \ 64 V(FastCloneShallowObject) \
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 private: 2107 private:
2107 class FromKindBits: public BitField<ElementsKind, 8, 8> {}; 2108 class FromKindBits: public BitField<ElementsKind, 8, 8> {};
2108 class ToKindBits: public BitField<ElementsKind, 0, 8> {}; 2109 class ToKindBits: public BitField<ElementsKind, 0, 8> {};
2109 class IsJSArrayBits: public BitField<bool, 16, 1> {}; 2110 class IsJSArrayBits: public BitField<bool, 16, 1> {};
2110 2111
2111 DEFINE_CALL_INTERFACE_DESCRIPTOR(TransitionElementsKind); 2112 DEFINE_CALL_INTERFACE_DESCRIPTOR(TransitionElementsKind);
2112 DEFINE_HYDROGEN_CODE_STUB(TransitionElementsKind, HydrogenCodeStub); 2113 DEFINE_HYDROGEN_CODE_STUB(TransitionElementsKind, HydrogenCodeStub);
2113 }; 2114 };
2114 2115
2115 2116
2117 class AllocateHeapNumberStub FINAL : public HydrogenCodeStub {
2118 public:
2119 explicit AllocateHeapNumberStub(Isolate* isolate)
2120 : HydrogenCodeStub(isolate) {}
2121
2122 private:
2123 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateHeapNumber);
2124 DEFINE_HYDROGEN_CODE_STUB(AllocateHeapNumber, HydrogenCodeStub);
2125 };
2126
2127
2116 class ArrayConstructorStubBase : public HydrogenCodeStub { 2128 class ArrayConstructorStubBase : public HydrogenCodeStub {
2117 public: 2129 public:
2118 ArrayConstructorStubBase(Isolate* isolate, 2130 ArrayConstructorStubBase(Isolate* isolate,
2119 ElementsKind kind, 2131 ElementsKind kind,
2120 AllocationSiteOverrideMode override_mode) 2132 AllocationSiteOverrideMode override_mode)
2121 : HydrogenCodeStub(isolate) { 2133 : HydrogenCodeStub(isolate) {
2122 // It only makes sense to override local allocation site behavior 2134 // It only makes sense to override local allocation site behavior
2123 // if there is a difference between the global allocation site policy 2135 // if there is a difference between the global allocation site policy
2124 // for an ElementsKind and the desired usage of the stub. 2136 // for an ElementsKind and the desired usage of the stub.
2125 DCHECK(override_mode != DISABLE_ALLOCATION_SITES || 2137 DCHECK(override_mode != DISABLE_ALLOCATION_SITES ||
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 2548
2537 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2549 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2538 #undef DEFINE_PLATFORM_CODE_STUB 2550 #undef DEFINE_PLATFORM_CODE_STUB
2539 #undef DEFINE_HANDLER_CODE_STUB 2551 #undef DEFINE_HANDLER_CODE_STUB
2540 #undef DEFINE_HYDROGEN_CODE_STUB 2552 #undef DEFINE_HYDROGEN_CODE_STUB
2541 #undef DEFINE_CODE_STUB 2553 #undef DEFINE_CODE_STUB
2542 #undef DEFINE_CODE_STUB_BASE 2554 #undef DEFINE_CODE_STUB_BASE
2543 } } // namespace v8::internal 2555 } } // namespace v8::internal
2544 2556
2545 #endif // V8_CODE_STUBS_H_ 2557 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | src/compiler/change-lowering.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698