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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 8111006: Allow new-space JSFunction objects as constant-function properties. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: rebased Created 9 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 Register LCodeGen::ToRegister(LOperand* op) const { 314 Register LCodeGen::ToRegister(LOperand* op) const {
315 ASSERT(op->IsRegister()); 315 ASSERT(op->IsRegister());
316 return ToRegister(op->index()); 316 return ToRegister(op->index());
317 } 317 }
318 318
319 319
320 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 320 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
321 if (op->IsRegister()) { 321 if (op->IsRegister()) {
322 return ToRegister(op->index()); 322 return ToRegister(op->index());
323 } else if (op->IsConstantOperand()) { 323 } else if (op->IsConstantOperand()) {
324 __ mov(scratch, ToOperand(op)); 324 LConstantOperand* const_op = LConstantOperand::cast(op);
325 Handle<Object> literal = chunk_->LookupLiteral(const_op);
326 Representation r = chunk_->LookupLiteralRepresentation(const_op);
327 if (r.IsInteger32()) {
328 ASSERT(literal->IsNumber());
329 __ mov(scratch, Operand(static_cast<int32_t>(literal->Number())));
330 } else if (r.IsDouble()) {
331 Abort("EmitLoadRegister: Unsupported double immediate.");
332 } else {
333 ASSERT(r.IsTagged());
334 if (literal->IsSmi()) {
335 __ mov(scratch, Operand(literal));
336 } else {
337 __ LoadHeapObject(scratch, Handle<HeapObject>::cast(literal));
338 }
339 }
325 return scratch; 340 return scratch;
326 } else if (op->IsStackSlot() || op->IsArgument()) { 341 } else if (op->IsStackSlot() || op->IsArgument()) {
327 __ ldr(scratch, ToMemOperand(op)); 342 __ ldr(scratch, ToMemOperand(op));
328 return scratch; 343 return scratch;
329 } 344 }
330 UNREACHABLE(); 345 UNREACHABLE();
331 return scratch; 346 return scratch;
332 } 347 }
333 348
334 349
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 1345
1331 void LCodeGen::DoConstantD(LConstantD* instr) { 1346 void LCodeGen::DoConstantD(LConstantD* instr) {
1332 ASSERT(instr->result()->IsDoubleRegister()); 1347 ASSERT(instr->result()->IsDoubleRegister());
1333 DwVfpRegister result = ToDoubleRegister(instr->result()); 1348 DwVfpRegister result = ToDoubleRegister(instr->result());
1334 double v = instr->value(); 1349 double v = instr->value();
1335 __ Vmov(result, v); 1350 __ Vmov(result, v);
1336 } 1351 }
1337 1352
1338 1353
1339 void LCodeGen::DoConstantT(LConstantT* instr) { 1354 void LCodeGen::DoConstantT(LConstantT* instr) {
1340 ASSERT(instr->result()->IsRegister()); 1355 Handle<Object> value = instr->value();
1341 __ mov(ToRegister(instr->result()), Operand(instr->value())); 1356 if (value->IsSmi()) {
1357 __ mov(ToRegister(instr->result()), Operand(value));
1358 } else {
1359 __ LoadHeapObject(ToRegister(instr->result()),
1360 Handle<HeapObject>::cast(value));
1361 }
1342 } 1362 }
1343 1363
1344 1364
1345 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { 1365 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) {
1346 Register result = ToRegister(instr->result()); 1366 Register result = ToRegister(instr->result());
1347 Register array = ToRegister(instr->InputAt(0)); 1367 Register array = ToRegister(instr->InputAt(0));
1348 __ ldr(result, FieldMemOperand(array, JSArray::kLengthOffset)); 1368 __ ldr(result, FieldMemOperand(array, JSArray::kLengthOffset));
1349 } 1369 }
1350 1370
1351 1371
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 flags | InstanceofStub::kReturnTrueFalseObject); 2177 flags | InstanceofStub::kReturnTrueFalseObject);
2158 InstanceofStub stub(flags); 2178 InstanceofStub stub(flags);
2159 2179
2160 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); 2180 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
2161 2181
2162 // Get the temp register reserved by the instruction. This needs to be r4 as 2182 // Get the temp register reserved by the instruction. This needs to be r4 as
2163 // its slot of the pushing of safepoint registers is used to communicate the 2183 // its slot of the pushing of safepoint registers is used to communicate the
2164 // offset to the location of the map check. 2184 // offset to the location of the map check.
2165 Register temp = ToRegister(instr->TempAt(0)); 2185 Register temp = ToRegister(instr->TempAt(0));
2166 ASSERT(temp.is(r4)); 2186 ASSERT(temp.is(r4));
2167 __ mov(InstanceofStub::right(), Operand(instr->function())); 2187 __ LoadHeapObject(InstanceofStub::right(), instr->function());
2168 static const int kAdditionalDelta = 4; 2188 static const int kAdditionalDelta = 4;
2169 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; 2189 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta;
2170 Label before_push_delta; 2190 Label before_push_delta;
2171 __ bind(&before_push_delta); 2191 __ bind(&before_push_delta);
2172 __ BlockConstPoolFor(kAdditionalDelta); 2192 __ BlockConstPoolFor(kAdditionalDelta);
2173 __ mov(temp, Operand(delta * kPointerSize)); 2193 __ mov(temp, Operand(delta * kPointerSize));
2174 __ StoreToSafepointRegisterSlot(temp, temp); 2194 __ StoreToSafepointRegisterSlot(temp, temp);
2175 CallCodeGeneric(stub.GetCode(), 2195 CallCodeGeneric(stub.GetCode(),
2176 RelocInfo::CODE_TARGET, 2196 RelocInfo::CODE_TARGET,
2177 instr, 2197 instr,
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 // Negative property indices are in-object properties, indexed 2368 // Negative property indices are in-object properties, indexed
2349 // from the end of the fixed part of the object. 2369 // from the end of the fixed part of the object.
2350 __ ldr(result, FieldMemOperand(object, offset + type->instance_size())); 2370 __ ldr(result, FieldMemOperand(object, offset + type->instance_size()));
2351 } else { 2371 } else {
2352 // Non-negative property indices are in the properties array. 2372 // Non-negative property indices are in the properties array.
2353 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 2373 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
2354 __ ldr(result, FieldMemOperand(result, offset + FixedArray::kHeaderSize)); 2374 __ ldr(result, FieldMemOperand(result, offset + FixedArray::kHeaderSize));
2355 } 2375 }
2356 } else { 2376 } else {
2357 Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*type)); 2377 Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*type));
2358 LoadHeapObject(result, Handle<HeapObject>::cast(function)); 2378 __ LoadHeapObject(result, function);
2359 } 2379 }
2360 } 2380 }
2361 2381
2362 2382
2363 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { 2383 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) {
2364 Register object = ToRegister(instr->object()); 2384 Register object = ToRegister(instr->object());
2365 Register result = ToRegister(instr->result()); 2385 Register result = ToRegister(instr->result());
2366 Register scratch = scratch0(); 2386 Register scratch = scratch0();
2367 int map_count = instr->hydrogen()->types()->length(); 2387 int map_count = instr->hydrogen()->types()->length();
2368 Handle<String> name = instr->hydrogen()->name(); 2388 Handle<String> name = instr->hydrogen()->name();
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 Abort("DoPushArgument not implemented for double type."); 2813 Abort("DoPushArgument not implemented for double type.");
2794 } else { 2814 } else {
2795 Register argument_reg = EmitLoadRegister(argument, ip); 2815 Register argument_reg = EmitLoadRegister(argument, ip);
2796 __ push(argument_reg); 2816 __ push(argument_reg);
2797 } 2817 }
2798 } 2818 }
2799 2819
2800 2820
2801 void LCodeGen::DoThisFunction(LThisFunction* instr) { 2821 void LCodeGen::DoThisFunction(LThisFunction* instr) {
2802 Register result = ToRegister(instr->result()); 2822 Register result = ToRegister(instr->result());
2803 LoadHeapObject(result, instr->hydrogen()->closure()); 2823 __ LoadHeapObject(result, instr->hydrogen()->closure());
2804 } 2824 }
2805 2825
2806 2826
2807 void LCodeGen::DoContext(LContext* instr) { 2827 void LCodeGen::DoContext(LContext* instr) {
2808 Register result = ToRegister(instr->result()); 2828 Register result = ToRegister(instr->result());
2809 __ mov(result, cp); 2829 __ mov(result, cp);
2810 } 2830 }
2811 2831
2812 2832
2813 void LCodeGen::DoOuterContext(LOuterContext* instr) { 2833 void LCodeGen::DoOuterContext(LOuterContext* instr) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 // Setup deoptimization. 2881 // Setup deoptimization.
2862 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); 2882 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
2863 2883
2864 // Restore context. 2884 // Restore context.
2865 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2885 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2866 } 2886 }
2867 2887
2868 2888
2869 void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) { 2889 void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) {
2870 ASSERT(ToRegister(instr->result()).is(r0)); 2890 ASSERT(ToRegister(instr->result()).is(r0));
2871 __ mov(r1, Operand(instr->function())); 2891 __ LoadHeapObject(r1, instr->function());
2872 CallKnownFunction(instr->function(), 2892 CallKnownFunction(instr->function(),
2873 instr->arity(), 2893 instr->arity(),
2874 instr, 2894 instr,
2875 CALL_AS_METHOD); 2895 CALL_AS_METHOD);
2876 } 2896 }
2877 2897
2878 2898
2879 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) { 2899 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) {
2880 Register input = ToRegister(instr->InputAt(0)); 2900 Register input = ToRegister(instr->InputAt(0));
2881 Register result = ToRegister(instr->result()); 2901 Register result = ToRegister(instr->result());
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
3287 Handle<Code> ic = 3307 Handle<Code> ic =
3288 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); 3308 isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
3289 __ mov(r2, Operand(instr->name())); 3309 __ mov(r2, Operand(instr->name()));
3290 CallCode(ic, mode, instr); 3310 CallCode(ic, mode, instr);
3291 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3311 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3292 } 3312 }
3293 3313
3294 3314
3295 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { 3315 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) {
3296 ASSERT(ToRegister(instr->result()).is(r0)); 3316 ASSERT(ToRegister(instr->result()).is(r0));
3297 __ mov(r1, Operand(instr->target())); 3317 __ LoadHeapObject(r1, instr->target());
3298 CallKnownFunction(instr->target(), instr->arity(), instr, CALL_AS_FUNCTION); 3318 CallKnownFunction(instr->target(), instr->arity(), instr, CALL_AS_FUNCTION);
3299 } 3319 }
3300 3320
3301 3321
3302 void LCodeGen::DoCallNew(LCallNew* instr) { 3322 void LCodeGen::DoCallNew(LCallNew* instr) {
3303 ASSERT(ToRegister(instr->InputAt(0)).is(r1)); 3323 ASSERT(ToRegister(instr->InputAt(0)).is(r1));
3304 ASSERT(ToRegister(instr->result()).is(r0)); 3324 ASSERT(ToRegister(instr->result()).is(r0));
3305 3325
3306 Handle<Code> builtin = isolate()->builtins()->JSConstructCall(); 3326 Handle<Code> builtin = isolate()->builtins()->JSConstructCall();
3307 __ mov(r0, Operand(instr->arity())); 3327 __ mov(r0, Operand(instr->arity()));
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
4111 } else { 4131 } else {
4112 __ and_(scratch, scratch, Operand(mask)); 4132 __ and_(scratch, scratch, Operand(mask));
4113 __ cmp(scratch, Operand(tag)); 4133 __ cmp(scratch, Operand(tag));
4114 DeoptimizeIf(ne, instr->environment()); 4134 DeoptimizeIf(ne, instr->environment());
4115 } 4135 }
4116 } 4136 }
4117 } 4137 }
4118 4138
4119 4139
4120 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 4140 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
4121 ASSERT(instr->InputAt(0)->IsRegister()); 4141 Register reg = ToRegister(instr->value());
4122 Register reg = ToRegister(instr->InputAt(0)); 4142 Handle<JSFunction> target = instr->hydrogen()->target();
4123 __ cmp(reg, Operand(instr->hydrogen()->target())); 4143 if (isolate()->heap()->InNewSpace(*target)) {
4144 Register reg = ToRegister(instr->value());
4145 Handle<JSGlobalPropertyCell> cell =
4146 isolate()->factory()->NewJSGlobalPropertyCell(target);
4147 __ mov(ip, Operand(Handle<Object>(cell)));
4148 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
4149 __ cmp(reg, ip);
4150 } else {
4151 __ cmp(reg, Operand(target));
4152 }
4124 DeoptimizeIf(ne, instr->environment()); 4153 DeoptimizeIf(ne, instr->environment());
4125 } 4154 }
4126 4155
4127 4156
4128 void LCodeGen::DoCheckMap(LCheckMap* instr) { 4157 void LCodeGen::DoCheckMap(LCheckMap* instr) {
4129 Register scratch = scratch0(); 4158 Register scratch = scratch0();
4130 LOperand* input = instr->InputAt(0); 4159 LOperand* input = instr->InputAt(0);
4131 ASSERT(input->IsRegister()); 4160 ASSERT(input->IsRegister());
4132 Register reg = ToRegister(input); 4161 Register reg = ToRegister(input);
4133 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); 4162 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
4182 4211
4183 // smi 4212 // smi
4184 __ bind(&is_smi); 4213 __ bind(&is_smi);
4185 __ SmiUntag(result_reg, input_reg); 4214 __ SmiUntag(result_reg, input_reg);
4186 __ ClampUint8(result_reg, result_reg); 4215 __ ClampUint8(result_reg, result_reg);
4187 4216
4188 __ bind(&done); 4217 __ bind(&done);
4189 } 4218 }
4190 4219
4191 4220
4192 void LCodeGen::LoadHeapObject(Register result,
4193 Handle<HeapObject> object) {
4194 if (heap()->InNewSpace(*object)) {
4195 Handle<JSGlobalPropertyCell> cell =
4196 factory()->NewJSGlobalPropertyCell(object);
4197 __ mov(result, Operand(cell));
4198 __ ldr(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset));
4199 } else {
4200 __ mov(result, Operand(object));
4201 }
4202 }
4203
4204
4205 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 4221 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
4206 Register temp1 = ToRegister(instr->TempAt(0)); 4222 Register temp1 = ToRegister(instr->TempAt(0));
4207 Register temp2 = ToRegister(instr->TempAt(1)); 4223 Register temp2 = ToRegister(instr->TempAt(1));
4208 4224
4209 Handle<JSObject> holder = instr->holder(); 4225 Handle<JSObject> holder = instr->holder();
4210 Handle<JSObject> current_prototype = instr->prototype(); 4226 Handle<JSObject> current_prototype = instr->prototype();
4211 4227
4212 // Load prototype object. 4228 // Load prototype object.
4213 LoadHeapObject(temp1, current_prototype); 4229 __ LoadHeapObject(temp1, current_prototype);
4214 4230
4215 // Check prototype maps up to the holder. 4231 // Check prototype maps up to the holder.
4216 while (!current_prototype.is_identical_to(holder)) { 4232 while (!current_prototype.is_identical_to(holder)) {
4217 __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset)); 4233 __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset));
4218 __ cmp(temp2, Operand(Handle<Map>(current_prototype->map()))); 4234 __ cmp(temp2, Operand(Handle<Map>(current_prototype->map())));
4219 DeoptimizeIf(ne, instr->environment()); 4235 DeoptimizeIf(ne, instr->environment());
4220 current_prototype = 4236 current_prototype =
4221 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype())); 4237 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
4222 // Load next prototype object. 4238 // Load next prototype object.
4223 LoadHeapObject(temp1, current_prototype); 4239 __ LoadHeapObject(temp1, current_prototype);
4224 } 4240 }
4225 4241
4226 // Check the holder map. 4242 // Check the holder map.
4227 __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset)); 4243 __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset));
4228 __ cmp(temp2, Operand(Handle<Map>(current_prototype->map()))); 4244 __ cmp(temp2, Operand(Handle<Map>(current_prototype->map())));
4229 DeoptimizeIf(ne, instr->environment()); 4245 DeoptimizeIf(ne, instr->environment());
4230 } 4246 }
4231 4247
4232 4248
4233 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { 4249 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 } 4306 }
4291 4307
4292 // Copy in-object properties. 4308 // Copy in-object properties.
4293 for (int i = 0; i < inobject_properties; i++) { 4309 for (int i = 0; i < inobject_properties; i++) {
4294 int total_offset = current_offset + object->GetInObjectPropertyOffset(i); 4310 int total_offset = current_offset + object->GetInObjectPropertyOffset(i);
4295 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i)); 4311 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i));
4296 if (value->IsJSObject()) { 4312 if (value->IsJSObject()) {
4297 Handle<JSObject> value_object = Handle<JSObject>::cast(value); 4313 Handle<JSObject> value_object = Handle<JSObject>::cast(value);
4298 __ add(r2, result, Operand(*offset)); 4314 __ add(r2, result, Operand(*offset));
4299 __ str(r2, FieldMemOperand(result, total_offset)); 4315 __ str(r2, FieldMemOperand(result, total_offset));
4300 LoadHeapObject(source, value_object); 4316 __ LoadHeapObject(source, value_object);
4301 EmitDeepCopy(value_object, result, source, offset); 4317 EmitDeepCopy(value_object, result, source, offset);
4302 } else if (value->IsHeapObject()) { 4318 } else if (value->IsHeapObject()) {
4303 LoadHeapObject(r2, Handle<HeapObject>::cast(value)); 4319 __ LoadHeapObject(r2, Handle<HeapObject>::cast(value));
4304 __ str(r2, FieldMemOperand(result, total_offset)); 4320 __ str(r2, FieldMemOperand(result, total_offset));
4305 } else { 4321 } else {
4306 __ mov(r2, Operand(value)); 4322 __ mov(r2, Operand(value));
4307 __ str(r2, FieldMemOperand(result, total_offset)); 4323 __ str(r2, FieldMemOperand(result, total_offset));
4308 } 4324 }
4309 } 4325 }
4310 } 4326 }
4311 4327
4312 4328
4313 void LCodeGen::DoObjectLiteralFast(LObjectLiteralFast* instr) { 4329 void LCodeGen::DoObjectLiteralFast(LObjectLiteralFast* instr) {
4314 int size = instr->hydrogen()->total_size(); 4330 int size = instr->hydrogen()->total_size();
4315 4331
4316 // Allocate all objects that are part of the literal in one big 4332 // Allocate all objects that are part of the literal in one big
4317 // allocation. This avoids multiple limit checks. 4333 // allocation. This avoids multiple limit checks.
4318 Label allocated, runtime_allocate; 4334 Label allocated, runtime_allocate;
4319 __ AllocateInNewSpace(size, r0, r2, r3, &runtime_allocate, TAG_OBJECT); 4335 __ AllocateInNewSpace(size, r0, r2, r3, &runtime_allocate, TAG_OBJECT);
4320 __ jmp(&allocated); 4336 __ jmp(&allocated);
4321 4337
4322 __ bind(&runtime_allocate); 4338 __ bind(&runtime_allocate);
4323 __ mov(r0, Operand(Smi::FromInt(size))); 4339 __ mov(r0, Operand(Smi::FromInt(size)));
4324 __ push(r0); 4340 __ push(r0);
4325 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr); 4341 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr);
4326 4342
4327 __ bind(&allocated); 4343 __ bind(&allocated);
4328 int offset = 0; 4344 int offset = 0;
4329 LoadHeapObject(r1, instr->hydrogen()->boilerplate()); 4345 __ LoadHeapObject(r1, instr->hydrogen()->boilerplate());
4330 EmitDeepCopy(instr->hydrogen()->boilerplate(), r0, r1, &offset); 4346 EmitDeepCopy(instr->hydrogen()->boilerplate(), r0, r1, &offset);
4331 ASSERT_EQ(size, offset); 4347 ASSERT_EQ(size, offset);
4332 } 4348 }
4333 4349
4334 4350
4335 void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) { 4351 void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) {
4336 Handle<FixedArray> constant_properties = 4352 Handle<FixedArray> constant_properties =
4337 instr->hydrogen()->constant_properties(); 4353 instr->hydrogen()->constant_properties();
4338 4354
4339 __ ldr(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4355 __ ldr(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
4683 ASSERT(osr_pc_offset_ == -1); 4699 ASSERT(osr_pc_offset_ == -1);
4684 osr_pc_offset_ = masm()->pc_offset(); 4700 osr_pc_offset_ = masm()->pc_offset();
4685 } 4701 }
4686 4702
4687 4703
4688 4704
4689 4705
4690 #undef __ 4706 #undef __
4691 4707
4692 } } // namespace v8::internal 4708 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/macro-assembler-arm.h » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698