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

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

Issue 521028: Direct call to native RegExp code from JavaScript (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/x64/codegen-x64.h ('k') | src/x64/regexp-macro-assembler-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after
3873 if (kFrameAlignment > 0) { 3873 if (kFrameAlignment > 0) {
3874 __ movq(rsp, rbx); 3874 __ movq(rsp, rbx);
3875 } 3875 }
3876 3876
3877 __ pop(rsi); 3877 __ pop(rsi);
3878 Result result = allocator_->Allocate(rax); 3878 Result result = allocator_->Allocate(rax);
3879 frame_->Push(&result); 3879 frame_->Push(&result);
3880 } 3880 }
3881 3881
3882 3882
3883 void CodeGenerator::GenerateRegExpExec(ZoneList<Expression*>* args) {
3884 ASSERT_EQ(args->length(), 4);
3885
3886 // Load the arguments on the stack and call the runtime system.
3887 Load(args->at(0));
3888 Load(args->at(1));
3889 Load(args->at(2));
3890 Load(args->at(3));
3891 Result result = frame_->CallRuntime(Runtime::kRegExpExec, 4);
3892 frame_->Push(&result);
3893 }
3894
3895
3883 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) { 3896 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) {
3884 ASSERT_EQ(2, args->length()); 3897 ASSERT_EQ(2, args->length());
3885 3898
3886 Load(args->at(0)); 3899 Load(args->at(0));
3887 Load(args->at(1)); 3900 Load(args->at(1));
3888 3901
3889 StringAddStub stub(NO_STRING_ADD_FLAGS); 3902 StringAddStub stub(NO_STRING_ADD_FLAGS);
3890 Result answer = frame_->CallStub(&stub, 2); 3903 Result answer = frame_->CallStub(&stub, 2);
3891 frame_->Push(&answer); 3904 frame_->Push(&answer);
3892 } 3905 }
(...skipping 4151 matching lines...) Expand 10 before | Expand all | Expand 10 after
8044 masm.GetCode(&desc); 8057 masm.GetCode(&desc);
8045 // Call the function from C++. 8058 // Call the function from C++.
8046 return FUNCTION_CAST<ModuloFunction>(buffer); 8059 return FUNCTION_CAST<ModuloFunction>(buffer);
8047 } 8060 }
8048 8061
8049 #endif 8062 #endif
8050 8063
8051 #undef __ 8064 #undef __
8052 8065
8053 } } // namespace v8::internal 8066 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/regexp-macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698