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

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

Issue 6286043: Direct call to eval passes strict mode through. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code review feedback. 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/x64/codegen-x64.cc ('k') | test/mjsunit/strict-mode-eval.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 1927
1928 // Push copy of the first argument or undefined if it doesn't exist. 1928 // Push copy of the first argument or undefined if it doesn't exist.
1929 if (arg_count > 0) { 1929 if (arg_count > 0) {
1930 __ push(Operand(rsp, arg_count * kPointerSize)); 1930 __ push(Operand(rsp, arg_count * kPointerSize));
1931 } else { 1931 } else {
1932 __ PushRoot(Heap::kUndefinedValueRootIndex); 1932 __ PushRoot(Heap::kUndefinedValueRootIndex);
1933 } 1933 }
1934 1934
1935 // Push the receiver of the enclosing function and do runtime call. 1935 // Push the receiver of the enclosing function and do runtime call.
1936 __ push(Operand(rbp, (2 + scope()->num_parameters()) * kPointerSize)); 1936 __ push(Operand(rbp, (2 + scope()->num_parameters()) * kPointerSize));
1937 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 3); 1937 // Push the strict mode flag.
1938 __ Push(Smi::FromInt(strict_mode_flag()));
1939 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 4);
1938 1940
1939 // The runtime call returns a pair of values in rax (function) and 1941 // The runtime call returns a pair of values in rax (function) and
1940 // rdx (receiver). Touch up the stack with the right values. 1942 // rdx (receiver). Touch up the stack with the right values.
1941 __ movq(Operand(rsp, (arg_count + 0) * kPointerSize), rdx); 1943 __ movq(Operand(rsp, (arg_count + 0) * kPointerSize), rdx);
1942 __ movq(Operand(rsp, (arg_count + 1) * kPointerSize), rax); 1944 __ movq(Operand(rsp, (arg_count + 1) * kPointerSize), rax);
1943 } 1945 }
1944 // Record source position for debugger. 1946 // Record source position for debugger.
1945 SetSourcePosition(expr->position()); 1947 SetSourcePosition(expr->position());
1946 InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP; 1948 InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP;
1947 CallFunctionStub stub(arg_count, in_loop, RECEIVER_MIGHT_BE_VALUE); 1949 CallFunctionStub stub(arg_count, in_loop, RECEIVER_MIGHT_BE_VALUE);
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 __ ret(0); 3646 __ ret(0);
3645 } 3647 }
3646 3648
3647 3649
3648 #undef __ 3650 #undef __
3649 3651
3650 3652
3651 } } // namespace v8::internal 3653 } } // namespace v8::internal
3652 3654
3653 #endif // V8_TARGET_ARCH_X64 3655 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/mjsunit/strict-mode-eval.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698