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

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

Issue 660078: Adding 'static const' for arg numbers used with CallCFunction. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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/ia32/regexp-macro-assembler-ia32.cc ('k') | src/x64/regexp-macro-assembler-x64.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 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 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after
3951 __ movq(rbp_as_smi.reg(), rbp); 3951 __ movq(rbp_as_smi.reg(), rbp);
3952 frame_->Push(&rbp_as_smi); 3952 frame_->Push(&rbp_as_smi);
3953 } 3953 }
3954 3954
3955 3955
3956 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { 3956 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) {
3957 ASSERT(args->length() == 0); 3957 ASSERT(args->length() == 0);
3958 frame_->SpillAll(); 3958 frame_->SpillAll();
3959 __ push(rsi); 3959 __ push(rsi);
3960 3960
3961 int num_arguments = 0; 3961 static const int num_arguments = 0;
3962 __ PrepareCallCFunction(num_arguments); 3962 __ PrepareCallCFunction(num_arguments);
3963 3963
3964 // Call V8::RandomPositiveSmi(). 3964 // Call V8::RandomPositiveSmi().
3965 __ CallCFunction(ExternalReference::random_positive_smi_function(), 3965 __ CallCFunction(ExternalReference::random_positive_smi_function(),
3966 num_arguments); 3966 num_arguments);
3967 3967
3968 __ pop(rsi); 3968 __ pop(rsi);
3969 Result result = allocator_->Allocate(rax); 3969 Result result = allocator_->Allocate(rax);
3970 frame_->Push(&result); 3970 frame_->Push(&result);
3971 } 3971 }
(...skipping 5530 matching lines...) Expand 10 before | Expand all | Expand 10 after
9502 // Call the function from C++. 9502 // Call the function from C++.
9503 return FUNCTION_CAST<ModuloFunction>(buffer); 9503 return FUNCTION_CAST<ModuloFunction>(buffer);
9504 } 9504 }
9505 9505
9506 #endif 9506 #endif
9507 9507
9508 9508
9509 #undef __ 9509 #undef __
9510 9510
9511 } } // namespace v8::internal 9511 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/regexp-macro-assembler-ia32.cc ('k') | src/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698