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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 12491023: Remove (H|L)JSArrayLength instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleanup Created 7 years, 8 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-codegen-arm.cc ('k') | src/hydrogen.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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 Zone* zone = this->zone(); 266 Zone* zone = this->zone();
267 267
268 HValue* js_array = GetParameter(0); 268 HValue* js_array = GetParameter(0);
269 HValue* map = GetParameter(1); 269 HValue* map = GetParameter(1);
270 270
271 info()->MarkAsSavesCallerDoubles(); 271 info()->MarkAsSavesCallerDoubles();
272 272
273 AddInstruction(new(zone) HTrapAllocationMemento(js_array)); 273 AddInstruction(new(zone) HTrapAllocationMemento(js_array));
274 274
275 HInstruction* array_length = 275 HInstruction* array_length =
276 AddInstruction(new(zone) HJSArrayLength(js_array, 276 AddInstruction(HLoadNamedField::NewArrayLength(
277 js_array, 277 zone, js_array, js_array, HType::Smi()));
278 HType::Smi()));
279 278
280 ElementsKind to_kind = casted_stub()->to_kind(); 279 ElementsKind to_kind = casted_stub()->to_kind();
281 BuildNewSpaceArrayCheck(array_length, to_kind); 280 BuildNewSpaceArrayCheck(array_length, to_kind);
282 281
283 IfBuilder if_builder(this); 282 IfBuilder if_builder(this);
284 283
285 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); 284 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ);
286 285
287 // Nothing to do, just change the map. 286 // Nothing to do, just change the map.
288 287
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 current_block()->MarkAsDeoptimizing(); 358 current_block()->MarkAsDeoptimizing();
360 return GetParameter(0); 359 return GetParameter(0);
361 } 360 }
362 361
363 362
364 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { 363 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() {
365 return DoGenerateCode(this); 364 return DoGenerateCode(this);
366 } 365 }
367 366
368 } } // namespace v8::internal 367 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698