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

Side by Side Diff: src/mips/full-codegen-mips.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 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 default: 2636 default:
2637 UNREACHABLE(); 2637 UNREACHABLE();
2638 } 2638 }
2639 } 2639 }
2640 2640
2641 // prototype 2641 // prototype
2642 __ CallRuntime(Runtime::kToFastProperties, 1); 2642 __ CallRuntime(Runtime::kToFastProperties, 1);
2643 2643
2644 // constructor 2644 // constructor
2645 __ CallRuntime(Runtime::kToFastProperties, 1); 2645 __ CallRuntime(Runtime::kToFastProperties, 1);
2646
2647 if (is_strong(language_mode())) {
2648 __ lw(scratch,
2649 FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset));
2650 __ Push(v0, scratch);
2651 __ CallRuntime(Runtime::kObjectFreeze, 1);
2652 // TODO(conradw): It would be more efficient to define the properties with
2653 // the right attributes the first time round.
2654 __ CallRuntime(Runtime::kObjectFreeze, 1);
2655 }
2646 } 2656 }
2647 2657
2648 2658
2649 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { 2659 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
2650 __ mov(a0, result_register()); 2660 __ mov(a0, result_register());
2651 __ pop(a1); 2661 __ pop(a1);
2652 Handle<Code> code = 2662 Handle<Code> code =
2653 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2663 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2654 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2664 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2655 CallIC(code, expr->BinaryOperationFeedbackId()); 2665 CallIC(code, expr->BinaryOperationFeedbackId());
(...skipping 2925 matching lines...) Expand 10 before | Expand all | Expand 10 after
5581 reinterpret_cast<uint32_t>( 5591 reinterpret_cast<uint32_t>(
5582 isolate->builtins()->OsrAfterStackCheck()->entry())); 5592 isolate->builtins()->OsrAfterStackCheck()->entry()));
5583 return OSR_AFTER_STACK_CHECK; 5593 return OSR_AFTER_STACK_CHECK;
5584 } 5594 }
5585 5595
5586 5596
5587 } // namespace internal 5597 } // namespace internal
5588 } // namespace v8 5598 } // namespace v8
5589 5599
5590 #endif // V8_TARGET_ARCH_MIPS 5600 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698