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

Side by Side Diff: src/hydrogen.cc

Issue 1023783009: Revert of add access checks to receivers on function callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/builtins.cc ('k') | src/objects.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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 8628 matching lines...) Expand 10 before | Expand all | Expand 10 after
8639 8639
8640 bool HOptimizedGraphBuilder::TryInlineApiCall(Handle<JSFunction> function, 8640 bool HOptimizedGraphBuilder::TryInlineApiCall(Handle<JSFunction> function,
8641 HValue* receiver, 8641 HValue* receiver,
8642 SmallMapList* receiver_maps, 8642 SmallMapList* receiver_maps,
8643 int argc, 8643 int argc,
8644 BailoutId ast_id, 8644 BailoutId ast_id,
8645 ApiCallType call_type) { 8645 ApiCallType call_type) {
8646 CallOptimization optimization(function); 8646 CallOptimization optimization(function);
8647 if (!optimization.is_simple_api_call()) return false; 8647 if (!optimization.is_simple_api_call()) return false;
8648 Handle<Map> holder_map; 8648 Handle<Map> holder_map;
8649 for (int i = 0; i < receiver_maps->length(); ++i) {
8650 auto map = receiver_maps->at(i);
8651 // Don't inline calls to receivers requiring accesschecks.
8652 if (map->is_access_check_needed() &&
8653 map->instance_type() != JS_GLOBAL_PROXY_TYPE) {
8654 return false;
8655 }
8656 }
8657 if (call_type == kCallApiFunction) { 8649 if (call_type == kCallApiFunction) {
8658 // Cannot embed a direct reference to the global proxy map 8650 // Cannot embed a direct reference to the global proxy map
8659 // as it maybe dropped on deserialization. 8651 // as it maybe dropped on deserialization.
8660 CHECK(!isolate()->serializer_enabled()); 8652 CHECK(!isolate()->serializer_enabled());
8661 DCHECK_EQ(0, receiver_maps->length()); 8653 DCHECK_EQ(0, receiver_maps->length());
8662 receiver_maps->Add(handle(function->global_proxy()->map()), zone()); 8654 receiver_maps->Add(handle(function->global_proxy()->map()), zone());
8663 } 8655 }
8664 CallOptimization::HolderLookup holder_lookup = 8656 CallOptimization::HolderLookup holder_lookup =
8665 CallOptimization::kHolderNotFound; 8657 CallOptimization::kHolderNotFound;
8666 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType( 8658 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType(
(...skipping 4730 matching lines...) Expand 10 before | Expand all | Expand 10 after
13397 if (ShouldProduceTraceOutput()) { 13389 if (ShouldProduceTraceOutput()) {
13398 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13390 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13399 } 13391 }
13400 13392
13401 #ifdef DEBUG 13393 #ifdef DEBUG
13402 graph_->Verify(false); // No full verify. 13394 graph_->Verify(false); // No full verify.
13403 #endif 13395 #endif
13404 } 13396 }
13405 13397
13406 } } // namespace v8::internal 13398 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698