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

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

Issue 1235983002: [strong] class objects created in strong mode have their prototype frozen (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 5 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.cc » ('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 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 default: 2345 default:
2346 UNREACHABLE(); 2346 UNREACHABLE();
2347 } 2347 }
2348 } 2348 }
2349 2349
2350 // prototype 2350 // prototype
2351 __ CallRuntime(Runtime::kToFastProperties, 1); 2351 __ CallRuntime(Runtime::kToFastProperties, 1);
2352 2352
2353 // constructor 2353 // constructor
2354 __ CallRuntime(Runtime::kToFastProperties, 1); 2354 __ CallRuntime(Runtime::kToFastProperties, 1);
2355
2356 if (is_strong(language_mode())) {
2357 __ Ldr(scratch,
2358 FieldMemOperand(x0, JSFunction::kPrototypeOrInitialMapOffset));
2359 __ push(x0);
2360 __ Push(scratch);
2361 // TODO(conradw): It would be more efficient to define the properties with
2362 // the right attributes the first time round.
2363 // Freeze the prototype.
2364 __ CallRuntime(Runtime::kObjectFreeze, 1);
2365 // Freeze the constructor.
2366 __ CallRuntime(Runtime::kObjectFreeze, 1);
2367 }
2355 } 2368 }
2356 2369
2357 2370
2358 void FullCodeGenerator::EmitAssignment(Expression* expr, 2371 void FullCodeGenerator::EmitAssignment(Expression* expr,
2359 FeedbackVectorICSlot slot) { 2372 FeedbackVectorICSlot slot) {
2360 DCHECK(expr->IsValidReferenceExpression()); 2373 DCHECK(expr->IsValidReferenceExpression());
2361 2374
2362 Property* prop = expr->AsProperty(); 2375 Property* prop = expr->AsProperty();
2363 LhsKind assign_type = Property::GetAssignType(prop); 2376 LhsKind assign_type = Property::GetAssignType(prop);
2364 2377
(...skipping 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after
5602 } 5615 }
5603 5616
5604 return INTERRUPT; 5617 return INTERRUPT;
5605 } 5618 }
5606 5619
5607 5620
5608 } // namespace internal 5621 } // namespace internal
5609 } // namespace v8 5622 } // namespace v8
5610 5623
5611 #endif // V8_TARGET_ARCH_ARM64 5624 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698