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

Side by Side Diff: test/cctest/test-code-stub-assembler.cc

Issue 2674593003: [TypeFeedbackVector] Root feedback vectors at function literal site. (Closed)
Patch Set: REBASE+liveedit fix. Created 3 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/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/base/utils/random-number-generator.h" 5 #include "src/base/utils/random-number-generator.h"
6 #include "src/builtins/builtins-promise.h" 6 #include "src/builtins/builtins-promise.h"
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stub-assembler.h" 8 #include "src/code-stub-assembler.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 Handle<Code> code = data.GenerateCode(); 2109 Handle<Code> code = data.GenerateCode();
2110 CHECK(!code.is_null()); 2110 CHECK(!code.is_null());
2111 2111
2112 FunctionTester ft(code, kNumParams); 2112 FunctionTester ft(code, kNumParams);
2113 Handle<Object> result_obj = 2113 Handle<Object> result_obj =
2114 ft.Call(isolate->factory()->undefined_value()).ToHandleChecked(); 2114 ft.Call(isolate->factory()->undefined_value()).ToHandleChecked();
2115 CHECK(result_obj->IsJSFunction()); 2115 CHECK(result_obj->IsJSFunction());
2116 Handle<JSFunction> fun = Handle<JSFunction>::cast(result_obj); 2116 Handle<JSFunction> fun = Handle<JSFunction>::cast(result_obj);
2117 CHECK_EQ(isolate->heap()->empty_fixed_array(), fun->properties()); 2117 CHECK_EQ(isolate->heap()->empty_fixed_array(), fun->properties());
2118 CHECK_EQ(isolate->heap()->empty_fixed_array(), fun->elements()); 2118 CHECK_EQ(isolate->heap()->empty_fixed_array(), fun->elements());
2119 CHECK_EQ(isolate->heap()->empty_type_feedback_vector(), 2119 CHECK_EQ(isolate->heap()->undefined_cell(), fun->feedback_vector_cell());
2120 fun->feedback_vector());
2121 CHECK_EQ(isolate->heap()->the_hole_value(), fun->prototype_or_initial_map()); 2120 CHECK_EQ(isolate->heap()->the_hole_value(), fun->prototype_or_initial_map());
2122 CHECK_EQ(*isolate->promise_resolve_shared_fun(), fun->shared()); 2121 CHECK_EQ(*isolate->promise_resolve_shared_fun(), fun->shared());
2123 CHECK_EQ(isolate->promise_resolve_shared_fun()->code(), fun->code()); 2122 CHECK_EQ(isolate->promise_resolve_shared_fun()->code(), fun->code());
2124 CHECK_EQ(isolate->heap()->undefined_value(), fun->next_function_link()); 2123 CHECK_EQ(isolate->heap()->undefined_value(), fun->next_function_link());
2125 } 2124 }
2126 2125
2127 TEST(CreatePromiseGetCapabilitiesExecutorContext) { 2126 TEST(CreatePromiseGetCapabilitiesExecutorContext) {
2128 Isolate* isolate(CcTest::InitIsolateOnce()); 2127 Isolate* isolate(CcTest::InitIsolateOnce());
2129 2128
2130 const int kNumParams = 1; 2129 const int kNumParams = 1;
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 m.Return(m.SmiConstant(0)); 2455 m.Return(m.SmiConstant(0));
2457 2456
2458 Handle<Code> code = data.GenerateCode(); 2457 Handle<Code> code = data.GenerateCode();
2459 CHECK(!code.is_null()); 2458 CHECK(!code.is_null());
2460 FunctionTester ft(code, kNumParams); 2459 FunctionTester ft(code, kNumParams);
2461 CHECK_EQ(1, Handle<Smi>::cast(ft.Call().ToHandleChecked())->value()); 2460 CHECK_EQ(1, Handle<Smi>::cast(ft.Call().ToHandleChecked())->value());
2462 } 2461 }
2463 2462
2464 } // namespace internal 2463 } // namespace internal
2465 } // namespace v8 2464 } // 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