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

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

Issue 6711027: [Isolates] Merge 7201:7258 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 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
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int offset = scope()->num_parameters() * kPointerSize; 203 int offset = scope()->num_parameters() * kPointerSize;
204 __ add(r2, fp, 204 __ add(r2, fp,
205 Operand(StandardFrameConstants::kCallerSPOffset + offset)); 205 Operand(StandardFrameConstants::kCallerSPOffset + offset));
206 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters()))); 206 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters())));
207 __ Push(r3, r2, r1); 207 __ Push(r3, r2, r1);
208 208
209 // Arguments to ArgumentsAccessStub: 209 // Arguments to ArgumentsAccessStub:
210 // function, receiver address, parameter count. 210 // function, receiver address, parameter count.
211 // The stub will rewrite receiever and parameter count if the previous 211 // The stub will rewrite receiever and parameter count if the previous
212 // stack frame was an arguments adapter frame. 212 // stack frame was an arguments adapter frame.
213 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 213 ArgumentsAccessStub stub(
214 is_strict_mode() ? ArgumentsAccessStub::NEW_STRICT
215 : ArgumentsAccessStub::NEW_NON_STRICT);
214 __ CallStub(&stub); 216 __ CallStub(&stub);
215 217
216 Variable* arguments_shadow = scope()->arguments_shadow(); 218 Variable* arguments_shadow = scope()->arguments_shadow();
217 if (arguments_shadow != NULL) { 219 if (arguments_shadow != NULL) {
218 // Duplicate the value; move-to-slot operation might clobber registers. 220 // Duplicate the value; move-to-slot operation might clobber registers.
219 __ mov(r3, r0); 221 __ mov(r3, r0);
220 Move(arguments_shadow->AsSlot(), r3, r1, r2); 222 Move(arguments_shadow->AsSlot(), r3, r1, r2);
221 } 223 }
222 Move(arguments->AsSlot(), r0, r1, r2); 224 Move(arguments->AsSlot(), r0, r1, r2);
223 } 225 }
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, 1079 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
1078 bool pretenure) { 1080 bool pretenure) {
1079 // Use the fast case closure allocation code that allocates in new 1081 // Use the fast case closure allocation code that allocates in new
1080 // space for nested functions that don't need literals cloning. If 1082 // space for nested functions that don't need literals cloning. If
1081 // we're running with the --always-opt or the --prepare-always-opt 1083 // we're running with the --always-opt or the --prepare-always-opt
1082 // flag, we need to use the runtime function so that the new function 1084 // flag, we need to use the runtime function so that the new function
1083 // we are creating here gets a chance to have its code optimized and 1085 // we are creating here gets a chance to have its code optimized and
1084 // doesn't just get a copy of the existing unoptimized code. 1086 // doesn't just get a copy of the existing unoptimized code.
1085 if (!FLAG_always_opt && 1087 if (!FLAG_always_opt &&
1086 !FLAG_prepare_always_opt && 1088 !FLAG_prepare_always_opt &&
1089 !pretenure &&
1087 scope()->is_function_scope() && 1090 scope()->is_function_scope() &&
1088 info->num_literals() == 0 && 1091 info->num_literals() == 0) {
1089 !pretenure) { 1092 FastNewClosureStub stub(info->strict_mode() ? kStrictMode : kNonStrictMode);
1090 FastNewClosureStub stub;
1091 __ mov(r0, Operand(info)); 1093 __ mov(r0, Operand(info));
1092 __ push(r0); 1094 __ push(r0);
1093 __ CallStub(&stub); 1095 __ CallStub(&stub);
1094 } else { 1096 } else {
1095 __ mov(r0, Operand(info)); 1097 __ mov(r0, Operand(info));
1096 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex 1098 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex
1097 : Heap::kFalseValueRootIndex); 1099 : Heap::kFalseValueRootIndex);
1098 __ Push(cp, r0, r1); 1100 __ Push(cp, r0, r1);
1099 __ CallRuntime(Runtime::kNewClosure, 3); 1101 __ CallRuntime(Runtime::kNewClosure, 3);
1100 } 1102 }
(...skipping 3196 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') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698