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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1416493007: [turbofan] Implement the implicit ToObject for property access. (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 | « src/compiler/js-native-context-specialization.cc ('k') | src/ic/ic.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 6492 matching lines...) Expand 10 before | Expand all | Expand 10 after
6503 for (int i = 1; i < maps->length(); ++i) { 6503 for (int i = 1; i < maps->length(); ++i) {
6504 PropertyAccessInfo test_info(builder_, access_type_, maps->at(i), name_); 6504 PropertyAccessInfo test_info(builder_, access_type_, maps->at(i), name_);
6505 if (!test_info.IsCompatible(this)) return false; 6505 if (!test_info.IsCompatible(this)) return false;
6506 } 6506 }
6507 6507
6508 return true; 6508 return true;
6509 } 6509 }
6510 6510
6511 6511
6512 Handle<Map> HOptimizedGraphBuilder::PropertyAccessInfo::map() { 6512 Handle<Map> HOptimizedGraphBuilder::PropertyAccessInfo::map() {
6513 JSFunction* ctor = IC::GetRootConstructor( 6513 Handle<JSFunction> ctor;
6514 *map_, current_info()->closure()->context()->native_context()); 6514 if (Map::GetConstructorFunction(
6515 if (ctor != NULL) return handle(ctor->initial_map()); 6515 map_, handle(current_info()->closure()->context()->native_context()))
6516 .ToHandle(&ctor)) {
6517 return handle(ctor->initial_map());
6518 }
6516 return map_; 6519 return map_;
6517 } 6520 }
6518 6521
6519 6522
6520 static bool NeedsWrapping(Handle<Map> map, Handle<JSFunction> target) { 6523 static bool NeedsWrapping(Handle<Map> map, Handle<JSFunction> target) {
6521 return !map->IsJSObjectMap() && 6524 return !map->IsJSObjectMap() &&
6522 is_sloppy(target->shared()->language_mode()) && 6525 is_sloppy(target->shared()->language_mode()) &&
6523 !target->shared()->native(); 6526 !target->shared()->native();
6524 } 6527 }
6525 6528
(...skipping 7179 matching lines...) Expand 10 before | Expand all | Expand 10 after
13705 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13708 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13706 } 13709 }
13707 13710
13708 #ifdef DEBUG 13711 #ifdef DEBUG
13709 graph_->Verify(false); // No full verify. 13712 graph_->Verify(false); // No full verify.
13710 #endif 13713 #endif
13711 } 13714 }
13712 13715
13713 } // namespace internal 13716 } // namespace internal
13714 } // namespace v8 13717 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698