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

Side by Side Diff: src/hydrogen.cc

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/ia32/builtins-ia32.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 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 8414 matching lines...) Expand 10 before | Expand all | Expand 10 after
8425 BailoutId ast_id, 8425 BailoutId ast_id,
8426 ApiCallType call_type) { 8426 ApiCallType call_type) {
8427 CallOptimization optimization(function); 8427 CallOptimization optimization(function);
8428 if (!optimization.is_simple_api_call()) return false; 8428 if (!optimization.is_simple_api_call()) return false;
8429 Handle<Map> holder_map; 8429 Handle<Map> holder_map;
8430 if (call_type == kCallApiFunction) { 8430 if (call_type == kCallApiFunction) {
8431 // Cannot embed a direct reference to the global proxy map 8431 // Cannot embed a direct reference to the global proxy map
8432 // as it maybe dropped on deserialization. 8432 // as it maybe dropped on deserialization.
8433 CHECK(!isolate()->serializer_enabled()); 8433 CHECK(!isolate()->serializer_enabled());
8434 ASSERT_EQ(0, receiver_maps->length()); 8434 ASSERT_EQ(0, receiver_maps->length());
8435 receiver_maps->Add(handle( 8435 receiver_maps->Add(handle(function->global_proxy()->map()), zone());
8436 function->context()->global_object()->global_receiver()->map()),
8437 zone());
8438 } 8436 }
8439 CallOptimization::HolderLookup holder_lookup = 8437 CallOptimization::HolderLookup holder_lookup =
8440 CallOptimization::kHolderNotFound; 8438 CallOptimization::kHolderNotFound;
8441 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType( 8439 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType(
8442 receiver_maps->first(), &holder_lookup); 8440 receiver_maps->first(), &holder_lookup);
8443 if (holder_lookup == CallOptimization::kHolderNotFound) return false; 8441 if (holder_lookup == CallOptimization::kHolderNotFound) return false;
8444 8442
8445 if (FLAG_trace_inlining) { 8443 if (FLAG_trace_inlining) {
8446 PrintF("Inlining api function "); 8444 PrintF("Inlining api function ");
8447 function->ShortPrint(); 8445 function->ShortPrint();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
8612 } 8610 }
8613 8611
8614 8612
8615 HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function, 8613 HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function,
8616 Handle<JSFunction> target) { 8614 Handle<JSFunction> target) {
8617 SharedFunctionInfo* shared = target->shared(); 8615 SharedFunctionInfo* shared = target->shared();
8618 if (shared->strict_mode() == SLOPPY && !shared->native()) { 8616 if (shared->strict_mode() == SLOPPY && !shared->native()) {
8619 // Cannot embed a direct reference to the global proxy 8617 // Cannot embed a direct reference to the global proxy
8620 // as is it dropped on deserialization. 8618 // as is it dropped on deserialization.
8621 CHECK(!isolate()->serializer_enabled()); 8619 CHECK(!isolate()->serializer_enabled());
8622 Handle<JSObject> global_receiver( 8620 Handle<JSObject> global_proxy(target->context()->global_proxy());
8623 target->context()->global_object()->global_receiver()); 8621 return Add<HConstant>(global_proxy);
8624 return Add<HConstant>(global_receiver);
8625 } 8622 }
8626 return graph()->GetConstantUndefined(); 8623 return graph()->GetConstantUndefined();
8627 } 8624 }
8628 8625
8629 8626
8630 void HOptimizedGraphBuilder::BuildArrayCall(Expression* expression, 8627 void HOptimizedGraphBuilder::BuildArrayCall(Expression* expression,
8631 int arguments_count, 8628 int arguments_count,
8632 HValue* function, 8629 HValue* function,
8633 Handle<AllocationSite> site) { 8630 Handle<AllocationSite> site) {
8634 Add<HCheckValue>(function, array_function()); 8631 Add<HCheckValue>(function, array_function());
(...skipping 3729 matching lines...) Expand 10 before | Expand all | Expand 10 after
12364 if (ShouldProduceTraceOutput()) { 12361 if (ShouldProduceTraceOutput()) {
12365 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12362 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12366 } 12363 }
12367 12364
12368 #ifdef DEBUG 12365 #ifdef DEBUG
12369 graph_->Verify(false); // No full verify. 12366 graph_->Verify(false); // No full verify.
12370 #endif 12367 #endif
12371 } 12368 }
12372 12369
12373 } } // namespace v8::internal 12370 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698