OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 Expression* value = property->value(); | 2195 Expression* value = property->value(); |
2196 DCHECK(key != NULL); | 2196 DCHECK(key != NULL); |
2197 | 2197 |
2198 if (property->is_static()) { | 2198 if (property->is_static()) { |
2199 __ Peek(scratch, kPointerSize); // constructor | 2199 __ Peek(scratch, kPointerSize); // constructor |
2200 } else { | 2200 } else { |
2201 __ Peek(scratch, 0); // prototype | 2201 __ Peek(scratch, 0); // prototype |
2202 } | 2202 } |
2203 __ Push(scratch); | 2203 __ Push(scratch); |
2204 VisitForStackValue(key); | 2204 VisitForStackValue(key); |
| 2205 VisitForStackValue(value); |
2205 | 2206 |
2206 switch (property->kind()) { | 2207 switch (property->kind()) { |
2207 case ObjectLiteral::Property::CONSTANT: | 2208 case ObjectLiteral::Property::CONSTANT: |
2208 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2209 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2209 case ObjectLiteral::Property::COMPUTED: | 2210 case ObjectLiteral::Property::COMPUTED: |
2210 case ObjectLiteral::Property::PROTOTYPE: | 2211 case ObjectLiteral::Property::PROTOTYPE: |
2211 VisitForStackValue(value); | 2212 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2212 __ Mov(scratch, Smi::FromInt(NONE)); | |
2213 __ Push(scratch); | |
2214 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | |
2215 break; | 2213 break; |
2216 | 2214 |
2217 case ObjectLiteral::Property::GETTER: | 2215 case ObjectLiteral::Property::GETTER: |
2218 VisitForStackValue(value); | 2216 __ CallRuntime(Runtime::kDefineClassGetter, 3); |
2219 __ LoadRoot(scratch, Heap::kNullValueRootIndex); | |
2220 __ push(scratch); | |
2221 __ Mov(scratch, Smi::FromInt(NONE)); | |
2222 __ Push(scratch); | |
2223 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | |
2224 break; | 2217 break; |
2225 | 2218 |
2226 case ObjectLiteral::Property::SETTER: | 2219 case ObjectLiteral::Property::SETTER: |
2227 __ LoadRoot(scratch, Heap::kNullValueRootIndex); | 2220 __ CallRuntime(Runtime::kDefineClassSetter, 3); |
2228 __ push(scratch); | |
2229 VisitForStackValue(value); | |
2230 __ Mov(scratch, Smi::FromInt(NONE)); | |
2231 __ Push(scratch); | |
2232 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | |
2233 break; | 2221 break; |
2234 | 2222 |
2235 default: | 2223 default: |
2236 UNREACHABLE(); | 2224 UNREACHABLE(); |
2237 } | 2225 } |
2238 } | 2226 } |
2239 | 2227 |
2240 // prototype | 2228 // prototype |
2241 __ CallRuntime(Runtime::kToFastProperties, 1); | 2229 __ CallRuntime(Runtime::kToFastProperties, 1); |
2242 | 2230 |
(...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5331 return previous_; | 5319 return previous_; |
5332 } | 5320 } |
5333 | 5321 |
5334 | 5322 |
5335 #undef __ | 5323 #undef __ |
5336 | 5324 |
5337 | 5325 |
5338 } } // namespace v8::internal | 5326 } } // namespace v8::internal |
5339 | 5327 |
5340 #endif // V8_TARGET_ARCH_ARM64 | 5328 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |