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

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

Issue 1670813005: Revert of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « test/cctest/heap/test-heap.cc ('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/interpreter.h" 10 #include "src/interpreter/interpreter.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( 141 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
142 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); 142 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str()))));
143 function->ReplaceCode( 143 function->ReplaceCode(
144 *isolate_->builtins()->InterpreterEntryTrampoline()); 144 *isolate_->builtins()->InterpreterEntryTrampoline());
145 } 145 }
146 146
147 if (!bytecode_.is_null()) { 147 if (!bytecode_.is_null()) {
148 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); 148 function->shared()->set_function_data(*bytecode_.ToHandleChecked());
149 } 149 }
150 if (!feedback_vector_.is_null()) { 150 if (!feedback_vector_.is_null()) {
151 function->literals()->set_feedback_vector( 151 function->shared()->set_feedback_vector(
152 *feedback_vector_.ToHandleChecked()); 152 *feedback_vector_.ToHandleChecked());
153 } 153 }
154 return function; 154 return function;
155 } 155 }
156 156
157 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); 157 DISALLOW_COPY_AND_ASSIGN(InterpreterTester);
158 }; 158 };
159 159
160 160
161 TEST(InterpreterReturn) { 161 TEST(InterpreterReturn) {
(...skipping 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after
3788 auto callable = tester.GetCallable<>(); 3788 auto callable = tester.GetCallable<>();
3789 3789
3790 Handle<i::Object> return_value = callable().ToHandleChecked(); 3790 Handle<i::Object> return_value = callable().ToHandleChecked();
3791 CHECK(return_value->SameValue(*with_stmt[i].second)); 3791 CHECK(return_value->SameValue(*with_stmt[i].second));
3792 } 3792 }
3793 } 3793 }
3794 3794
3795 } // namespace interpreter 3795 } // namespace interpreter
3796 } // namespace internal 3796 } // namespace internal
3797 } // namespace v8 3797 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698