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

Side by Side Diff: src/hydrogen.cc

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7904 matching lines...) Expand 10 before | Expand all | Expand 10 after
7915 SmallMapList* receiver_maps, 7915 SmallMapList* receiver_maps,
7916 int argc, 7916 int argc,
7917 BailoutId ast_id, 7917 BailoutId ast_id,
7918 ApiCallType call_type) { 7918 ApiCallType call_type) {
7919 CallOptimization optimization(function); 7919 CallOptimization optimization(function);
7920 if (!optimization.is_simple_api_call()) return false; 7920 if (!optimization.is_simple_api_call()) return false;
7921 Handle<Map> holder_map; 7921 Handle<Map> holder_map;
7922 if (call_type == kCallApiFunction) { 7922 if (call_type == kCallApiFunction) {
7923 // Cannot embed a direct reference to the global proxy map 7923 // Cannot embed a direct reference to the global proxy map
7924 // as it maybe dropped on deserialization. 7924 // as it maybe dropped on deserialization.
7925 CHECK(!Serializer::enabled()); 7925 CHECK(!Serializer::enabled(isolate()));
7926 ASSERT_EQ(0, receiver_maps->length()); 7926 ASSERT_EQ(0, receiver_maps->length());
7927 receiver_maps->Add(handle( 7927 receiver_maps->Add(handle(
7928 function->context()->global_object()->global_receiver()->map()), 7928 function->context()->global_object()->global_receiver()->map()),
7929 zone()); 7929 zone());
7930 } 7930 }
7931 CallOptimization::HolderLookup holder_lookup = 7931 CallOptimization::HolderLookup holder_lookup =
7932 CallOptimization::kHolderNotFound; 7932 CallOptimization::kHolderNotFound;
7933 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType( 7933 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType(
7934 receiver_maps->first(), &holder_lookup); 7934 receiver_maps->first(), &holder_lookup);
7935 if (holder_lookup == CallOptimization::kHolderNotFound) return false; 7935 if (holder_lookup == CallOptimization::kHolderNotFound) return false;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
8102 } 8102 }
8103 } 8103 }
8104 8104
8105 8105
8106 HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function, 8106 HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function,
8107 Handle<JSFunction> target) { 8107 Handle<JSFunction> target) {
8108 SharedFunctionInfo* shared = target->shared(); 8108 SharedFunctionInfo* shared = target->shared();
8109 if (shared->strict_mode() == SLOPPY && !shared->native()) { 8109 if (shared->strict_mode() == SLOPPY && !shared->native()) {
8110 // Cannot embed a direct reference to the global proxy 8110 // Cannot embed a direct reference to the global proxy
8111 // as is it dropped on deserialization. 8111 // as is it dropped on deserialization.
8112 CHECK(!Serializer::enabled()); 8112 CHECK(!Serializer::enabled(isolate()));
8113 Handle<JSObject> global_receiver( 8113 Handle<JSObject> global_receiver(
8114 target->context()->global_object()->global_receiver()); 8114 target->context()->global_object()->global_receiver());
8115 return Add<HConstant>(global_receiver); 8115 return Add<HConstant>(global_receiver);
8116 } 8116 }
8117 return graph()->GetConstantUndefined(); 8117 return graph()->GetConstantUndefined();
8118 } 8118 }
8119 8119
8120 8120
8121 void HOptimizedGraphBuilder::VisitCall(Call* expr) { 8121 void HOptimizedGraphBuilder::VisitCall(Call* expr) {
8122 ASSERT(!HasStackOverflow()); 8122 ASSERT(!HasStackOverflow());
(...skipping 3566 matching lines...) Expand 10 before | Expand all | Expand 10 after
11689 if (ShouldProduceTraceOutput()) { 11689 if (ShouldProduceTraceOutput()) {
11690 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11690 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11691 } 11691 }
11692 11692
11693 #ifdef DEBUG 11693 #ifdef DEBUG
11694 graph_->Verify(false); // No full verify. 11694 graph_->Verify(false); // No full verify.
11695 #endif 11695 #endif
11696 } 11696 }
11697 11697
11698 } } // namespace v8::internal 11698 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/ia32/assembler-ia32.h » ('j') | src/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698