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

Side by Side Diff: src/arm64/full-codegen-arm64.cc

Issue 985643003: [es6] Throw TypeError for computed static prototype property name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Inline BuildThrowStaticPrototype Created 5 years, 9 months 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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 ObjectLiteral::Property* property = lit->properties()->at(i); 2271 ObjectLiteral::Property* property = lit->properties()->at(i);
2272 Expression* value = property->value(); 2272 Expression* value = property->value();
2273 2273
2274 if (property->is_static()) { 2274 if (property->is_static()) {
2275 __ Peek(scratch, kPointerSize); // constructor 2275 __ Peek(scratch, kPointerSize); // constructor
2276 } else { 2276 } else {
2277 __ Peek(scratch, 0); // prototype 2277 __ Peek(scratch, 0); // prototype
2278 } 2278 }
2279 __ Push(scratch); 2279 __ Push(scratch);
2280 EmitPropertyKey(property, lit->GetIdForProperty(i)); 2280 EmitPropertyKey(property, lit->GetIdForProperty(i));
2281
2282 // The static prototype property is read only. We handle the non computed
2283 // property name case in the parser. Since this is the only case where we
2284 // need to check for an own read only property we special case this so we do
2285 // not need to do this for every property.
2286 if (property->is_static() && property->is_computed_name()) {
2287 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
2288 __ Push(x0);
2289 }
2290
2281 VisitForStackValue(value); 2291 VisitForStackValue(value);
2282 EmitSetHomeObjectIfNeeded(value, 2); 2292 EmitSetHomeObjectIfNeeded(value, 2);
2283 2293
2284 switch (property->kind()) { 2294 switch (property->kind()) {
2285 case ObjectLiteral::Property::CONSTANT: 2295 case ObjectLiteral::Property::CONSTANT:
2286 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2296 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2287 case ObjectLiteral::Property::PROTOTYPE: 2297 case ObjectLiteral::Property::PROTOTYPE:
2288 UNREACHABLE(); 2298 UNREACHABLE();
2289 case ObjectLiteral::Property::COMPUTED: 2299 case ObjectLiteral::Property::COMPUTED:
2290 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2300 __ CallRuntime(Runtime::kDefineClassMethod, 3);
(...skipping 3214 matching lines...) Expand 10 before | Expand all | Expand 10 after
5505 return previous_; 5515 return previous_;
5506 } 5516 }
5507 5517
5508 5518
5509 #undef __ 5519 #undef __
5510 5520
5511 5521
5512 } } // namespace v8::internal 5522 } } // namespace v8::internal
5513 5523
5514 #endif // V8_TARGET_ARCH_ARM64 5524 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698