| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 __ movp(FieldOperand(rax, JSObject::kPropertiesOffset), rbx); | 2010 __ movp(FieldOperand(rax, JSObject::kPropertiesOffset), rbx); |
| 2011 __ movp(FieldOperand(rax, JSObject::kElementsOffset), rbx); | 2011 __ movp(FieldOperand(rax, JSObject::kElementsOffset), rbx); |
| 2012 __ Pop(FieldOperand(rax, JSIteratorResult::kValueOffset)); | 2012 __ Pop(FieldOperand(rax, JSIteratorResult::kValueOffset)); |
| 2013 __ LoadRoot(FieldOperand(rax, JSIteratorResult::kDoneOffset), | 2013 __ LoadRoot(FieldOperand(rax, JSIteratorResult::kDoneOffset), |
| 2014 done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); | 2014 done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); |
| 2015 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 2015 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
| 2016 OperandStackDepthDecrement(1); | 2016 OperandStackDepthDecrement(1); |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 | 2019 |
| 2020 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | |
| 2021 SetExpressionPosition(prop); | |
| 2022 Literal* key = prop->key()->AsLiteral(); | |
| 2023 DCHECK(!key->value()->IsSmi()); | |
| 2024 DCHECK(!prop->IsSuperAccess()); | |
| 2025 | |
| 2026 __ Move(LoadDescriptor::NameRegister(), key->value()); | |
| 2027 __ Move(LoadDescriptor::SlotRegister(), | |
| 2028 SmiFromSlot(prop->PropertyFeedbackSlot())); | |
| 2029 CallLoadIC(NOT_INSIDE_TYPEOF); | |
| 2030 } | |
| 2031 | |
| 2032 | |
| 2033 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, | 2020 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
| 2034 Token::Value op, | 2021 Token::Value op, |
| 2035 Expression* left, | 2022 Expression* left, |
| 2036 Expression* right) { | 2023 Expression* right) { |
| 2037 // Do combined smi check of the operands. Left operand is on the | 2024 // Do combined smi check of the operands. Left operand is on the |
| 2038 // stack (popped into rdx). Right operand is in rax but moved into | 2025 // stack (popped into rdx). Right operand is in rax but moved into |
| 2039 // rcx to make the shifts easier. | 2026 // rcx to make the shifts easier. |
| 2040 Label done, stub_call, smi_case; | 2027 Label done, stub_call, smi_case; |
| 2041 PopOperand(rdx); | 2028 PopOperand(rdx); |
| 2042 __ movp(rcx, rax); | 2029 __ movp(rcx, rax); |
| (...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4120 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4107 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4121 Assembler::target_address_at(call_target_address, | 4108 Assembler::target_address_at(call_target_address, |
| 4122 unoptimized_code)); | 4109 unoptimized_code)); |
| 4123 return OSR_AFTER_STACK_CHECK; | 4110 return OSR_AFTER_STACK_CHECK; |
| 4124 } | 4111 } |
| 4125 | 4112 |
| 4126 } // namespace internal | 4113 } // namespace internal |
| 4127 } // namespace v8 | 4114 } // namespace v8 |
| 4128 | 4115 |
| 4129 #endif // V8_TARGET_ARCH_X64 | 4116 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |