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

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: 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
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 __ CallRuntime(Runtime::kObjectFreeze, 1);
2675 // TODO(conradw): It would be more efficient to define the properties with
2676 // the right attributes the first time round.
2677 __ CallRuntime(Runtime::kObjectFreeze, 1);
2678 }
2669 } 2679 }
2670 2680
2671 2681
2672 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { 2682 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
2673 __ pop(r4); 2683 __ pop(r4);
2674 Handle<Code> code = 2684 Handle<Code> code =
2675 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2685 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2676 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2686 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2677 CallIC(code, expr->BinaryOperationFeedbackId()); 2687 CallIC(code, expr->BinaryOperationFeedbackId());
2678 patch_site.EmitPatchInfo(); 2688 patch_site.EmitPatchInfo();
(...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after
5580 return ON_STACK_REPLACEMENT; 5590 return ON_STACK_REPLACEMENT;
5581 } 5591 }
5582 5592
5583 DCHECK(interrupt_address == 5593 DCHECK(interrupt_address ==
5584 isolate->builtins()->OsrAfterStackCheck()->entry()); 5594 isolate->builtins()->OsrAfterStackCheck()->entry());
5585 return OSR_AFTER_STACK_CHECK; 5595 return OSR_AFTER_STACK_CHECK;
5586 } 5596 }
5587 } // namespace internal 5597 } // namespace internal
5588 } // namespace v8 5598 } // namespace v8
5589 #endif // V8_TARGET_ARCH_PPC 5599 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698