OLD | NEW |
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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); | 2557 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); |
2558 break; | 2558 break; |
2559 } | 2559 } |
2560 } | 2560 } |
2561 | 2561 |
2562 // prototype | 2562 // prototype |
2563 __ CallRuntime(Runtime::kToFastProperties, 1); | 2563 __ CallRuntime(Runtime::kToFastProperties, 1); |
2564 | 2564 |
2565 // constructor | 2565 // constructor |
2566 __ CallRuntime(Runtime::kToFastProperties, 1); | 2566 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 2567 |
| 2568 if (is_strong(language_mode())) { |
| 2569 __ mov(scratch, |
| 2570 FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset)); |
| 2571 __ push(eax); |
| 2572 __ Push(scratch); |
| 2573 __ CallRuntime(Runtime::kObjectFreeze, 1); |
| 2574 // TODO(conradw): It would be more efficient to define the properties with |
| 2575 // the right attributes the first time round. |
| 2576 __ CallRuntime(Runtime::kObjectFreeze, 1); |
| 2577 } |
2567 } | 2578 } |
2568 | 2579 |
2569 | 2580 |
2570 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 2581 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |
2571 __ pop(edx); | 2582 __ pop(edx); |
2572 Handle<Code> code = | 2583 Handle<Code> code = |
2573 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 2584 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); |
2574 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2585 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
2575 CallIC(code, expr->BinaryOperationFeedbackId()); | 2586 CallIC(code, expr->BinaryOperationFeedbackId()); |
2576 patch_site.EmitPatchInfo(); | 2587 patch_site.EmitPatchInfo(); |
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5491 Assembler::target_address_at(call_target_address, | 5502 Assembler::target_address_at(call_target_address, |
5492 unoptimized_code)); | 5503 unoptimized_code)); |
5493 return OSR_AFTER_STACK_CHECK; | 5504 return OSR_AFTER_STACK_CHECK; |
5494 } | 5505 } |
5495 | 5506 |
5496 | 5507 |
5497 } // namespace internal | 5508 } // namespace internal |
5498 } // namespace v8 | 5509 } // namespace v8 |
5499 | 5510 |
5500 #endif // V8_TARGET_ARCH_IA32 | 5511 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |