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

Side by Side Diff: src/x64/full-codegen-x64.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/ppc/full-codegen-ppc.cc ('k') | src/x87/full-codegen-x87.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_X64 7 #if V8_TARGET_ARCH_X64
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 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 default: 2560 default:
2561 UNREACHABLE(); 2561 UNREACHABLE();
2562 } 2562 }
2563 } 2563 }
2564 2564
2565 // prototype 2565 // prototype
2566 __ CallRuntime(Runtime::kToFastProperties, 1); 2566 __ CallRuntime(Runtime::kToFastProperties, 1);
2567 2567
2568 // constructor 2568 // constructor
2569 __ CallRuntime(Runtime::kToFastProperties, 1); 2569 __ CallRuntime(Runtime::kToFastProperties, 1);
2570
2571 if (is_strong(language_mode())) {
2572 __ movp(scratch,
2573 FieldOperand(rax, JSFunction::kPrototypeOrInitialMapOffset));
2574 __ Push(rax);
2575 __ Push(scratch);
2576 // TODO(conradw): It would be more efficient to define the properties with
2577 // the right attributes the first time round.
2578 // Freeze the prototype.
2579 __ CallRuntime(Runtime::kObjectFreeze, 1);
2580 // Freeze the constructor.
2581 __ CallRuntime(Runtime::kObjectFreeze, 1);
2582 }
2570 } 2583 }
2571 2584
2572 2585
2573 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { 2586 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
2574 __ Pop(rdx); 2587 __ Pop(rdx);
2575 Handle<Code> code = 2588 Handle<Code> code =
2576 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2589 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2577 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2590 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2578 CallIC(code, expr->BinaryOperationFeedbackId()); 2591 CallIC(code, expr->BinaryOperationFeedbackId());
2579 patch_site.EmitPatchInfo(); 2592 patch_site.EmitPatchInfo();
(...skipping 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after
5516 Assembler::target_address_at(call_target_address, 5529 Assembler::target_address_at(call_target_address,
5517 unoptimized_code)); 5530 unoptimized_code));
5518 return OSR_AFTER_STACK_CHECK; 5531 return OSR_AFTER_STACK_CHECK;
5519 } 5532 }
5520 5533
5521 5534
5522 } // namespace internal 5535 } // namespace internal
5523 } // namespace v8 5536 } // namespace v8
5524 5537
5525 #endif // V8_TARGET_ARCH_X64 5538 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698