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

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

Issue 12049012: Avoid handle dereference during graph optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 11 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/x64/lithium-x64.h ('k') | no next file » | 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 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 ASSERT(instr->value()->representation().IsTagged()); 2032 ASSERT(instr->value()->representation().IsTagged());
2033 2033
2034 LStoreKeyedGeneric* result = 2034 LStoreKeyedGeneric* result =
2035 new(zone()) LStoreKeyedGeneric(object, key, value); 2035 new(zone()) LStoreKeyedGeneric(object, key, value);
2036 return MarkAsCall(result, instr); 2036 return MarkAsCall(result, instr);
2037 } 2037 }
2038 2038
2039 2039
2040 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2040 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2041 HTransitionElementsKind* instr) { 2041 HTransitionElementsKind* instr) {
2042 ElementsKind from_kind = instr->original_map()->elements_kind(); 2042 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
2043 ElementsKind to_kind = instr->transitioned_map()->elements_kind();
2044 if (IsSimpleMapChangeTransition(from_kind, to_kind)) {
2045 LOperand* object = UseRegister(instr->object()); 2043 LOperand* object = UseRegister(instr->object());
2046 LOperand* new_map_reg = TempRegister(); 2044 LOperand* new_map_reg = TempRegister();
2047 LOperand* temp_reg = TempRegister(); 2045 LOperand* temp_reg = TempRegister();
2048 LTransitionElementsKind* result = 2046 LTransitionElementsKind* result =
2049 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); 2047 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg);
2050 return DefineSameAsFirst(result); 2048 return DefineSameAsFirst(result);
2051 } else { 2049 } else {
2052 LOperand* object = UseFixed(instr->object(), rax); 2050 LOperand* object = UseFixed(instr->object(), rax);
2053 LOperand* fixed_object_reg = FixedTemp(rdx); 2051 LOperand* fixed_object_reg = FixedTemp(rdx);
2054 LOperand* new_map_reg = FixedTemp(rbx); 2052 LOperand* new_map_reg = FixedTemp(rbx);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2292 } 2290 }
2293 2291
2294 2292
2295 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2293 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2296 HEnvironment* outer = current_block_->last_environment(); 2294 HEnvironment* outer = current_block_->last_environment();
2297 HConstant* undefined = graph()->GetConstantUndefined(); 2295 HConstant* undefined = graph()->GetConstantUndefined();
2298 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2296 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2299 instr->arguments_count(), 2297 instr->arguments_count(),
2300 instr->function(), 2298 instr->function(),
2301 undefined, 2299 undefined,
2302 instr->call_kind(), 2300 instr->inlining_kind(),
2303 instr->inlining_kind()); 2301 instr->undefined_receiver());
2304 if (instr->arguments_var() != NULL) { 2302 if (instr->arguments_var() != NULL) {
2305 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); 2303 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject());
2306 } 2304 }
2307 inner->set_entry(instr); 2305 inner->set_entry(instr);
2308 current_block_->UpdateEnvironment(inner); 2306 current_block_->UpdateEnvironment(inner);
2309 chunk_->AddInlinedClosure(instr->closure()); 2307 chunk_->AddInlinedClosure(instr->closure());
2310 return NULL; 2308 return NULL;
2311 } 2309 }
2312 2310
2313 2311
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2360 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2363 LOperand* object = UseRegister(instr->object()); 2361 LOperand* object = UseRegister(instr->object());
2364 LOperand* index = UseTempRegister(instr->index()); 2362 LOperand* index = UseTempRegister(instr->index());
2365 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2363 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2366 } 2364 }
2367 2365
2368 2366
2369 } } // namespace v8::internal 2367 } } // namespace v8::internal
2370 2368
2371 #endif // V8_TARGET_ARCH_X64 2369 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698