OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // the frame (that is done below). | 130 // the frame (that is done below). |
131 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 131 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
132 int prologue_offset = masm_->pc_offset(); | 132 int prologue_offset = masm_->pc_offset(); |
133 | 133 |
134 info->set_prologue_offset(prologue_offset); | 134 info->set_prologue_offset(prologue_offset); |
135 __ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset); | 135 __ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset); |
136 | 136 |
137 // Increment invocation count for the function. | 137 // Increment invocation count for the function. |
138 { | 138 { |
139 Comment cmnt(masm_, "[ Increment invocation count"); | 139 Comment cmnt(masm_, "[ Increment invocation count"); |
140 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); | 140 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kFeedbackVectorOffset)); |
141 __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset)); | |
142 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * | 141 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * |
143 kPointerSize + | 142 kPointerSize + |
144 TypeFeedbackVector::kHeaderSize)); | 143 TypeFeedbackVector::kHeaderSize)); |
145 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); | 144 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); |
146 __ StoreP(r1, | 145 __ StoreP(r1, |
147 FieldMemOperand( | 146 FieldMemOperand( |
148 r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 147 r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
149 TypeFeedbackVector::kHeaderSize)); | 148 TypeFeedbackVector::kHeaderSize)); |
150 } | 149 } |
151 | 150 |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 } | 1142 } |
1144 } | 1143 } |
1145 } | 1144 } |
1146 | 1145 |
1147 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1146 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
1148 Comment cmnt(masm_, "[ ObjectLiteral"); | 1147 Comment cmnt(masm_, "[ ObjectLiteral"); |
1149 | 1148 |
1150 Handle<BoilerplateDescription> constant_properties = | 1149 Handle<BoilerplateDescription> constant_properties = |
1151 expr->GetOrBuildConstantProperties(isolate()); | 1150 expr->GetOrBuildConstantProperties(isolate()); |
1152 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1151 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1153 __ LoadSmiLiteral(r4, Smi::FromInt(expr->literal_index())); | 1152 __ LoadSmiLiteral(r4, SmiFromSlot(expr->literal_slot())); |
1154 __ mov(r3, Operand(constant_properties)); | 1153 __ mov(r3, Operand(constant_properties)); |
1155 int flags = expr->ComputeFlags(); | 1154 int flags = expr->ComputeFlags(); |
1156 __ LoadSmiLiteral(r2, Smi::FromInt(flags)); | 1155 __ LoadSmiLiteral(r2, Smi::FromInt(flags)); |
1157 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1156 if (MustCreateObjectLiteralWithRuntime(expr)) { |
1158 __ Push(r5, r4, r3, r2); | 1157 __ Push(r5, r4, r3, r2); |
1159 __ CallRuntime(Runtime::kCreateObjectLiteral); | 1158 __ CallRuntime(Runtime::kCreateObjectLiteral); |
1160 } else { | 1159 } else { |
1161 Callable callable = CodeFactory::FastCloneShallowObject( | 1160 Callable callable = CodeFactory::FastCloneShallowObject( |
1162 isolate(), expr->properties_count()); | 1161 isolate(), expr->properties_count()); |
1163 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 1162 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 IsFastObjectElementsKind(expr->constant_elements_kind()); | 1281 IsFastObjectElementsKind(expr->constant_elements_kind()); |
1283 | 1282 |
1284 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1283 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; |
1285 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { | 1284 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { |
1286 // If the only customer of allocation sites is transitioning, then | 1285 // If the only customer of allocation sites is transitioning, then |
1287 // we can turn it off if we don't have anywhere else to transition to. | 1286 // we can turn it off if we don't have anywhere else to transition to. |
1288 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1287 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
1289 } | 1288 } |
1290 | 1289 |
1291 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1290 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1292 __ LoadSmiLiteral(r4, Smi::FromInt(expr->literal_index())); | 1291 __ LoadSmiLiteral(r4, SmiFromSlot(expr->literal_slot())); |
1293 __ mov(r3, Operand(constant_elements)); | 1292 __ mov(r3, Operand(constant_elements)); |
1294 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1293 if (MustCreateArrayLiteralWithRuntime(expr)) { |
1295 __ LoadSmiLiteral(r2, Smi::FromInt(expr->ComputeFlags())); | 1294 __ LoadSmiLiteral(r2, Smi::FromInt(expr->ComputeFlags())); |
1296 __ Push(r5, r4, r3, r2); | 1295 __ Push(r5, r4, r3, r2); |
1297 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1296 __ CallRuntime(Runtime::kCreateArrayLiteral); |
1298 } else { | 1297 } else { |
1299 Callable callable = | 1298 Callable callable = |
1300 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); | 1299 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); |
1301 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 1300 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
1302 RestoreContext(); | 1301 RestoreContext(); |
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2785 USE(kOSRBranchInstruction); | 2784 USE(kOSRBranchInstruction); |
2786 DCHECK(kOSRBranchInstruction == br_instr); | 2785 DCHECK(kOSRBranchInstruction == br_instr); |
2787 | 2786 |
2788 DCHECK(interrupt_address == | 2787 DCHECK(interrupt_address == |
2789 isolate->builtins()->OnStackReplacement()->entry()); | 2788 isolate->builtins()->OnStackReplacement()->entry()); |
2790 return ON_STACK_REPLACEMENT; | 2789 return ON_STACK_REPLACEMENT; |
2791 } | 2790 } |
2792 } // namespace internal | 2791 } // namespace internal |
2793 } // namespace v8 | 2792 } // namespace v8 |
2794 #endif // V8_TARGET_ARCH_S390 | 2793 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |