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

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

Issue 7024047: [Arguments] Port fast arguments creation stubs to X64 and ARM. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Addres comments. Created 9 years, 6 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/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 int offset = scope()->num_parameters() * kPointerSize; 223 int offset = scope()->num_parameters() * kPointerSize;
224 __ add(r2, fp, 224 __ add(r2, fp,
225 Operand(StandardFrameConstants::kCallerSPOffset + offset)); 225 Operand(StandardFrameConstants::kCallerSPOffset + offset));
226 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters()))); 226 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters())));
227 __ Push(r3, r2, r1); 227 __ Push(r3, r2, r1);
228 228
229 // Arguments to ArgumentsAccessStub: 229 // Arguments to ArgumentsAccessStub:
230 // function, receiver address, parameter count. 230 // function, receiver address, parameter count.
231 // The stub will rewrite receiever and parameter count if the previous 231 // The stub will rewrite receiever and parameter count if the previous
232 // stack frame was an arguments adapter frame. 232 // stack frame was an arguments adapter frame.
233 ArgumentsAccessStub stub( 233 ArgumentsAccessStub::Type type;
234 is_strict_mode() ? ArgumentsAccessStub::NEW_STRICT 234 if (is_strict_mode()) {
235 : ArgumentsAccessStub::NEW_NON_STRICT_SLOW); 235 type = ArgumentsAccessStub::NEW_STRICT;
236 } else if (function()->has_duplicate_parameters()) {
237 type = ArgumentsAccessStub::NEW_NON_STRICT_SLOW;
238 } else {
239 type = ArgumentsAccessStub::NEW_NON_STRICT_FAST;
240 }
241 ArgumentsAccessStub stub(type);
236 __ CallStub(&stub); 242 __ CallStub(&stub);
237 243
238 Move(arguments->AsSlot(), r0, r1, r2); 244 Move(arguments->AsSlot(), r0, r1, r2);
239 } 245 }
240 246
241 if (FLAG_trace) { 247 if (FLAG_trace) {
242 __ CallRuntime(Runtime::kTraceEnter, 0); 248 __ CallRuntime(Runtime::kTraceEnter, 0);
243 } 249 }
244 250
245 // Visit the declarations and body unless there is an illegal 251 // Visit the declarations and body unless there is an illegal
(...skipping 4052 matching lines...) Expand 10 before | Expand all | Expand 10 after
4298 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4304 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4299 __ add(pc, r1, Operand(masm_->CodeObject())); 4305 __ add(pc, r1, Operand(masm_->CodeObject()));
4300 } 4306 }
4301 4307
4302 4308
4303 #undef __ 4309 #undef __
4304 4310
4305 } } // namespace v8::internal 4311 } } // namespace v8::internal
4306 4312
4307 #endif // V8_TARGET_ARCH_ARM 4313 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698