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

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

Issue 6447007: Fix a bug that occurs when functions are defined with more than 16,382 parame... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/parser.cc ('k') | src/x64/full-codegen-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 2975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2986 2986
2987 // Add a label for checking the size of the code used for returning. 2987 // Add a label for checking the size of the code used for returning.
2988 #ifdef DEBUG 2988 #ifdef DEBUG
2989 Label check_exit_codesize; 2989 Label check_exit_codesize;
2990 masm_->bind(&check_exit_codesize); 2990 masm_->bind(&check_exit_codesize);
2991 #endif 2991 #endif
2992 2992
2993 // Leave the frame and return popping the arguments and the 2993 // Leave the frame and return popping the arguments and the
2994 // receiver. 2994 // receiver.
2995 frame_->Exit(); 2995 frame_->Exit();
2996 masm_->ret((scope()->num_parameters() + 1) * kPointerSize); 2996 int arguments_bytes = (scope()->num_parameters() + 1) * kPointerSize;
2997 __ Ret(arguments_bytes, rcx);
2997 DeleteFrame(); 2998 DeleteFrame();
2998 2999
2999 #ifdef ENABLE_DEBUGGER_SUPPORT 3000 #ifdef ENABLE_DEBUGGER_SUPPORT
3000 // Add padding that will be overwritten by a debugger breakpoint. 3001 // Add padding that will be overwritten by a debugger breakpoint.
3001 // frame_->Exit() generates "movq rsp, rbp; pop rbp; ret k" 3002 // The shortest return sequence generated is "movq rsp, rbp; pop rbp; ret k"
3002 // with length 7 (3 + 1 + 3). 3003 // with length 7 (3 + 1 + 3).
3003 const int kPadding = Assembler::kJSReturnSequenceLength - 7; 3004 const int kPadding = Assembler::kJSReturnSequenceLength - 7;
3004 for (int i = 0; i < kPadding; ++i) { 3005 for (int i = 0; i < kPadding; ++i) {
3005 masm_->int3(); 3006 masm_->int3();
3006 } 3007 }
3007 // Check that the size of the code used for returning matches what is 3008 // Check that the size of the code used for returning is large enough
3008 // expected by the debugger. 3009 // for the debugger's requirements.
3009 ASSERT_EQ(Assembler::kJSReturnSequenceLength, 3010 ASSERT(Assembler::kJSReturnSequenceLength <=
3010 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); 3011 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize));
3011 #endif 3012 #endif
3012 } 3013 }
3013 3014
3014 3015
3015 void CodeGenerator::VisitWithEnterStatement(WithEnterStatement* node) { 3016 void CodeGenerator::VisitWithEnterStatement(WithEnterStatement* node) {
3016 ASSERT(!in_spilled_code()); 3017 ASSERT(!in_spilled_code());
3017 Comment cmnt(masm_, "[ WithEnterStatement"); 3018 Comment cmnt(masm_, "[ WithEnterStatement");
3018 CodeForStatementPosition(node); 3019 CodeForStatementPosition(node);
3019 Load(node->expression()); 3020 Load(node->expression());
3020 Result context; 3021 Result context;
(...skipping 5787 matching lines...) Expand 10 before | Expand all | Expand 10 after
8808 } 8809 }
8809 8810
8810 #endif 8811 #endif
8811 8812
8812 8813
8813 #undef __ 8814 #undef __
8814 8815
8815 } } // namespace v8::internal 8816 } } // namespace v8::internal
8816 8817
8817 #endif // V8_TARGET_ARCH_X64 8818 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698