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: test/cctest/interpreter/test-interpreter.cc

Issue 1909903003: [Interpreter] Use FastNewSloppyArguments when possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ports Created 4 years, 8 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
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/execution.h" 7 #include "src/execution.h"
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/bytecode-array-iterator.h" 10 #include "src/interpreter/bytecode-array-iterator.h"
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 std::make_pair("function f(a, b, c, d) {" 2252 std::make_pair("function f(a, b, c, d) {"
2253 "'use strict'; return arguments[2]; }", 2253 "'use strict'; return arguments[2]; }",
2254 2), 2254 2),
2255 // Check arguments are mapped in sloppy mode and unmapped in strict. 2255 // Check arguments are mapped in sloppy mode and unmapped in strict.
2256 std::make_pair("function f(a, b, c, d) {" 2256 std::make_pair("function f(a, b, c, d) {"
2257 " c = b; return arguments[2]; }", 2257 " c = b; return arguments[2]; }",
2258 1), 2258 1),
2259 std::make_pair("function f(a, b, c, d) {" 2259 std::make_pair("function f(a, b, c, d) {"
2260 " 'use strict'; c = b; return arguments[2]; }", 2260 " 'use strict'; c = b; return arguments[2]; }",
2261 2), 2261 2),
2262 // Check arguments for duplicate parameters in sloppy mode.
2263 std::make_pair("function f(a, a, b) { return arguments[1]; }", 1),
2262 // check rest parameters 2264 // check rest parameters
2263 std::make_pair("function f(...restArray) { return restArray[0]; }", 0), 2265 std::make_pair("function f(...restArray) { return restArray[0]; }", 0),
2264 std::make_pair("function f(a, ...restArray) { return restArray[0]; }", 1), 2266 std::make_pair("function f(a, ...restArray) { return restArray[0]; }", 1),
2265 std::make_pair("function f(a, ...restArray) { return arguments[0]; }", 0), 2267 std::make_pair("function f(a, ...restArray) { return arguments[0]; }", 0),
2266 std::make_pair("function f(a, ...restArray) { return arguments[1]; }", 1), 2268 std::make_pair("function f(a, ...restArray) { return arguments[1]; }", 1),
2267 std::make_pair("function f(a, ...restArray) { return restArray[1]; }", 2), 2269 std::make_pair("function f(a, ...restArray) { return restArray[1]; }", 2),
2268 std::make_pair("function f(a, ...arguments) { return arguments[0]; }", 1), 2270 std::make_pair("function f(a, ...arguments) { return arguments[0]; }", 1),
2269 std::make_pair("function f(a, b, ...restArray) { return restArray[0]; }", 2271 std::make_pair("function f(a, b, ...restArray) { return restArray[0]; }",
2270 2), 2272 2),
2271 }; 2273 };
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
4166 CHECK(return_value->SameValue(*tests[i].second)); 4168 CHECK(return_value->SameValue(*tests[i].second));
4167 } 4169 }
4168 4170
4169 FLAG_ignition_generators = old_flag; 4171 FLAG_ignition_generators = old_flag;
4170 } 4172 }
4171 4173
4172 4174
4173 } // namespace interpreter 4175 } // namespace interpreter
4174 } // namespace internal 4176 } // namespace internal
4175 } // namespace v8 4177 } // namespace v8
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698