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

Side by Side Diff: src/mips/lithium-mips.cc

Issue 10831172: Introduced TypeFeedbackId and BailoutId types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review feedback. Created 8 years, 4 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/mips/lithium-mips.h ('k') | src/mips/macro-assembler-mips.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 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 #ifdef DEBUG 613 #ifdef DEBUG
614 instr->VerifyCall(); 614 instr->VerifyCall();
615 #endif 615 #endif
616 instr->MarkAsCall(); 616 instr->MarkAsCall();
617 instr = AssignPointerMap(instr); 617 instr = AssignPointerMap(instr);
618 618
619 if (hinstr->HasObservableSideEffects()) { 619 if (hinstr->HasObservableSideEffects()) {
620 ASSERT(hinstr->next()->IsSimulate()); 620 ASSERT(hinstr->next()->IsSimulate());
621 HSimulate* sim = HSimulate::cast(hinstr->next()); 621 HSimulate* sim = HSimulate::cast(hinstr->next());
622 ASSERT(instruction_pending_deoptimization_environment_ == NULL); 622 ASSERT(instruction_pending_deoptimization_environment_ == NULL);
623 ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); 623 ASSERT(pending_deoptimization_ast_id_.IsNone());
624 instruction_pending_deoptimization_environment_ = instr; 624 instruction_pending_deoptimization_environment_ = instr;
625 pending_deoptimization_ast_id_ = sim->ast_id(); 625 pending_deoptimization_ast_id_ = sim->ast_id();
626 } 626 }
627 627
628 // If instruction does not have side-effects lazy deoptimization 628 // If instruction does not have side-effects lazy deoptimization
629 // after the call will try to deoptimize to the point before the call. 629 // after the call will try to deoptimize to the point before the call.
630 // Thus we still need to attach environment to this call even if 630 // Thus we still need to attach environment to this call even if
631 // call sequence can not deoptimize eagerly. 631 // call sequence can not deoptimize eagerly.
632 bool needs_environment = 632 bool needs_environment =
633 (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || 633 (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) ||
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 847 }
848 848
849 849
850 LEnvironment* LChunkBuilder::CreateEnvironment( 850 LEnvironment* LChunkBuilder::CreateEnvironment(
851 HEnvironment* hydrogen_env, 851 HEnvironment* hydrogen_env,
852 int* argument_index_accumulator) { 852 int* argument_index_accumulator) {
853 if (hydrogen_env == NULL) return NULL; 853 if (hydrogen_env == NULL) return NULL;
854 854
855 LEnvironment* outer = 855 LEnvironment* outer =
856 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator); 856 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator);
857 int ast_id = hydrogen_env->ast_id(); 857 BailoutId ast_id = hydrogen_env->ast_id();
858 ASSERT(ast_id != AstNode::kNoNumber || 858 ASSERT(!ast_id.IsNone() ||
859 hydrogen_env->frame_type() != JS_FUNCTION); 859 hydrogen_env->frame_type() != JS_FUNCTION);
860 int value_count = hydrogen_env->length(); 860 int value_count = hydrogen_env->length();
861 LEnvironment* result = new(zone()) LEnvironment( 861 LEnvironment* result = new(zone()) LEnvironment(
862 hydrogen_env->closure(), 862 hydrogen_env->closure(),
863 hydrogen_env->frame_type(), 863 hydrogen_env->frame_type(),
864 ast_id, 864 ast_id,
865 hydrogen_env->parameter_count(), 865 hydrogen_env->parameter_count(),
866 argument_count_, 866 argument_count_,
867 value_count, 867 value_count,
868 outer, 868 outer,
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 // If there is an instruction pending deoptimization environment create a 2127 // If there is an instruction pending deoptimization environment create a
2128 // lazy bailout instruction to capture the environment. 2128 // lazy bailout instruction to capture the environment.
2129 if (pending_deoptimization_ast_id_ == instr->ast_id()) { 2129 if (pending_deoptimization_ast_id_ == instr->ast_id()) {
2130 LInstruction* result = new(zone()) LLazyBailout; 2130 LInstruction* result = new(zone()) LLazyBailout;
2131 result = AssignEnvironment(result); 2131 result = AssignEnvironment(result);
2132 // Store the lazy deopt environment with the instruction if needed. Right 2132 // Store the lazy deopt environment with the instruction if needed. Right
2133 // now it is only used for LInstanceOfKnownGlobal. 2133 // now it is only used for LInstanceOfKnownGlobal.
2134 instruction_pending_deoptimization_environment_-> 2134 instruction_pending_deoptimization_environment_->
2135 SetDeferredLazyDeoptimizationEnvironment(result->environment()); 2135 SetDeferredLazyDeoptimizationEnvironment(result->environment());
2136 instruction_pending_deoptimization_environment_ = NULL; 2136 instruction_pending_deoptimization_environment_ = NULL;
2137 pending_deoptimization_ast_id_ = AstNode::kNoNumber; 2137 pending_deoptimization_ast_id_ = BailoutId::None();
2138 return result; 2138 return result;
2139 } 2139 }
2140 2140
2141 return NULL; 2141 return NULL;
2142 } 2142 }
2143 2143
2144 2144
2145 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { 2145 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
2146 if (instr->is_function_entry()) { 2146 if (instr->is_function_entry()) {
2147 return MarkAsCall(new(zone()) LStackCheck, instr); 2147 return MarkAsCall(new(zone()) LStackCheck, instr);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 2220
2221 2221
2222 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2222 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2223 LOperand* object = UseRegister(instr->object()); 2223 LOperand* object = UseRegister(instr->object());
2224 LOperand* index = UseRegister(instr->index()); 2224 LOperand* index = UseRegister(instr->index());
2225 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2225 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2226 } 2226 }
2227 2227
2228 2228
2229 } } // namespace v8::internal 2229 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698