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

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

Issue 1623004: Faster invocation of custom comparator function. (Closed)
Patch Set: Next round Created 10 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
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/virtual-frame-x64.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 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 4122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 4133
4134 // Load the argument on the stack and jump to the runtime. 4134 // Load the argument on the stack and jump to the runtime.
4135 Load(args->at(0)); 4135 Load(args->at(0));
4136 4136
4137 NumberToStringStub stub; 4137 NumberToStringStub stub;
4138 Result result = frame_->CallStub(&stub, 1); 4138 Result result = frame_->CallStub(&stub, 1);
4139 frame_->Push(&result); 4139 frame_->Push(&result);
4140 } 4140 }
4141 4141
4142 4142
4143 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) {
4144 Comment cmnt(masm_, "[ GenerateCallFunction");
4145
4146 ASSERT(args->length() >= 2);
4147
4148 int n_args = args->length() - 2; // for receiver and function.
4149 Load(args->at(0)); // receiver
4150 for (int i = 0; i < n_args; i++) {
4151 Load(args->at(i + 1));
4152 }
4153 Load(args->at(n_args + 1)); // function
4154 Result result = frame_->CallJSFunction(n_args);
4155 frame_->Push(&result);
4156 }
4157
4158
4143 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { 4159 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) {
4144 ASSERT_EQ(args->length(), 1); 4160 ASSERT_EQ(args->length(), 1);
4145 // Load the argument on the stack and jump to the runtime. 4161 // Load the argument on the stack and jump to the runtime.
4146 Load(args->at(0)); 4162 Load(args->at(0));
4147 Result answer = frame_->CallRuntime(Runtime::kMath_sin, 1); 4163 Result answer = frame_->CallRuntime(Runtime::kMath_sin, 1);
4148 frame_->Push(&answer); 4164 frame_->Push(&answer);
4149 } 4165 }
4150 4166
4151 4167
4152 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { 4168 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) {
(...skipping 5913 matching lines...) Expand 10 before | Expand all | Expand 10 after
10066 // Call the function from C++. 10082 // Call the function from C++.
10067 return FUNCTION_CAST<ModuloFunction>(buffer); 10083 return FUNCTION_CAST<ModuloFunction>(buffer);
10068 } 10084 }
10069 10085
10070 #endif 10086 #endif
10071 10087
10072 10088
10073 #undef __ 10089 #undef __
10074 10090
10075 } } // namespace v8::internal 10091 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698