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

Side by Side Diff: src/hydrogen.cc

Issue 296853007: Make serializer non-static. (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
« no previous file with comments | « src/heap.cc ('k') | src/incremental-marking.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 "hydrogen.h" 5 #include "hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "v8.h" 9 #include "v8.h"
10 #include "allocation-site-scopes.h" 10 #include "allocation-site-scopes.h"
(...skipping 8015 matching lines...) Expand 10 before | Expand all | Expand 10 after
8026 SmallMapList* receiver_maps, 8026 SmallMapList* receiver_maps,
8027 int argc, 8027 int argc,
8028 BailoutId ast_id, 8028 BailoutId ast_id,
8029 ApiCallType call_type) { 8029 ApiCallType call_type) {
8030 CallOptimization optimization(function); 8030 CallOptimization optimization(function);
8031 if (!optimization.is_simple_api_call()) return false; 8031 if (!optimization.is_simple_api_call()) return false;
8032 Handle<Map> holder_map; 8032 Handle<Map> holder_map;
8033 if (call_type == kCallApiFunction) { 8033 if (call_type == kCallApiFunction) {
8034 // Cannot embed a direct reference to the global proxy map 8034 // Cannot embed a direct reference to the global proxy map
8035 // as it maybe dropped on deserialization. 8035 // as it maybe dropped on deserialization.
8036 CHECK(!Serializer::enabled(isolate())); 8036 CHECK(!isolate()->serializer_enabled());
8037 ASSERT_EQ(0, receiver_maps->length()); 8037 ASSERT_EQ(0, receiver_maps->length());
8038 receiver_maps->Add(handle( 8038 receiver_maps->Add(handle(
8039 function->context()->global_object()->global_receiver()->map()), 8039 function->context()->global_object()->global_receiver()->map()),
8040 zone()); 8040 zone());
8041 } 8041 }
8042 CallOptimization::HolderLookup holder_lookup = 8042 CallOptimization::HolderLookup holder_lookup =
8043 CallOptimization::kHolderNotFound; 8043 CallOptimization::kHolderNotFound;
8044 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType( 8044 Handle<JSObject> api_holder = optimization.LookupHolderOfExpectedType(
8045 receiver_maps->first(), &holder_lookup); 8045 receiver_maps->first(), &holder_lookup);
8046 if (holder_lookup == CallOptimization::kHolderNotFound) return false; 8046 if (holder_lookup == CallOptimization::kHolderNotFound) return false;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
8213 } 8213 }
8214 } 8214 }
8215 8215
8216 8216
8217 HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function, 8217 HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function,
8218 Handle<JSFunction> target) { 8218 Handle<JSFunction> target) {
8219 SharedFunctionInfo* shared = target->shared(); 8219 SharedFunctionInfo* shared = target->shared();
8220 if (shared->strict_mode() == SLOPPY && !shared->native()) { 8220 if (shared->strict_mode() == SLOPPY && !shared->native()) {
8221 // Cannot embed a direct reference to the global proxy 8221 // Cannot embed a direct reference to the global proxy
8222 // as is it dropped on deserialization. 8222 // as is it dropped on deserialization.
8223 CHECK(!Serializer::enabled(isolate())); 8223 CHECK(!isolate()->serializer_enabled());
8224 Handle<JSObject> global_receiver( 8224 Handle<JSObject> global_receiver(
8225 target->context()->global_object()->global_receiver()); 8225 target->context()->global_object()->global_receiver());
8226 return Add<HConstant>(global_receiver); 8226 return Add<HConstant>(global_receiver);
8227 } 8227 }
8228 return graph()->GetConstantUndefined(); 8228 return graph()->GetConstantUndefined();
8229 } 8229 }
8230 8230
8231 8231
8232 void HOptimizedGraphBuilder::VisitCall(Call* expr) { 8232 void HOptimizedGraphBuilder::VisitCall(Call* expr) {
8233 ASSERT(!HasStackOverflow()); 8233 ASSERT(!HasStackOverflow());
(...skipping 3567 matching lines...) Expand 10 before | Expand all | Expand 10 after
11801 if (ShouldProduceTraceOutput()) { 11801 if (ShouldProduceTraceOutput()) {
11802 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11802 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11803 } 11803 }
11804 11804
11805 #ifdef DEBUG 11805 #ifdef DEBUG
11806 graph_->Verify(false); // No full verify. 11806 graph_->Verify(false); // No full verify.
11807 #endif 11807 #endif
11808 } 11808 }
11809 11809
11810 } } // namespace v8::internal 11810 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698