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

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

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 11 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
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( 143 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
144 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); 144 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str()))));
145 function->ReplaceCode( 145 function->ReplaceCode(
146 *isolate_->builtins()->InterpreterEntryTrampoline()); 146 *isolate_->builtins()->InterpreterEntryTrampoline());
147 } 147 }
148 148
149 if (!bytecode_.is_null()) { 149 if (!bytecode_.is_null()) {
150 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); 150 function->shared()->set_function_data(*bytecode_.ToHandleChecked());
151 } 151 }
152 if (!feedback_vector_.is_null()) { 152 if (!feedback_vector_.is_null()) {
153 function->shared()->set_feedback_vector( 153 function->literals()->set_feedback_vector(
154 *feedback_vector_.ToHandleChecked()); 154 *feedback_vector_.ToHandleChecked());
155 } 155 }
156 return function; 156 return function;
157 } 157 }
158 158
159 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); 159 DISALLOW_COPY_AND_ASSIGN(InterpreterTester);
160 }; 160 };
161 161
162 162
163 TEST(InterpreterReturn) { 163 TEST(InterpreterReturn) {
(...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 auto callable = tester.GetCallable<>(); 3545 auto callable = tester.GetCallable<>();
3546 3546
3547 Handle<i::Object> return_value = callable().ToHandleChecked(); 3547 Handle<i::Object> return_value = callable().ToHandleChecked();
3548 CHECK(return_value->SameValue(*eval_global[i].second)); 3548 CHECK(return_value->SameValue(*eval_global[i].second));
3549 } 3549 }
3550 } 3550 }
3551 3551
3552 } // namespace interpreter 3552 } // namespace interpreter
3553 } // namespace internal 3553 } // namespace internal
3554 } // namespace v8 3554 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698