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

Side by Side Diff: src/ppc/full-codegen-ppc.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/mips64/full-codegen-mips64.cc ('k') | src/x64/full-codegen-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
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 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 default: 2659 default:
2660 UNREACHABLE(); 2660 UNREACHABLE();
2661 } 2661 }
2662 } 2662 }
2663 2663
2664 // prototype 2664 // prototype
2665 __ CallRuntime(Runtime::kToFastProperties, 1); 2665 __ CallRuntime(Runtime::kToFastProperties, 1);
2666 2666
2667 // constructor 2667 // constructor
2668 __ CallRuntime(Runtime::kToFastProperties, 1); 2668 __ CallRuntime(Runtime::kToFastProperties, 1);
2669
2670 if (is_strong(language_mode())) {
2671 __ LoadP(scratch,
2672 FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset));
2673 __ Push(r3, scratch);
2674 // TODO(conradw): It would be more efficient to define the properties with
2675 // the right attributes the first time round.
2676 // Freeze the prototype.
2677 __ CallRuntime(Runtime::kObjectFreeze, 1);
2678 // Freeze the constructor.
2679 __ CallRuntime(Runtime::kObjectFreeze, 1);
2680 }
2669 } 2681 }
2670 2682
2671 2683
2672 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { 2684 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
2673 __ pop(r4); 2685 __ pop(r4);
2674 Handle<Code> code = 2686 Handle<Code> code =
2675 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2687 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2676 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2688 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2677 CallIC(code, expr->BinaryOperationFeedbackId()); 2689 CallIC(code, expr->BinaryOperationFeedbackId());
2678 patch_site.EmitPatchInfo(); 2690 patch_site.EmitPatchInfo();
(...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after
5580 return ON_STACK_REPLACEMENT; 5592 return ON_STACK_REPLACEMENT;
5581 } 5593 }
5582 5594
5583 DCHECK(interrupt_address == 5595 DCHECK(interrupt_address ==
5584 isolate->builtins()->OsrAfterStackCheck()->entry()); 5596 isolate->builtins()->OsrAfterStackCheck()->entry());
5585 return OSR_AFTER_STACK_CHECK; 5597 return OSR_AFTER_STACK_CHECK;
5586 } 5598 }
5587 } // namespace internal 5599 } // namespace internal
5588 } // namespace v8 5600 } // namespace v8
5589 #endif // V8_TARGET_ARCH_PPC 5601 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698