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

Side by Side Diff: src/hydrogen.cc

Issue 11412007: Removed a bunch of GetExistingThreadLocal calls by threading the Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed feedback Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/handles.h ('k') | src/ia32/full-codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after
3230 current_block()->FinishExit(instr); 3230 current_block()->FinishExit(instr);
3231 set_current_block(NULL); 3231 set_current_block(NULL);
3232 } 3232 }
3233 3233
3234 // If the checksum of the number of type info changes is the same as the 3234 // If the checksum of the number of type info changes is the same as the
3235 // last time this function was compiled, then this recompile is likely not 3235 // last time this function was compiled, then this recompile is likely not
3236 // due to missing/inadequate type feedback, but rather too aggressive 3236 // due to missing/inadequate type feedback, but rather too aggressive
3237 // optimization. Disable optimistic LICM in that case. 3237 // optimization. Disable optimistic LICM in that case.
3238 Handle<Code> unoptimized_code(info()->shared_info()->code()); 3238 Handle<Code> unoptimized_code(info()->shared_info()->code());
3239 ASSERT(unoptimized_code->kind() == Code::FUNCTION); 3239 ASSERT(unoptimized_code->kind() == Code::FUNCTION);
3240 Handle<Object> maybe_type_info(unoptimized_code->type_feedback_info());
3241 Handle<TypeFeedbackInfo> type_info( 3240 Handle<TypeFeedbackInfo> type_info(
3242 Handle<TypeFeedbackInfo>::cast(maybe_type_info)); 3241 TypeFeedbackInfo::cast(unoptimized_code->type_feedback_info()));
3243 int checksum = type_info->own_type_change_checksum(); 3242 int checksum = type_info->own_type_change_checksum();
3244 int composite_checksum = graph()->update_type_change_checksum(checksum); 3243 int composite_checksum = graph()->update_type_change_checksum(checksum);
3245 graph()->set_use_optimistic_licm( 3244 graph()->set_use_optimistic_licm(
3246 !type_info->matches_inlined_type_change_checksum(composite_checksum)); 3245 !type_info->matches_inlined_type_change_checksum(composite_checksum));
3247 type_info->set_inlined_type_change_checksum(composite_checksum); 3246 type_info->set_inlined_type_change_checksum(composite_checksum);
3248 } 3247 }
3249 3248
3250 return graph(); 3249 return graph();
3251 } 3250 }
3252 3251
(...skipping 3855 matching lines...) Expand 10 before | Expand all | Expand 10 after
7108 target_shared->DisableOptimization("inlining bailed out"); 7107 target_shared->DisableOptimization("inlining bailed out");
7109 inline_bailout_ = true; 7108 inline_bailout_ = true;
7110 delete target_state; 7109 delete target_state;
7111 return true; 7110 return true;
7112 } 7111 }
7113 7112
7114 // Update inlined nodes count. 7113 // Update inlined nodes count.
7115 inlined_count_ += nodes_added; 7114 inlined_count_ += nodes_added;
7116 7115
7117 ASSERT(unoptimized_code->kind() == Code::FUNCTION); 7116 ASSERT(unoptimized_code->kind() == Code::FUNCTION);
7118 Handle<Object> maybe_type_info(unoptimized_code->type_feedback_info());
7119 Handle<TypeFeedbackInfo> type_info( 7117 Handle<TypeFeedbackInfo> type_info(
7120 Handle<TypeFeedbackInfo>::cast(maybe_type_info)); 7118 TypeFeedbackInfo::cast(unoptimized_code->type_feedback_info()));
7121 graph()->update_type_change_checksum(type_info->own_type_change_checksum()); 7119 graph()->update_type_change_checksum(type_info->own_type_change_checksum());
7122 7120
7123 TraceInline(target, caller, NULL); 7121 TraceInline(target, caller, NULL);
7124 7122
7125 if (current_block() != NULL) { 7123 if (current_block() != NULL) {
7126 FunctionState* state = function_state(); 7124 FunctionState* state = function_state();
7127 if (state->inlining_kind() == CONSTRUCT_CALL_RETURN) { 7125 if (state->inlining_kind() == CONSTRUCT_CALL_RETURN) {
7128 // Falling off the end of an inlined construct call. In a test context the 7126 // Falling off the end of an inlined construct call. In a test context the
7129 // return value will always evaluate to true, in a value context the 7127 // return value will always evaluate to true, in a value context the
7130 // return value is the newly allocated receiver. 7128 // return value is the newly allocated receiver.
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
7635 HValue* context = environment()->LookupContext(); 7633 HValue* context = environment()->LookupContext();
7636 call = PreProcessCall( 7634 call = PreProcessCall(
7637 new(zone()) HCallNamed(context, name, argument_count)); 7635 new(zone()) HCallNamed(context, name, argument_count));
7638 } 7636 }
7639 7637
7640 } else { 7638 } else {
7641 expr->RecordTypeFeedback(oracle(), CALL_AS_FUNCTION); 7639 expr->RecordTypeFeedback(oracle(), CALL_AS_FUNCTION);
7642 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 7640 VariableProxy* proxy = expr->expression()->AsVariableProxy();
7643 bool global_call = proxy != NULL && proxy->var()->IsUnallocated(); 7641 bool global_call = proxy != NULL && proxy->var()->IsUnallocated();
7644 7642
7645 if (proxy != NULL && proxy->var()->is_possibly_eval()) { 7643 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
7646 return Bailout("possible direct call to eval"); 7644 return Bailout("possible direct call to eval");
7647 } 7645 }
7648 7646
7649 if (global_call) { 7647 if (global_call) {
7650 Variable* var = proxy->var(); 7648 Variable* var = proxy->var();
7651 bool known_global_function = false; 7649 bool known_global_function = false;
7652 // If there is a global property cell for the name at compile time and 7650 // If there is a global property cell for the name at compile time and
7653 // access check is not enabled we assume that the function will not change 7651 // access check is not enabled we assume that the function will not change
7654 // and generate optimized code for calling the function. 7652 // and generate optimized code for calling the function.
7655 LookupResult lookup(isolate()); 7653 LookupResult lookup(isolate());
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
10037 } 10035 }
10038 } 10036 }
10039 10037
10040 #ifdef DEBUG 10038 #ifdef DEBUG
10041 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10039 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10042 if (allocator_ != NULL) allocator_->Verify(); 10040 if (allocator_ != NULL) allocator_->Verify();
10043 #endif 10041 #endif
10044 } 10042 }
10045 10043
10046 } } // namespace v8::internal 10044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698