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