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

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

Issue 21244003: MIPS: Fix flaky mjsunit/harmony/generators-iteration test failure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months 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 | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 context()->Plug(result_register()); 2227 context()->Plug(result_register());
2228 } 2228 }
2229 2229
2230 2230
2231 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { 2231 void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
2232 Label gc_required; 2232 Label gc_required;
2233 Label allocated; 2233 Label allocated;
2234 2234
2235 Handle<Map> map(isolate()->native_context()->generator_result_map()); 2235 Handle<Map> map(isolate()->native_context()->generator_result_map());
2236 2236
2237 __ Allocate(map->instance_size(), a0, a2, a3, &gc_required, TAG_OBJECT); 2237 __ Allocate(map->instance_size(), v0, a2, a3, &gc_required, TAG_OBJECT);
2238 __ jmp(&allocated); 2238 __ jmp(&allocated);
2239 2239
2240 __ bind(&gc_required); 2240 __ bind(&gc_required);
2241 __ Push(Smi::FromInt(map->instance_size())); 2241 __ Push(Smi::FromInt(map->instance_size()));
2242 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); 2242 __ CallRuntime(Runtime::kAllocateInNewSpace, 1);
2243 __ lw(context_register(), 2243 __ lw(context_register(),
2244 MemOperand(fp, StandardFrameConstants::kContextOffset)); 2244 MemOperand(fp, StandardFrameConstants::kContextOffset));
2245 2245
2246 __ bind(&allocated); 2246 __ bind(&allocated);
2247 __ li(a1, Operand(map)); 2247 __ li(a1, Operand(map));
2248 __ pop(a2); 2248 __ pop(a2);
2249 __ li(a3, Operand(isolate()->factory()->ToBoolean(done))); 2249 __ li(a3, Operand(isolate()->factory()->ToBoolean(done)));
2250 __ li(t0, Operand(isolate()->factory()->empty_fixed_array())); 2250 __ li(t0, Operand(isolate()->factory()->empty_fixed_array()));
2251 ASSERT_EQ(map->instance_size(), 5 * kPointerSize); 2251 ASSERT_EQ(map->instance_size(), 5 * kPointerSize);
2252 __ sw(a1, FieldMemOperand(a0, HeapObject::kMapOffset)); 2252 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
2253 __ sw(t0, FieldMemOperand(a0, JSObject::kPropertiesOffset)); 2253 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset));
2254 __ sw(t0, FieldMemOperand(a0, JSObject::kElementsOffset)); 2254 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
2255 __ sw(a2, 2255 __ sw(a2,
2256 FieldMemOperand(a0, JSGeneratorObject::kResultValuePropertyOffset)); 2256 FieldMemOperand(v0, JSGeneratorObject::kResultValuePropertyOffset));
2257 __ sw(a3, 2257 __ sw(a3,
2258 FieldMemOperand(a0, JSGeneratorObject::kResultDonePropertyOffset)); 2258 FieldMemOperand(v0, JSGeneratorObject::kResultDonePropertyOffset));
2259 2259
2260 // Only the value field needs a write barrier, as the other values are in the 2260 // Only the value field needs a write barrier, as the other values are in the
2261 // root set. 2261 // root set.
2262 __ RecordWriteField(a0, JSGeneratorObject::kResultValuePropertyOffset, 2262 __ RecordWriteField(v0, JSGeneratorObject::kResultValuePropertyOffset,
2263 a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); 2263 a2, a3, kRAHasBeenSaved, kDontSaveFPRegs);
2264 __ mov(result_register(), a0);
2265 } 2264 }
2266 2265
2267 2266
2268 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 2267 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
2269 SetSourcePosition(prop->position()); 2268 SetSourcePosition(prop->position());
2270 Literal* key = prop->key()->AsLiteral(); 2269 Literal* key = prop->key()->AsLiteral();
2271 __ mov(a0, result_register()); 2270 __ mov(a0, result_register());
2272 __ li(a2, Operand(key->value())); 2271 __ li(a2, Operand(key->value()));
2273 // Call load IC. It has arguments receiver and property name a0 and a2. 2272 // Call load IC. It has arguments receiver and property name a0 and a2.
2274 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 2273 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
4948 *context_length = 0; 4947 *context_length = 0;
4949 return previous_; 4948 return previous_;
4950 } 4949 }
4951 4950
4952 4951
4953 #undef __ 4952 #undef __
4954 4953
4955 } } // namespace v8::internal 4954 } } // namespace v8::internal
4956 4955
4957 #endif // V8_TARGET_ARCH_MIPS 4956 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698