| OLD | NEW |
| 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 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 class ArrayConstructorStubBase : public HydrogenCodeStub { | 2070 class ArrayConstructorStubBase : public HydrogenCodeStub { |
| 2071 public: | 2071 public: |
| 2072 ArrayConstructorStubBase(Isolate* isolate, | 2072 ArrayConstructorStubBase(Isolate* isolate, |
| 2073 ElementsKind kind, | 2073 ElementsKind kind, |
| 2074 AllocationSiteOverrideMode override_mode) | 2074 AllocationSiteOverrideMode override_mode) |
| 2075 : HydrogenCodeStub(isolate) { | 2075 : HydrogenCodeStub(isolate) { |
| 2076 // It only makes sense to override local allocation site behavior | 2076 // It only makes sense to override local allocation site behavior |
| 2077 // if there is a difference between the global allocation site policy | 2077 // if there is a difference between the global allocation site policy |
| 2078 // for an ElementsKind and the desired usage of the stub. | 2078 // for an ElementsKind and the desired usage of the stub. |
| 2079 DCHECK(override_mode != DISABLE_ALLOCATION_SITES || | 2079 DCHECK(override_mode != DISABLE_ALLOCATION_SITES || |
| 2080 !FLAG_allocation_site_transitioning || |
| 2080 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); | 2081 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); |
| 2081 set_sub_minor_key(ElementsKindBits::encode(kind) | | 2082 set_sub_minor_key(ElementsKindBits::encode(kind) | |
| 2082 AllocationSiteOverrideModeBits::encode(override_mode)); | 2083 AllocationSiteOverrideModeBits::encode(override_mode)); |
| 2083 } | 2084 } |
| 2084 | 2085 |
| 2085 ElementsKind elements_kind() const { | 2086 ElementsKind elements_kind() const { |
| 2086 return ElementsKindBits::decode(sub_minor_key()); | 2087 return ElementsKindBits::decode(sub_minor_key()); |
| 2087 } | 2088 } |
| 2088 | 2089 |
| 2089 AllocationSiteOverrideMode override_mode() const { | 2090 AllocationSiteOverrideMode override_mode() const { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 | 2487 |
| 2487 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2488 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2488 #undef DEFINE_PLATFORM_CODE_STUB | 2489 #undef DEFINE_PLATFORM_CODE_STUB |
| 2489 #undef DEFINE_HANDLER_CODE_STUB | 2490 #undef DEFINE_HANDLER_CODE_STUB |
| 2490 #undef DEFINE_HYDROGEN_CODE_STUB | 2491 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2491 #undef DEFINE_CODE_STUB | 2492 #undef DEFINE_CODE_STUB |
| 2492 #undef DEFINE_CODE_STUB_BASE | 2493 #undef DEFINE_CODE_STUB_BASE |
| 2493 } } // namespace v8::internal | 2494 } } // namespace v8::internal |
| 2494 | 2495 |
| 2495 #endif // V8_CODE_STUBS_H_ | 2496 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |