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

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

Issue 1709008: Introduce faster swapping primitives. (Closed)
Patch Set: Stub ports to x64 and ARM Created 10 years, 7 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
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/array.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 4483 matching lines...) Expand 10 before | Expand all | Expand 10 after
4494 4494
4495 // Load the argument on the stack and jump to the runtime. 4495 // Load the argument on the stack and jump to the runtime.
4496 Load(args->at(0)); 4496 Load(args->at(0));
4497 4497
4498 NumberToStringStub stub; 4498 NumberToStringStub stub;
4499 frame_->CallStub(&stub, 1); 4499 frame_->CallStub(&stub, 1);
4500 frame_->EmitPush(r0); 4500 frame_->EmitPush(r0);
4501 } 4501 }
4502 4502
4503 4503
4504 void CodeGenerator::GenerateSwapElements(ZoneList<Expression*>* args) {
4505 Comment cmnt(masm_, "[ GenerateSwapElements");
4506
4507 ASSERT_EQ(3, args->length());
4508
4509 Load(args->at(0));
4510 Load(args->at(1));
4511 Load(args->at(2));
4512
4513 frame_->CallRuntime(Runtime::kSwapElements, 3);
4514 frame_->EmitPush(r0);
4515 }
4516
4517
4504 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) { 4518 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) {
4505 Comment cmnt(masm_, "[ GenerateCallFunction"); 4519 Comment cmnt(masm_, "[ GenerateCallFunction");
4506 4520
4507 ASSERT(args->length() >= 2); 4521 ASSERT(args->length() >= 2);
4508 4522
4509 int n_args = args->length() - 2; // for receiver and function. 4523 int n_args = args->length() - 2; // for receiver and function.
4510 Load(args->at(0)); // receiver 4524 Load(args->at(0)); // receiver
4511 for (int i = 0; i < n_args; i++) { 4525 for (int i = 0; i < n_args; i++) {
4512 Load(args->at(i + 1)); 4526 Load(args->at(i + 1));
4513 } 4527 }
(...skipping 4831 matching lines...) Expand 10 before | Expand all | Expand 10 after
9345 9359
9346 // Just jump to runtime to add the two strings. 9360 // Just jump to runtime to add the two strings.
9347 __ bind(&string_add_runtime); 9361 __ bind(&string_add_runtime);
9348 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 9362 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
9349 } 9363 }
9350 9364
9351 9365
9352 #undef __ 9366 #undef __
9353 9367
9354 } } // namespace v8::internal 9368 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698