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

Side by Side Diff: src/arm/lithium-arm.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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 ASSERT(instr->object()->representation().IsTagged()); 2091 ASSERT(instr->object()->representation().IsTagged());
2092 ASSERT(instr->key()->representation().IsTagged()); 2092 ASSERT(instr->key()->representation().IsTagged());
2093 ASSERT(instr->value()->representation().IsTagged()); 2093 ASSERT(instr->value()->representation().IsTagged());
2094 2094
2095 return MarkAsCall(new(zone()) LStoreKeyedGeneric(obj, key, val), instr); 2095 return MarkAsCall(new(zone()) LStoreKeyedGeneric(obj, key, val), instr);
2096 } 2096 }
2097 2097
2098 2098
2099 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2099 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2100 HTransitionElementsKind* instr) { 2100 HTransitionElementsKind* instr) {
2101 ElementsKind from_kind = instr->original_map()->elements_kind(); 2101 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
2102 ElementsKind to_kind = instr->transitioned_map()->elements_kind();
2103 if (IsSimpleMapChangeTransition(from_kind, to_kind)) {
2104 LOperand* object = UseRegister(instr->object()); 2102 LOperand* object = UseRegister(instr->object());
2105 LOperand* new_map_reg = TempRegister(); 2103 LOperand* new_map_reg = TempRegister();
2106 LTransitionElementsKind* result = 2104 LTransitionElementsKind* result =
2107 new(zone()) LTransitionElementsKind(object, new_map_reg, NULL); 2105 new(zone()) LTransitionElementsKind(object, new_map_reg, NULL);
2108 return DefineSameAsFirst(result); 2106 return DefineSameAsFirst(result);
2109 } else { 2107 } else {
2110 LOperand* object = UseFixed(instr->object(), r0); 2108 LOperand* object = UseFixed(instr->object(), r0);
2111 LOperand* fixed_object_reg = FixedTemp(r2); 2109 LOperand* fixed_object_reg = FixedTemp(r2);
2112 LOperand* new_map_reg = FixedTemp(r3); 2110 LOperand* new_map_reg = FixedTemp(r3);
2113 LTransitionElementsKind* result = 2111 LTransitionElementsKind* result =
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 } 2346 }
2349 2347
2350 2348
2351 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2349 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2352 HEnvironment* outer = current_block_->last_environment(); 2350 HEnvironment* outer = current_block_->last_environment();
2353 HConstant* undefined = graph()->GetConstantUndefined(); 2351 HConstant* undefined = graph()->GetConstantUndefined();
2354 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2352 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2355 instr->arguments_count(), 2353 instr->arguments_count(),
2356 instr->function(), 2354 instr->function(),
2357 undefined, 2355 undefined,
2358 instr->call_kind(), 2356 instr->inlining_kind(),
2359 instr->inlining_kind()); 2357 instr->undefined_receiver());
2360 if (instr->arguments_var() != NULL) { 2358 if (instr->arguments_var() != NULL) {
2361 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); 2359 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject());
2362 } 2360 }
2363 inner->set_entry(instr); 2361 inner->set_entry(instr);
2364 current_block_->UpdateEnvironment(inner); 2362 current_block_->UpdateEnvironment(inner);
2365 chunk_->AddInlinedClosure(instr->closure()); 2363 chunk_->AddInlinedClosure(instr->closure());
2366 return NULL; 2364 return NULL;
2367 } 2365 }
2368 2366
2369 2367
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 2413
2416 2414
2417 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2415 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2418 LOperand* object = UseRegister(instr->object()); 2416 LOperand* object = UseRegister(instr->object());
2419 LOperand* index = UseRegister(instr->index()); 2417 LOperand* index = UseRegister(instr->index());
2420 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2418 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2421 } 2419 }
2422 2420
2423 2421
2424 } } // namespace v8::internal 2422 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698