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

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

Issue 1425293004: [turbofan] Add support for named access to Number primitives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/compiler/js-native-context-specialization.h » ('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 10 matching lines...) Expand all
21 bool CanInlineElementAccess(Handle<Map> map) { 21 bool CanInlineElementAccess(Handle<Map> map) {
22 // TODO(bmeurer): IsJSObjectMap 22 // TODO(bmeurer): IsJSObjectMap
23 // TODO(bmeurer): !map->has_dictionary_elements() 23 // TODO(bmeurer): !map->has_dictionary_elements()
24 // TODO(bmeurer): !map->has_sloppy_arguments_elements() 24 // TODO(bmeurer): !map->has_sloppy_arguments_elements()
25 return map->IsJSArrayMap() && map->has_fast_elements() && 25 return map->IsJSArrayMap() && map->has_fast_elements() &&
26 !map->has_indexed_interceptor() && !map->is_access_check_needed(); 26 !map->has_indexed_interceptor() && !map->is_access_check_needed();
27 } 27 }
28 28
29 29
30 bool CanInlinePropertyAccess(Handle<Map> map) { 30 bool CanInlinePropertyAccess(Handle<Map> map) {
31 // TODO(bmeurer): Add support for Number primitives. 31 if (map->instance_type() == HEAP_NUMBER_TYPE) return true;
32 // if (map->instance_type() == HEAP_NUMBER_TYPE) return false;
33 if (map->instance_type() < FIRST_NONSTRING_TYPE) return true; 32 if (map->instance_type() < FIRST_NONSTRING_TYPE) return true;
34 return map->IsJSObjectMap() && !map->is_dictionary_map() && 33 return map->IsJSObjectMap() && !map->is_dictionary_map() &&
35 !map->has_named_interceptor() && 34 !map->has_named_interceptor() &&
36 // TODO(verwaest): Whitelist contexts to which we have access. 35 // TODO(verwaest): Whitelist contexts to which we have access.
37 !map->is_access_check_needed(); 36 !map->is_access_check_needed();
38 } 37 }
39 38
40 } // namespace 39 } // namespace
41 40
42 41
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 400 }
402 return false; 401 return false;
403 } 402 }
404 403
405 404
406 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } 405 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); }
407 406
408 } // namespace compiler 407 } // namespace compiler
409 } // namespace internal 408 } // namespace internal
410 } // namespace v8 409 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698