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/test-feedback-vector.h

Issue 2672363002: Link type feedback vectors to the shared function info. (Closed)
Patch Set: rebase 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-feedback-vector.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 #ifndef V8_TEST_FEEDBACK_VECTOR_H_ 5 #ifndef V8_TEST_FEEDBACK_VECTOR_H_
6 #define V8_TEST_FEEDBACK_VECTOR_H_ 6 #define V8_TEST_FEEDBACK_VECTOR_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 9
10 10
(...skipping 24 matching lines...) Expand all
35 int slot_count() const { return static_cast<int>(slots_.size()); } 35 int slot_count() const { return static_cast<int>(slots_.size()); }
36 36
37 private: 37 private:
38 Handle<FeedbackVector> vector_; 38 Handle<FeedbackVector> vector_;
39 std::vector<FeedbackSlot> slots_; 39 std::vector<FeedbackSlot> slots_;
40 }; 40 };
41 41
42 template <typename Spec> 42 template <typename Spec>
43 Handle<FeedbackVector> NewFeedbackVector(Isolate* isolate, Spec* spec) { 43 Handle<FeedbackVector> NewFeedbackVector(Isolate* isolate, Spec* spec) {
44 Handle<FeedbackMetadata> metadata = FeedbackMetadata::New(isolate, spec); 44 Handle<FeedbackMetadata> metadata = FeedbackMetadata::New(isolate, spec);
45 return FeedbackVector::New(isolate, metadata); 45 Handle<SharedFunctionInfo> shared = isolate->factory()->NewSharedFunctionInfo(
46 isolate->factory()->empty_string(), MaybeHandle<Code>(), false);
47 shared->set_feedback_metadata(*metadata);
48 return FeedbackVector::New(isolate, shared);
46 } 49 }
47 50
48 template <typename Spec> 51 template <typename Spec>
49 Handle<FeedbackMetadata> NewFeedbackMetadata(Isolate* isolate, Spec* spec) { 52 Handle<FeedbackMetadata> NewFeedbackMetadata(Isolate* isolate, Spec* spec) {
50 return FeedbackMetadata::New(isolate, spec); 53 return FeedbackMetadata::New(isolate, spec);
51 } 54 }
52 55
53 } // namespace internal 56 } // namespace internal
54 } // namespace v8 57 } // namespace v8
55 58
56 #endif 59 #endif
OLDNEW
« no previous file with comments | « test/cctest/interpreter/interpreter-tester.h ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698