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

Side by Side Diff: src/compiler/access-info.cc

Issue 1451143005: [turbofan] Decouple inlining and native context specialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove misleading comment about MaybeHandle. Created 5 years, 1 month 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/compiler/access-builder.cc ('k') | src/compiler/js-context-specialization.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 <ostream> 5 #include <ostream>
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/compilation-dependencies.h" 8 #include "src/compilation-dependencies.h"
9 #include "src/compiler/access-info.h" 9 #include "src/compiler/access-info.h"
10 #include "src/field-index-inl.h" 10 #include "src/field-index-inl.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 field_check_(field_check), 128 field_check_(field_check),
129 field_type_(field_type) {} 129 field_type_(field_type) {}
130 130
131 131
132 AccessInfoFactory::AccessInfoFactory(CompilationDependencies* dependencies, 132 AccessInfoFactory::AccessInfoFactory(CompilationDependencies* dependencies,
133 Handle<Context> native_context, Zone* zone) 133 Handle<Context> native_context, Zone* zone)
134 : dependencies_(dependencies), 134 : dependencies_(dependencies),
135 native_context_(native_context), 135 native_context_(native_context),
136 isolate_(native_context->GetIsolate()), 136 isolate_(native_context->GetIsolate()),
137 type_cache_(TypeCache::Get()), 137 type_cache_(TypeCache::Get()),
138 zone_(zone) {} 138 zone_(zone) {
139 DCHECK(native_context->IsNativeContext());
140 }
139 141
140 142
141 bool AccessInfoFactory::ComputeElementAccessInfo( 143 bool AccessInfoFactory::ComputeElementAccessInfo(
142 Handle<Map> map, AccessMode access_mode, ElementAccessInfo* access_info) { 144 Handle<Map> map, AccessMode access_mode, ElementAccessInfo* access_info) {
143 // Check if it is safe to inline element access for the {map}. 145 // Check if it is safe to inline element access for the {map}.
144 if (!CanInlineElementAccess(map)) return false; 146 if (!CanInlineElementAccess(map)) return false;
145 147
146 ElementsKind const elements_kind = map->elements_kind(); 148 ElementsKind const elements_kind = map->elements_kind();
147 149
148 // Certain (monomorphic) stores need a prototype chain check because shape 150 // Certain (monomorphic) stores need a prototype chain check because shape
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 473 }
472 return false; 474 return false;
473 } 475 }
474 476
475 477
476 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } 478 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); }
477 479
478 } // namespace compiler 480 } // namespace compiler
479 } // namespace internal 481 } // namespace internal
480 } // namespace v8 482 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698