OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" | 5 #include "src/code-stub-assembler.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 #include "src/frames-inl.h" | 7 #include "src/frames-inl.h" |
8 #include "src/frames.h" | 8 #include "src/frames.h" |
9 #include "src/ic/handler-configuration.h" | 9 #include "src/ic/handler-configuration.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 return nullptr; | 1085 return nullptr; |
1086 } | 1086 } |
1087 return Load(machine_type, base, offset); | 1087 return Load(machine_type, base, offset); |
1088 } | 1088 } |
1089 | 1089 |
1090 Node* CodeStubAssembler::LoadContextElement(Node* context, int slot_index) { | 1090 Node* CodeStubAssembler::LoadContextElement(Node* context, int slot_index) { |
1091 int offset = Context::SlotOffset(slot_index); | 1091 int offset = Context::SlotOffset(slot_index); |
1092 return Load(MachineType::AnyTagged(), context, IntPtrConstant(offset)); | 1092 return Load(MachineType::AnyTagged(), context, IntPtrConstant(offset)); |
1093 } | 1093 } |
1094 | 1094 |
| 1095 Node* CodeStubAssembler::StoreContextElement(Node* context, int slot_index, |
| 1096 Node* value) { |
| 1097 int offset = Context::SlotOffset(slot_index); |
| 1098 return Store(MachineRepresentation::kTagged, context, IntPtrConstant(offset), |
| 1099 value); |
| 1100 } |
| 1101 |
1095 Node* CodeStubAssembler::LoadNativeContext(Node* context) { | 1102 Node* CodeStubAssembler::LoadNativeContext(Node* context) { |
1096 return LoadContextElement(context, Context::NATIVE_CONTEXT_INDEX); | 1103 return LoadContextElement(context, Context::NATIVE_CONTEXT_INDEX); |
1097 } | 1104 } |
1098 | 1105 |
1099 Node* CodeStubAssembler::LoadJSArrayElementsMap(ElementsKind kind, | 1106 Node* CodeStubAssembler::LoadJSArrayElementsMap(ElementsKind kind, |
1100 Node* native_context) { | 1107 Node* native_context) { |
1101 return LoadFixedArrayElement(native_context, | 1108 return LoadFixedArrayElement(native_context, |
1102 IntPtrConstant(Context::ArrayMapIndex(kind))); | 1109 IntPtrConstant(Context::ArrayMapIndex(kind))); |
1103 } | 1110 } |
1104 | 1111 |
(...skipping 6113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7218 result.Bind(CallRuntime(Runtime::kInstanceOf, context, object, callable)); | 7225 result.Bind(CallRuntime(Runtime::kInstanceOf, context, object, callable)); |
7219 Goto(&end); | 7226 Goto(&end); |
7220 } | 7227 } |
7221 | 7228 |
7222 Bind(&end); | 7229 Bind(&end); |
7223 return result.value(); | 7230 return result.value(); |
7224 } | 7231 } |
7225 | 7232 |
7226 } // namespace internal | 7233 } // namespace internal |
7227 } // namespace v8 | 7234 } // namespace v8 |
OLD | NEW |