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 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 Literal* key = property->key()->AsLiteral(); | 2178 Literal* key = property->key()->AsLiteral(); |
2179 Expression* value = property->value(); | 2179 Expression* value = property->value(); |
2180 DCHECK(key != NULL); | 2180 DCHECK(key != NULL); |
2181 | 2181 |
2182 if (property->is_static()) { | 2182 if (property->is_static()) { |
2183 __ Peek(scratch, kPointerSize); // constructor | 2183 __ Peek(scratch, kPointerSize); // constructor |
2184 } else { | 2184 } else { |
2185 __ Peek(scratch, 0); // prototype | 2185 __ Peek(scratch, 0); // prototype |
2186 } | 2186 } |
2187 __ Push(scratch); | 2187 __ Push(scratch); |
2188 VisitForStackValue(key); | 2188 EmitPropertyKey(property); |
2189 VisitForStackValue(value); | 2189 VisitForStackValue(value); |
2190 EmitSetHomeObjectIfNeeded(value, 2); | 2190 EmitSetHomeObjectIfNeeded(value, 2); |
2191 | 2191 |
2192 switch (property->kind()) { | 2192 switch (property->kind()) { |
2193 case ObjectLiteral::Property::CONSTANT: | 2193 case ObjectLiteral::Property::CONSTANT: |
2194 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2194 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2195 case ObjectLiteral::Property::COMPUTED: | 2195 case ObjectLiteral::Property::COMPUTED: |
2196 case ObjectLiteral::Property::PROTOTYPE: | 2196 case ObjectLiteral::Property::PROTOTYPE: |
2197 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2197 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2198 break; | 2198 break; |
2199 | 2199 |
2200 case ObjectLiteral::Property::GETTER: | 2200 case ObjectLiteral::Property::GETTER: |
2201 __ CallRuntime(Runtime::kDefineClassGetter, 3); | 2201 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); |
2202 break; | 2202 break; |
2203 | 2203 |
2204 case ObjectLiteral::Property::SETTER: | 2204 case ObjectLiteral::Property::SETTER: |
2205 __ CallRuntime(Runtime::kDefineClassSetter, 3); | 2205 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); |
2206 break; | 2206 break; |
2207 | 2207 |
2208 default: | 2208 default: |
2209 UNREACHABLE(); | 2209 UNREACHABLE(); |
2210 } | 2210 } |
2211 } | 2211 } |
2212 | 2212 |
2213 // prototype | 2213 // prototype |
2214 __ CallRuntime(Runtime::kToFastProperties, 1); | 2214 __ CallRuntime(Runtime::kToFastProperties, 1); |
2215 | 2215 |
(...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5279 return previous_; | 5279 return previous_; |
5280 } | 5280 } |
5281 | 5281 |
5282 | 5282 |
5283 #undef __ | 5283 #undef __ |
5284 | 5284 |
5285 | 5285 |
5286 } } // namespace v8::internal | 5286 } } // namespace v8::internal |
5287 | 5287 |
5288 #endif // V8_TARGET_ARCH_ARM64 | 5288 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |