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

Side by Side Diff: src/type-info.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 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
« no previous file with comments | « src/type-info.h ('k') | src/typing.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ast.h" 7 #include "src/ast.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
11 #include "src/ic/stub-cache.h" 11 #include "src/ic/stub-cache.h"
12 #include "src/type-info.h" 12 #include "src/type-info.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 17
18 TypeFeedbackOracle::TypeFeedbackOracle( 18 TypeFeedbackOracle::TypeFeedbackOracle(
19 Handle<Code> code, Handle<TypeFeedbackVector> feedback_vector, 19 Isolate* isolate, Zone* zone, Handle<Code> code,
20 Handle<Context> native_context, Zone* zone) 20 Handle<TypeFeedbackVector> feedback_vector, Handle<Context> native_context)
21 : native_context_(native_context), zone_(zone) { 21 : native_context_(native_context), isolate_(isolate), zone_(zone) {
22 BuildDictionary(code); 22 BuildDictionary(code);
23 DCHECK(dictionary_->IsDictionary()); 23 DCHECK(dictionary_->IsDictionary());
24 // We make a copy of the feedback vector because a GC could clear 24 // We make a copy of the feedback vector because a GC could clear
25 // the type feedback info contained therein. 25 // the type feedback info contained therein.
26 // TODO(mvstanton): revisit the decision to copy when we weakly 26 // TODO(mvstanton): revisit the decision to copy when we weakly
27 // traverse the feedback vector at GC time. 27 // traverse the feedback vector at GC time.
28 feedback_vector_ = TypeFeedbackVector::Copy(isolate(), feedback_vector); 28 feedback_vector_ = TypeFeedbackVector::Copy(isolate, feedback_vector);
29 } 29 }
30 30
31 31
32 static uint32_t IdToKey(TypeFeedbackId ast_id) { 32 static uint32_t IdToKey(TypeFeedbackId ast_id) {
33 return static_cast<uint32_t>(ast_id.ToInt()); 33 return static_cast<uint32_t>(ast_id.ToInt());
34 } 34 }
35 35
36 36
37 Handle<Object> TypeFeedbackOracle::GetInfo(TypeFeedbackId ast_id) { 37 Handle<Object> TypeFeedbackOracle::GetInfo(TypeFeedbackId ast_id) {
38 int entry = dictionary_->FindEntry(IdToKey(ast_id)); 38 int entry = dictionary_->FindEntry(IdToKey(ast_id));
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 UnseededNumberDictionary::kNotFound); 551 UnseededNumberDictionary::kNotFound);
552 // Dictionary has been allocated with sufficient size for all elements. 552 // Dictionary has been allocated with sufficient size for all elements.
553 DisallowHeapAllocation no_need_to_resize_dictionary; 553 DisallowHeapAllocation no_need_to_resize_dictionary;
554 HandleScope scope(isolate()); 554 HandleScope scope(isolate());
555 USE(UnseededNumberDictionary::AtNumberPut( 555 USE(UnseededNumberDictionary::AtNumberPut(
556 dictionary_, IdToKey(ast_id), handle(target, isolate()))); 556 dictionary_, IdToKey(ast_id), handle(target, isolate())));
557 } 557 }
558 558
559 559
560 } } // namespace v8::internal 560 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698