Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 691563002: MIPS: EmitCreateIteratorResult loads map from function's context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 2301
2302 __ bind(&done); 2302 __ bind(&done);
2303 context()->Plug(result_register()); 2303 context()->Plug(result_register());
2304 } 2304 }
2305 2305
2306 2306
2307 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { 2307 void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
2308 Label gc_required; 2308 Label gc_required;
2309 Label allocated; 2309 Label allocated;
2310 2310
2311 Handle<Map> map(isolate()->native_context()->iterator_result_map()); 2311 const int instance_size = 5 * kPointerSize;
2312 DCHECK_EQ(isolate()->native_context()->iterator_result_map()->instance_size(),
2313 instance_size);
2312 2314
2313 __ Allocate(map->instance_size(), v0, a2, a3, &gc_required, TAG_OBJECT); 2315 __ Allocate(instance_size, v0, a2, a3, &gc_required, TAG_OBJECT);
2314 __ jmp(&allocated); 2316 __ jmp(&allocated);
2315 2317
2316 __ bind(&gc_required); 2318 __ bind(&gc_required);
2317 __ Push(Smi::FromInt(map->instance_size())); 2319 __ Push(Smi::FromInt(instance_size));
2318 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); 2320 __ CallRuntime(Runtime::kAllocateInNewSpace, 1);
2319 __ lw(context_register(), 2321 __ lw(context_register(),
2320 MemOperand(fp, StandardFrameConstants::kContextOffset)); 2322 MemOperand(fp, StandardFrameConstants::kContextOffset));
2321 2323
2322 __ bind(&allocated); 2324 __ bind(&allocated);
2323 __ li(a1, Operand(map)); 2325 __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
2326 __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset));
2327 __ lw(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX));
2324 __ pop(a2); 2328 __ pop(a2);
2325 __ li(a3, Operand(isolate()->factory()->ToBoolean(done))); 2329 __ li(a3, Operand(isolate()->factory()->ToBoolean(done)));
2326 __ li(t0, Operand(isolate()->factory()->empty_fixed_array())); 2330 __ li(t0, Operand(isolate()->factory()->empty_fixed_array()));
2327 DCHECK_EQ(map->instance_size(), 5 * kPointerSize);
2328 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); 2331 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
2329 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); 2332 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset));
2330 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); 2333 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
2331 __ sw(a2, 2334 __ sw(a2,
2332 FieldMemOperand(v0, JSGeneratorObject::kResultValuePropertyOffset)); 2335 FieldMemOperand(v0, JSGeneratorObject::kResultValuePropertyOffset));
2333 __ sw(a3, 2336 __ sw(a3,
2334 FieldMemOperand(v0, JSGeneratorObject::kResultDonePropertyOffset)); 2337 FieldMemOperand(v0, JSGeneratorObject::kResultDonePropertyOffset));
2335 2338
2336 // Only the value field needs a write barrier, as the other values are in the 2339 // Only the value field needs a write barrier, as the other values are in the
2337 // root set. 2340 // root set.
(...skipping 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after
5276 Assembler::target_address_at(pc_immediate_load_address)) == 5279 Assembler::target_address_at(pc_immediate_load_address)) ==
5277 reinterpret_cast<uint32_t>( 5280 reinterpret_cast<uint32_t>(
5278 isolate->builtins()->OsrAfterStackCheck()->entry())); 5281 isolate->builtins()->OsrAfterStackCheck()->entry()));
5279 return OSR_AFTER_STACK_CHECK; 5282 return OSR_AFTER_STACK_CHECK;
5280 } 5283 }
5281 5284
5282 5285
5283 } } // namespace v8::internal 5286 } } // namespace v8::internal
5284 5287
5285 #endif // V8_TARGET_ARCH_MIPS 5288 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698