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

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

Issue 6815029: Merge (7180:7265] from bleeding_edge to the experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 8 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 | « src/arm/debug-arm.cc ('k') | src/arm/lithium-arm.h » ('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 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 int offset = scope()->num_parameters() * kPointerSize; 206 int offset = scope()->num_parameters() * kPointerSize;
207 __ add(r2, fp, 207 __ add(r2, fp,
208 Operand(StandardFrameConstants::kCallerSPOffset + offset)); 208 Operand(StandardFrameConstants::kCallerSPOffset + offset));
209 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters()))); 209 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters())));
210 __ Push(r3, r2, r1); 210 __ Push(r3, r2, r1);
211 211
212 // Arguments to ArgumentsAccessStub: 212 // Arguments to ArgumentsAccessStub:
213 // function, receiver address, parameter count. 213 // function, receiver address, parameter count.
214 // The stub will rewrite receiever and parameter count if the previous 214 // The stub will rewrite receiever and parameter count if the previous
215 // stack frame was an arguments adapter frame. 215 // stack frame was an arguments adapter frame.
216 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 216 ArgumentsAccessStub stub(
217 is_strict_mode() ? ArgumentsAccessStub::NEW_STRICT
218 : ArgumentsAccessStub::NEW_NON_STRICT);
217 __ CallStub(&stub); 219 __ CallStub(&stub);
218 220
219 Variable* arguments_shadow = scope()->arguments_shadow(); 221 Variable* arguments_shadow = scope()->arguments_shadow();
220 if (arguments_shadow != NULL) { 222 if (arguments_shadow != NULL) {
221 // Duplicate the value; move-to-slot operation might clobber registers. 223 // Duplicate the value; move-to-slot operation might clobber registers.
222 __ mov(r3, r0); 224 __ mov(r3, r0);
223 Move(arguments_shadow->AsSlot(), r3, r1, r2); 225 Move(arguments_shadow->AsSlot(), r3, r1, r2);
224 } 226 }
225 Move(arguments->AsSlot(), r0, r1, r2); 227 Move(arguments->AsSlot(), r0, r1, r2);
226 } 228 }
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, 1088 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
1087 bool pretenure) { 1089 bool pretenure) {
1088 // Use the fast case closure allocation code that allocates in new 1090 // Use the fast case closure allocation code that allocates in new
1089 // space for nested functions that don't need literals cloning. If 1091 // space for nested functions that don't need literals cloning. If
1090 // we're running with the --always-opt or the --prepare-always-opt 1092 // we're running with the --always-opt or the --prepare-always-opt
1091 // flag, we need to use the runtime function so that the new function 1093 // flag, we need to use the runtime function so that the new function
1092 // we are creating here gets a chance to have its code optimized and 1094 // we are creating here gets a chance to have its code optimized and
1093 // doesn't just get a copy of the existing unoptimized code. 1095 // doesn't just get a copy of the existing unoptimized code.
1094 if (!FLAG_always_opt && 1096 if (!FLAG_always_opt &&
1095 !FLAG_prepare_always_opt && 1097 !FLAG_prepare_always_opt &&
1098 !pretenure &&
1096 scope()->is_function_scope() && 1099 scope()->is_function_scope() &&
1097 info->num_literals() == 0 && 1100 info->num_literals() == 0) {
1098 !pretenure) { 1101 FastNewClosureStub stub(info->strict_mode() ? kStrictMode : kNonStrictMode);
1099 FastNewClosureStub stub;
1100 __ mov(r0, Operand(info)); 1102 __ mov(r0, Operand(info));
1101 __ push(r0); 1103 __ push(r0);
1102 __ CallStub(&stub); 1104 __ CallStub(&stub);
1103 } else { 1105 } else {
1104 __ mov(r0, Operand(info)); 1106 __ mov(r0, Operand(info));
1105 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex 1107 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex
1106 : Heap::kFalseValueRootIndex); 1108 : Heap::kFalseValueRootIndex);
1107 __ Push(cp, r0, r1); 1109 __ Push(cp, r0, r1);
1108 __ CallRuntime(Runtime::kNewClosure, 3); 1110 __ CallRuntime(Runtime::kNewClosure, 3);
1109 } 1111 }
(...skipping 3187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4299 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4298 __ add(pc, r1, Operand(masm_->CodeObject())); 4300 __ add(pc, r1, Operand(masm_->CodeObject()));
4299 } 4301 }
4300 4302
4301 4303
4302 #undef __ 4304 #undef __
4303 4305
4304 } } // namespace v8::internal 4306 } } // namespace v8::internal
4305 4307
4306 #endif // V8_TARGET_ARCH_ARM 4308 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/debug-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698