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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/arm64/full-codegen-arm64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM 7 #if V8_TARGET_ARCH_ARM
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 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 default: 2651 default:
2652 UNREACHABLE(); 2652 UNREACHABLE();
2653 } 2653 }
2654 } 2654 }
2655 2655
2656 // prototype 2656 // prototype
2657 __ CallRuntime(Runtime::kToFastProperties, 1); 2657 __ CallRuntime(Runtime::kToFastProperties, 1);
2658 2658
2659 // constructor 2659 // constructor
2660 __ CallRuntime(Runtime::kToFastProperties, 1); 2660 __ CallRuntime(Runtime::kToFastProperties, 1);
2661
2662 if (is_strong(language_mode())) {
2663 __ ldr(scratch,
2664 FieldMemOperand(r0, JSFunction::kPrototypeOrInitialMapOffset));
2665 __ push(r0);
2666 __ push(scratch);
2667 // TODO(conradw): It would be more efficient to define the properties with
2668 // the right attributes the first time round.
2669 // Freeze the prototype.
2670 __ CallRuntime(Runtime::kObjectFreeze, 1);
2671 // Freeze the constructor.
2672 __ CallRuntime(Runtime::kObjectFreeze, 1);
2673 }
2661 } 2674 }
2662 2675
2663 2676
2664 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { 2677 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
2665 __ pop(r1); 2678 __ pop(r1);
2666 Handle<Code> code = 2679 Handle<Code> code =
2667 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2680 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2668 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2681 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2669 CallIC(code, expr->BinaryOperationFeedbackId()); 2682 CallIC(code, expr->BinaryOperationFeedbackId());
2670 patch_site.EmitPatchInfo(); 2683 patch_site.EmitPatchInfo();
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after
5623 DCHECK(interrupt_address == 5636 DCHECK(interrupt_address ==
5624 isolate->builtins()->OsrAfterStackCheck()->entry()); 5637 isolate->builtins()->OsrAfterStackCheck()->entry());
5625 return OSR_AFTER_STACK_CHECK; 5638 return OSR_AFTER_STACK_CHECK;
5626 } 5639 }
5627 5640
5628 5641
5629 } // namespace internal 5642 } // namespace internal
5630 } // namespace v8 5643 } // namespace v8
5631 5644
5632 #endif // V8_TARGET_ARCH_ARM 5645 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698