| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS | 
| 6 | 6 | 
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: | 
| 8 // | 8 // | 
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined | 
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first | 
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 134   // MANUAL indicates that the scope shouldn't actually generate code to set up | 134   // MANUAL indicates that the scope shouldn't actually generate code to set up | 
| 135   // the frame (that is done below). | 135   // the frame (that is done below). | 
| 136   FrameScope frame_scope(masm_, StackFrame::MANUAL); | 136   FrameScope frame_scope(masm_, StackFrame::MANUAL); | 
| 137 | 137 | 
| 138   info->set_prologue_offset(masm_->pc_offset()); | 138   info->set_prologue_offset(masm_->pc_offset()); | 
| 139   __ Prologue(info->GeneratePreagedPrologue()); | 139   __ Prologue(info->GeneratePreagedPrologue()); | 
| 140 | 140 | 
| 141   // Increment invocation count for the function. | 141   // Increment invocation count for the function. | 
| 142   { | 142   { | 
| 143     Comment cmnt(masm_, "[ Increment invocation count"); | 143     Comment cmnt(masm_, "[ Increment invocation count"); | 
| 144     __ lw(a0, FieldMemOperand(a1, JSFunction::kLiteralsOffset)); | 144     __ lw(a0, FieldMemOperand(a1, JSFunction::kFeedbackVectorOffset)); | 
| 145     __ lw(a0, FieldMemOperand(a0, LiteralsArray::kFeedbackVectorOffset)); |  | 
| 146     __ lw(t0, FieldMemOperand( | 145     __ lw(t0, FieldMemOperand( | 
| 147                   a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 146                   a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 
| 148                           TypeFeedbackVector::kHeaderSize)); | 147                           TypeFeedbackVector::kHeaderSize)); | 
| 149     __ Addu(t0, t0, Operand(Smi::FromInt(1))); | 148     __ Addu(t0, t0, Operand(Smi::FromInt(1))); | 
| 150     __ sw(t0, FieldMemOperand( | 149     __ sw(t0, FieldMemOperand( | 
| 151                   a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 150                   a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 
| 152                           TypeFeedbackVector::kHeaderSize)); | 151                           TypeFeedbackVector::kHeaderSize)); | 
| 153   } | 152   } | 
| 154 | 153 | 
| 155   { Comment cmnt(masm_, "[ Allocate locals"); | 154   { Comment cmnt(masm_, "[ Allocate locals"); | 
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1209   } | 1208   } | 
| 1210 } | 1209 } | 
| 1211 | 1210 | 
| 1212 | 1211 | 
| 1213 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1212 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 
| 1214   Comment cmnt(masm_, "[ ObjectLiteral"); | 1213   Comment cmnt(masm_, "[ ObjectLiteral"); | 
| 1215 | 1214 | 
| 1216   Handle<FixedArray> constant_properties = | 1215   Handle<FixedArray> constant_properties = | 
| 1217       expr->GetOrBuildConstantProperties(isolate()); | 1216       expr->GetOrBuildConstantProperties(isolate()); | 
| 1218   __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1217   __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 
| 1219   __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1218   __ li(a2, Operand(SmiFromSlot(expr->literal_slot()))); | 
| 1220   __ li(a1, Operand(constant_properties)); | 1219   __ li(a1, Operand(constant_properties)); | 
| 1221   __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1220   __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 
| 1222   if (MustCreateObjectLiteralWithRuntime(expr)) { | 1221   if (MustCreateObjectLiteralWithRuntime(expr)) { | 
| 1223     __ Push(a3, a2, a1, a0); | 1222     __ Push(a3, a2, a1, a0); | 
| 1224     __ CallRuntime(Runtime::kCreateObjectLiteral); | 1223     __ CallRuntime(Runtime::kCreateObjectLiteral); | 
| 1225   } else { | 1224   } else { | 
| 1226     Callable callable = CodeFactory::FastCloneShallowObject( | 1225     Callable callable = CodeFactory::FastCloneShallowObject( | 
| 1227         isolate(), expr->properties_count()); | 1226         isolate(), expr->properties_count()); | 
| 1228     __ Call(callable.code(), RelocInfo::CODE_TARGET); | 1227     __ Call(callable.code(), RelocInfo::CODE_TARGET); | 
| 1229     RestoreContext(); | 1228     RestoreContext(); | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1351 | 1350 | 
| 1352   AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1351   AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 
| 1353   if (has_fast_elements && !FLAG_allocation_site_pretenuring) { | 1352   if (has_fast_elements && !FLAG_allocation_site_pretenuring) { | 
| 1354     // If the only customer of allocation sites is transitioning, then | 1353     // If the only customer of allocation sites is transitioning, then | 
| 1355     // we can turn it off if we don't have anywhere else to transition to. | 1354     // we can turn it off if we don't have anywhere else to transition to. | 
| 1356     allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1355     allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 
| 1357   } | 1356   } | 
| 1358 | 1357 | 
| 1359   __ mov(a0, result_register()); | 1358   __ mov(a0, result_register()); | 
| 1360   __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1359   __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 
| 1361   __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1360   __ li(a2, Operand(SmiFromSlot(expr->literal_slot()))); | 
| 1362   __ li(a1, Operand(constant_elements)); | 1361   __ li(a1, Operand(constant_elements)); | 
| 1363   if (MustCreateArrayLiteralWithRuntime(expr)) { | 1362   if (MustCreateArrayLiteralWithRuntime(expr)) { | 
| 1364     __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1363     __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 
| 1365     __ Push(a3, a2, a1, a0); | 1364     __ Push(a3, a2, a1, a0); | 
| 1366     __ CallRuntime(Runtime::kCreateArrayLiteral); | 1365     __ CallRuntime(Runtime::kCreateArrayLiteral); | 
| 1367   } else { | 1366   } else { | 
| 1368     Callable callable = | 1367     Callable callable = | 
| 1369         CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); | 1368         CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); | 
| 1370     __ Call(callable.code(), RelocInfo::CODE_TARGET); | 1369     __ Call(callable.code(), RelocInfo::CODE_TARGET); | 
| 1371     RestoreContext(); | 1370     RestoreContext(); | 
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2869          reinterpret_cast<uint32_t>( | 2868          reinterpret_cast<uint32_t>( | 
| 2870              isolate->builtins()->OnStackReplacement()->entry())); | 2869              isolate->builtins()->OnStackReplacement()->entry())); | 
| 2871   return ON_STACK_REPLACEMENT; | 2870   return ON_STACK_REPLACEMENT; | 
| 2872 } | 2871 } | 
| 2873 | 2872 | 
| 2874 | 2873 | 
| 2875 }  // namespace internal | 2874 }  // namespace internal | 
| 2876 }  // namespace v8 | 2875 }  // namespace v8 | 
| 2877 | 2876 | 
| 2878 #endif  // V8_TARGET_ARCH_MIPS | 2877 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW | 
|---|