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

Side by Side Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1906823002: Move of the type feedback vector to the closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 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
« no previous file with comments | « test/cctest/interpreter/interpreter-tester.h ('k') | test/cctest/test-compiler.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 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 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4147 std::pair<const char*, Handle<Object>> tests[] = { 4147 std::pair<const char*, Handle<Object>> tests[] = {
4148 {"function* f() { }; return f().next().value", 4148 {"function* f() { }; return f().next().value",
4149 factory->undefined_value()}, 4149 factory->undefined_value()},
4150 {"function* f() { yield 42 }; return f().next().value", 4150 {"function* f() { yield 42 }; return f().next().value",
4151 factory->NewNumberFromInt(42)}, 4151 factory->NewNumberFromInt(42)},
4152 {"function* f() { for (let x of [42]) yield x}; return f().next().value", 4152 {"function* f() { for (let x of [42]) yield x}; return f().next().value",
4153 factory->NewNumberFromInt(42)}, 4153 factory->NewNumberFromInt(42)},
4154 }; 4154 };
4155 4155
4156 for (size_t i = 0; i < arraysize(tests); i++) { 4156 for (size_t i = 0; i < arraysize(tests); i++) {
4157 std::string source( 4157 std::string source(InterpreterTester::SourceForBody(tests[i].first));
4158 InterpreterTester::SourceForBody(tests[i].first));
4159 InterpreterTester tester(handles.main_isolate(), source.c_str()); 4158 InterpreterTester tester(handles.main_isolate(), source.c_str());
4160 auto callable = tester.GetCallable<>(); 4159 auto callable = tester.GetCallable<>();
4161 4160
4162 Handle<i::Object> return_value = callable().ToHandleChecked(); 4161 Handle<i::Object> return_value = callable().ToHandleChecked();
4163 CHECK(return_value->SameValue(*tests[i].second)); 4162 CHECK(return_value->SameValue(*tests[i].second));
4164 } 4163 }
4165 4164
4166 FLAG_ignition_generators = old_flag; 4165 FLAG_ignition_generators = old_flag;
4167 } 4166 }
4168 4167
4169
4170 } // namespace interpreter 4168 } // namespace interpreter
4171 } // namespace internal 4169 } // namespace internal
4172 } // namespace v8 4170 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/interpreter-tester.h ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698