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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); | 2547 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); |
2548 break; | 2548 break; |
2549 } | 2549 } |
2550 } | 2550 } |
2551 | 2551 |
2552 // prototype | 2552 // prototype |
2553 __ CallRuntime(Runtime::kToFastProperties, 1); | 2553 __ CallRuntime(Runtime::kToFastProperties, 1); |
2554 | 2554 |
2555 // constructor | 2555 // constructor |
2556 __ CallRuntime(Runtime::kToFastProperties, 1); | 2556 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 2557 |
| 2558 if (is_strong(language_mode())) { |
| 2559 __ mov(scratch, |
| 2560 FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset)); |
| 2561 __ push(eax); |
| 2562 __ push(scratch); |
| 2563 // TODO(conradw): It would be more efficient to define the properties with |
| 2564 // the right attributes the first time round. |
| 2565 // Freeze the prototype. |
| 2566 __ CallRuntime(Runtime::kObjectFreeze, 1); |
| 2567 // Freeze the constructor. |
| 2568 __ CallRuntime(Runtime::kObjectFreeze, 1); |
| 2569 } |
2557 } | 2570 } |
2558 | 2571 |
2559 | 2572 |
2560 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 2573 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |
2561 __ pop(edx); | 2574 __ pop(edx); |
2562 Handle<Code> code = | 2575 Handle<Code> code = |
2563 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 2576 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); |
2564 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2577 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
2565 CallIC(code, expr->BinaryOperationFeedbackId()); | 2578 CallIC(code, expr->BinaryOperationFeedbackId()); |
2566 patch_site.EmitPatchInfo(); | 2579 patch_site.EmitPatchInfo(); |
(...skipping 2913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5480 Assembler::target_address_at(call_target_address, | 5493 Assembler::target_address_at(call_target_address, |
5481 unoptimized_code)); | 5494 unoptimized_code)); |
5482 return OSR_AFTER_STACK_CHECK; | 5495 return OSR_AFTER_STACK_CHECK; |
5483 } | 5496 } |
5484 | 5497 |
5485 | 5498 |
5486 } // namespace internal | 5499 } // namespace internal |
5487 } // namespace v8 | 5500 } // namespace v8 |
5488 | 5501 |
5489 #endif // V8_TARGET_ARCH_X87 | 5502 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |