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 141043: X64 implementation: Emit correct merge code for virtual frames at CFG merges. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 "// Put all code in anonymous function to avoid global scope.\n" 119 "// Put all code in anonymous function to avoid global scope.\n"
120 "(function(){" 120 "(function(){"
121 " function test_if_then_else(x, y, z){" 121 " function test_if_then_else(x, y, z){"
122 " if (x) {" 122 " if (x) {"
123 " x = y;" 123 " x = y;"
124 " } else {" 124 " } else {"
125 " x = z;" 125 " x = z;"
126 " }" 126 " }"
127 " return x;" 127 " return x;"
128 " }" 128 " }"
129 "\n"
130 " function test_recursion_with_base(x, y, z, w) {"
131 " if (x) {"
132 " x = x;"
133 " } else {"
134 " x = test_recursion_with_base(y, z, w, 0);"
135 " }"
136 " return x;"
137 " }"
138 "\n"
129 " function test_local_variables(x, y){" 139 " function test_local_variables(x, y){"
130 " var w; y = x; x = w; w = y; y = x; return w;" 140 " var w; y = x; x = w; w = y; y = x; return w;"
131 " };" 141 " };"
132 " test_local_variables(2,3);" 142 " test_local_variables(2,3);"
133 " function test_nesting_calls(x, y, zee){return zee;};" 143 " function test_nesting_calls(x, y, zee){return zee;};"
134 " test_local_variables(" 144 " test_local_variables("
135 " test_nesting_calls(test_local_variables(1,3), 42, 47)," 145 " test_nesting_calls(test_local_variables(1,3), 42, 47),"
136 " test_local_variables(-25.3, 2));" 146 " test_local_variables(-25.3, 2));"
137 " return test_if_then_else(1, 47, 39);" 147 " return test_if_then_else(0, 46, 47);"
148 " // return test_recursion_with_base(0, 0, 0, 47);\n"
138 "})()")), 149 "})()")),
139 Factory::NewStringFromAscii(CStrVector("CodeGeneratorTestScript")), 150 Factory::NewStringFromAscii(CStrVector("CodeGeneratorTestScript")),
140 0, 151 0,
141 0, 152 0,
142 NULL, 153 NULL,
143 NULL); 154 NULL);
144 155
145 Code* code_object = test_function->code(); // Local for debugging ease. 156 Code* code_object = test_function->code(); // Local for debugging ease.
146 USE(code_object); 157 USE(code_object);
147 158
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 __ addq(rsp, Immediate(2 * kPointerSize)); // remove markers 2566 __ addq(rsp, Immediate(2 * kPointerSize)); // remove markers
2556 2567
2557 // Restore frame pointer and return. 2568 // Restore frame pointer and return.
2558 __ pop(rbp); 2569 __ pop(rbp);
2559 __ ret(0); 2570 __ ret(0);
2560 } 2571 }
2561 2572
2562 #undef __ 2573 #undef __
2563 2574
2564 } } // namespace v8::internal 2575 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698